client_secret to mount the payment form on your frontend.
Payment Flow
Create a Session
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | integer | Yes | Amount in smallest currency unit (cents for USD) |
currency | string | Yes | Three-letter ISO 4217 currency code (USD, EUR, GBP) |
external_id | string | No | Your order or cart reference (idempotent if reused) |
capture_method | string | No | ”automatic” (default) or “manual” for auth-only |
customer.email | string | No | Customer email address |
customer.name | string | No | Customer full name |
success_url | string | No | Redirect after successful payment |
cancel_url | string | No | Redirect after cancellation |
payment_method_types | array | No | Allowed methods: card, apple_pay, google_pay, bank_account |
metadata | object | No | Custom key-value pairs |
Response
Session Lifecycle States
Sessions progress through a state machine from creation to completion:| State | Description |
|---|---|
requires_payment_method | Session created, waiting for customer to enter payment details |
requires_action | Additional action needed (3DS authentication, redirect) |
processing | Payment is being processed |
succeeded | Payment completed successfully |
failed | Payment failed |
canceled | Customer abandoned checkout or session expired |
Session Expiration
Sessions expire automatically to prevent stale payment intents. Expired sessions cannot be completed.| Setting | Description |
|---|---|
| Default | Sessions expire 24 hours after creation |
| Custom | Set expires as seconds from now (e.g., 3600 for 1 hour) or ISO 8601 timestamp |
Best Practice: Set shorter expiration times for high-value transactions. If a session expires before the customer completes payment, create a new session.
Retrieve a Session
Cancel a Session
duplicate, fraudulent, requested_by_customer, abandoned