Checkout
Creates a checkout session using a Customer token. After creating the checkout session, redirect the customer to the url
returned.
The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
^[A-Z]{2}$
Request to create a new checkout session
Whether this checkout creates a subscription. DEPRECATED: Use 'subscription' field in 'lines' array objects instead.
411486491630370816
Optional affiliate code to track referrals
Optional URL to redirect to after successful checkout
Optional URL to redirect to if checkout is canceled
Whether to automatically redirect the customer (return_url must be set)
OK
Error response
POST /v1/checkouts HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 491
{
"lines": [
{
"product_id": "411486491630370816",
"subscription": true,
"gift_to": {
"platform": "invalid",
"id": "76561198152492642"
},
"gift_to_customer_id": "411486491630370816",
"quantity": 1,
"selected_gameserver_id": "411486491630370816",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"custom_variables": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
],
"coupon_id": "411486491630370816",
"affiliate_code": "text",
"return_url": "text",
"cancel_url": "text",
"auto_redirect": true,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
{
"id": "411486491630370816",
"token": "text",
"url": "text"
}
Was this helpful?