Skip to main content
POST
payments.checkout.create

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string
required

Required: this capability has an external effect.

Maximum string length: 255
Pramaan-Account
string

Optional. One of your account ids (GET /v1/accounts): run on that account, whatever your routing rules say. The response header X-Pramaan-Account names the account that ran.

Pramaan-End-User
string

Optional. Your own tag for your end user: a sticky: end_user rule keeps them on the account that first served them.

Maximum string length: 256
Pramaan-End-User-Group
string

Optional. Your end user's group, matched by rules with endUserGroup.

Maximum string length: 64

Body

application/json
lineItems
object[]
required

What is being charged for, 1 to 100 items.

Required array length: 1 - 100 elements
successUrl
string
required

Where the customer is sent after paying. Accepts a public URL, or http on localhost for a local install.

cancelUrl
string
required

Where the customer is sent if they cancel. Accepts a public URL, or http on localhost for a local install.

mode
enum<string> | null

"payment" is a one-time charge; "subscription" repeats. Default "payment".

Available options:
payment,
subscription
customerEmail
string

Prefill the customer's email on the checkout page.

Required string length: 1 - 320
Pattern: ^[^\s@]+@[^\s@]+\.[^\s@]+$
platformFeeAmount
number

Fee in minor units kept from the charge. Payment mode only; at most the order total.

Required range: 0 <= x <= 99999999

Response

The result

checkoutUrl
string
required

Hosted payment page to send the customer to.

ref
string

Reference to what this call created. Pass it as ref to payments.checkout.get.

expiresAt
string

When the page stops working, ISO 8601, when known.