VietBilling

Checkout & Payments

PayOS Checkout from one idempotent request.

Create a payment link for a Product, handle timeouts safely, and poll state by Checkout ID.

Start for free

Outcome

Retrying the same idempotency key does not create another logical Order.

01

Send checkout request

Your backend sends customer, price, and redirect URLs.

02

Redirect to PayOS

Your application uses checkout_url from the response.

03

Reconcile

Poll the session after a timeout or while its state is creating.

Integrate from your backend

API keys are server secrets. Never expose them in browser or mobile code.

curl -X POST "$BASE_URL/checkouts" \
  -H "Authorization: Bearer vb_live_..." \
  -H "Idempotency-Key: checkout_order_123" \
  -H "Content-Type: application/json" \
  -d '{"customer_id":"CUSTOMER_UUID","product_id":"PRODUCT_UUID","success_url":"https://app.example/success","cancel_url":"https://app.example/cancel"}'

FAQ

What if the request times out?

Poll the Checkout or retry with the same idempotency key.

Can Checkout create a Customer?

Yes. Supply an external customer ID and email when customer_id is not available.