Skip to main content
POST
Create a checkout

Authorizations

Authorization
string
header
required

Your API key, which starts with sk_. Create one in the dashboard under Developers.

Body

application/json
amount
string
required

The amount to charge, in currency. Send it as a string such as "25.00". It must be above zero, use no more decimal places than the currency has, and be worth between 1 and 1,000,000 US dollars.

Example:

"25.00"

currency
string
required

A supported three-letter currency code, such as USD or EUR.

Example:

"USD"

email
string

The customer's email address.

reference
string

Your own identifier for this checkout, such as an order number. You can list checkouts by reference later.

Maximum string length: 200
description
string

A description shown to the customer on the checkout page.

Maximum string length: 1000
success_url
string

An http or https URL on your site. Once the checkout is completed, the checkout page shows a Return to merchant button that links here. {CHECKOUT_ID} in the URL is replaced with the checkout ID.

Maximum string length: 2000
cancel_url
string

An http or https URL on your site. The checkout page links here so the customer can leave without paying, and again if the checkout expires. {CHECKOUT_ID} in the URL is replaced with the checkout ID.

Maximum string length: 2000
metadata
object

Up to 50 key-value pairs to store with the checkout. Keys can be up to 40 characters. Values must be strings of up to 500 characters.

expires_at
string<date-time>

When the checkout closes, in RFC 3339 format. It must be between 10 minutes and 365 days from now. Defaults to 24 hours from now.

Response

The checkout that was created.

success
boolean
required

Always true for a successful request.

response
object
required