Skip to main content
POST
Create a checkout session

Authorizations

Authorization
string
header
required

The publishable key (opk_…) — safe to embed in your frontend. Created per business unit in the console, with the origins allowed to use it from a browser.

Path Parameters

publicId
string
required

Body

application/json
items
object[]
required
Maximum array length: 50
email
string<email>
Maximum string length: 320
name
string
Maximum string length: 200
responses
object
redemptionCode
string
Required string length: 1 - 64
promotionCode
string
Required string length: 1 - 64
returnUrl
string
Maximum string length: 2000
locale
enum<string>
Available options:
en,
zh-CN

Response

The session and its hosted page.

id
string
required
url
string
required
expiresAt
string
required