return_url when they are done.
Create a session
Request fields
Required:number
required
Amount to collect, in major units (e.g.
50 = 50.00). Minimum 1.string
required
ISO 4217 currency code, three uppercase letters (e.g.
USD).string
required
Payment description. Maximum 500 characters.
object
required
Customer information. All sub-fields below are required unless noted.
string
required
URL the customer is redirected to after the checkout session ends (success, failure, or expiry). Maximum 2048 characters.
integer
Session duration in minutes. Range:
30 to 1440 (24 hours). Defaults to the project setting when omitted.string
Descriptor that may appear on the customer’s statement. Max 22 characters. Allowed characters:
A–Z a–z 0–9 space . , - +.string
Email address to send a receipt to. Max 255 characters.
string
Your internal reference for the order or entity. Max 191 characters.
date
When the entity was created on your side. Must not be in the future.
object
Per-gateway options. See Custom checkout — gateway_options.
object
Up to 10 key/value pairs you want stored on the intent.
object
Pre-fill or lock the checkout to a specific country or phone number.
country_code and phone are mutually exclusive — pass one or the other, not both.object
Customise the hosted payment page. See Appearance below.
Appearance
All appearance fields are optional. Omit any field to use the project default.Response
201 Created
checkout.url. Do not present the payment form yourself — the hosted page handles method discovery, input collection, and error handling.
If restriction was set, the response checkout.restriction object echoes the applied restriction with the phone number obfuscated.
Session lifecycle
After the customer returns
When the customer arrives at yourreturn_url, the session is over — but the URL redirect is not proof of payment. A network interruption or browser close can bring the customer back without a completed payment.
Always confirm the outcome by fetching the session:
payment.completed webhook. See Webhooks.