Skip to main content
POST
Create a checkout session

Authorizations

x-api-key
string
header
required

Your API key. Public production API-key endpoints accept kyren_live_* keys. Staging credentials are environment-specific and must be used only with the staging environment for which Kyren issued them.

Body

application/json
productId
string
required

The ID of the product to create a checkout for

successUrl
string<uri>
required

URL to redirect the customer to after successful payment

cancelUrl
string<uri>

URL to redirect the customer to if they cancel the payment

customerEmail
string<email>

Pre-fill the customer's email on the checkout page

customerName
string

Pre-fill the customer's name on the checkout page

displayMerchantName
string

Optional per-checkout merchant display name shown on the hosted checkout page. Also accepted as display_merchant_name.

Maximum string length: 80
metadata
object

Arbitrary key-value pairs attached to the checkout and resulting order

Response

Checkout session created successfully

code
integer
Example:

0

message
string
Example:

"success"

data
object