CreateCheckoutSessionRequestDto
Request to create a new checkout session
linesCreateCheckoutSessionLineDto[]RequiredThe line items to include in the checkout.
product_idFlakeIdRequired
quantityintegerRequired
The quantity of this product to purchase
custom_variablesobjectOptional
Key-value pair mapping custom variable identifiers to their selected values.
Required only when the product includes custom variables.
gift_toCustomerPlatformAccountDtoOptionalRepresents a customer platform association, used for gifting
idstringRequired
The account ID on the platform
platformenumRequired
Possible enum values
invalidsteamSteam profile platform - the ID param must be a Steam ID 64.
minecraftMinecraft profile platform - the ID param must be a Minecraft nick. If your store platform is Geyser, this automatically sets the Minecraft platform based on the prefix configured in store settings.
paynow_namePayNow name profile platform - the ID param must be a PayNow username.
paynowPayNow name profile platform - the ID param must be a PayNow username.
minecraft_java_nameMinecraft Java Profile Platform - the ID param must be a Java minecraft nick.
minecraft_bedrock_nameMinecraft Bedrock Profile Platform - the ID param must be a Bedrock minecraft nick.
xbox_xuidMinecraft Xbox XUID Profile Platform - the ID param must be an xbox xuid
minecraft_uuidMinecraft profile platform - the ID param must be a Minecraft UUID.
gift_to_customer_idFlakeIdOptional
selected_gameserver_idFlakeIdOptional
subscriptionbooleanOptional
Determines whether this line should create a subscription
trialbooleanOptional
Indicates whether the product should be trialed
affiliate_codestringOptional
Optional affiliate code to track referrals.
An invalid affiliate code will NOT cause an error.
auto_redirectbooleanOptional
Whether to automatically redirect the customer (return_url must be set)
cancel_urlstringOptional
Optional URL to redirect to if checkout is canceled
coupon_idFlakeIdOptional
promo_codesstring[]Optional
Optional array of promo codes (coupons, gift cards, affiliates) to apply.
An invalid promo code will cause an error.
return_urlstringOptional
Optional URL to redirect to after successful checkout
Example
{
"lines": [
{
"product_id": "411486491630370816",
"quantity": 0,
"subscription": true,
"trial": true,
"gift_to": {
"id": "76561198152492642",
"platform": "invalid"
},
"gift_to_customer_id": "411486491630370816",
"selected_gameserver_id": "411486491630370816",
"custom_variables": {}
}
],
"coupon_id": "411486491630370816",
"promo_codes": [
"string"
],
"affiliate_code": "string",
"return_url": "string",
"cancel_url": "string",
"auto_redirect": true
}