Skip to main content

Overview

Before initializing the checkout SDK, you must create a payment request via the API and obtain its id. The requestId is a required parameter in the paymentUrl passed to CaiboCheckout.init(). The accompanying token is obtained in the next step (Mint a Checkout Session Token).
This call is made from your backend so your X-API-Key is never exposed to the browser. The returned payment request id is the value you’ll use as requestId in the SDK.

Endpoint

Sample Request Body

Field Reference

Use the Response

The response includes the payment request id. Pass that value as requestId when constructing the paymentUrl for CaiboCheckout.init(). Pair it with a freshly minted checkout session token:
Do not put your apiKey in this URL. Use a short-lived checkout session token instead — see Mint a Checkout Session Token. The apiKey belongs only on your server.
Replace REQUEST_ID with the id from the response above, and CHECKOUT_TOKEN with the token returned by the mint endpoint.

Next Steps