VietBilling

Checkout & Payments

Checkout from one idempotent request.

Create secure payment checkouts from idempotent requests. Safely handle network timeouts, poll session status, and prevent duplicate order charges.

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 checkout

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.