# Checkout the shopping basket of the specified user. Contacts the payment service provider (PSP) to prepare a checkout of the products in the cart. Creates an order for this checkout. Endpoint: POST /baskets/users/{userId}/checkout/sessions Version: 2025-09-15 Security: Basket-API-Endpoints ## Path parameters: - `userId` (string, required) The platform specific user identifier representing a user. ## Query parameters: - `testMode` (string) Set to "true" to work under test conditions (do not make real payments). Defaults to "false". Please note that a test mode can also be configured by Jay for your complete company. Example: "true" - `provider_id` (string) Optional provider identifier to use as a fallback when tracking session is unavailable or does not contain provider information. This ensures tracking events can still be attributed to the correct provider. Example: "netflix" ## Header parameters: - `X-API-Key` (string, required) API access key for authorized use of the checkout endpoints. Partners, please contact Transfermedia to retrieve a valid key. - `X-JAY-Tracking` (string) Tracking session header for user tracking and analytics. This is set by the /playouts/tracking/session endpoint. Example: "eyJzZXNzaW9uX2lkIjoiZXhhbXBsZS1zZXNzaW9uLWlkLTEyMzQiLCJzdGFydF90aW1lIjoiMjAyNS0wMS0wMVQxMjowMDowMC4wMDAwMDAiLCJzb3VyY2UiOiJqYXkuYXBpLnBsYXlvdXQuZXhhbXBsZSJ9" - `x-jay-api-version` (string) The version of the API to use. Defaults to 2025-09-15. ## Request fields (application/json): - `language` (string) The 2-letter language code as specified in ISO 639-1 - `country` (string) The 2-letter country code as specified in ISO 3166 - `stripeUsingSdk` (boolean) Set to True when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. Defaults to False. ## Response 200 fields (application/json): - `data` (object) The response data. Example: {"orderNo":"string","currency":"string","fullPrice":0,"fullTax":0,"shippingCost":0,"novalnet":{"priceByShop":"","checkoutUrl":"string"},"stripe":{"priceByShop":"","checkoutUrl":"string","publicKey":"string","customerId":"string","ephemeralKeySecret":"string","paymentIntentClientSecret":"string"},"testMode":true} - `data.orderNo` (string) Example: "string" - `data.currency` (string) The currency used for payment Example: "string" - `data.fullPrice` (integer) The full price of the products checked out (including tax, shipping, etc.). The price is given in minor units. Divide it by 100 before present it. - `data.fullTax` (integer) The full tax given in minor units. Divide it by 100 before present it. - `data.shippingCost` (integer) The shipping cost given in minor units. Divide it by 100 before present it. - `data.novalnet` (object) Represents the checkout response from stripe Example: {"priceByShop":"","checkoutUrl":"string"} - `data.novalnet.priceByShop` (object) The price of the products checked out for each shop (including tax, shipping, etc.). Each price is given in minor units. Divide it by 100 before present it. Example: "" - `data.novalnet.checkoutUrl` (string) Example: "string" - `data.stripe` (object) Represents the checkout response from stripe Example: {"priceByShop":"","checkoutUrl":"string","publicKey":"string","customerId":"string","ephemeralKeySecret":"string","paymentIntentClientSecret":"string"} - `data.stripe.publicKey` (string) Example: "string" - `data.stripe.customerId` (string) Example: "string" - `data.stripe.ephemeralKeySecret` (string) Example: "string" - `data.stripe.paymentIntentClientSecret` (string) Example: "string" - `data.testMode` (boolean) True if the checkout session ran in test mode (no real payments). False if the checkout session ran in live mode (with real payments). Example: true - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details. ## Response 401 fields (application/json): - `data` (object) The response data. Example: {"orderNo":"string","currency":"string","fullPrice":0,"fullTax":0,"shippingCost":0,"novalnet":{"priceByShop":"","checkoutUrl":"string"},"stripe":{"priceByShop":"","checkoutUrl":"string","publicKey":"string","customerId":"string","ephemeralKeySecret":"string","paymentIntentClientSecret":"string"},"testMode":true} - `data.orderNo` (string) Example: "string" - `data.currency` (string) The currency used for payment Example: "string" - `data.fullPrice` (integer) The full price of the products checked out (including tax, shipping, etc.). The price is given in minor units. Divide it by 100 before present it. - `data.fullTax` (integer) The full tax given in minor units. Divide it by 100 before present it. - `data.shippingCost` (integer) The shipping cost given in minor units. Divide it by 100 before present it. - `data.novalnet` (object) Represents the checkout response from stripe Example: {"priceByShop":"","checkoutUrl":"string"} - `data.novalnet.priceByShop` (object) The price of the products checked out for each shop (including tax, shipping, etc.). Each price is given in minor units. Divide it by 100 before present it. Example: "" - `data.novalnet.checkoutUrl` (string) Example: "string" - `data.stripe` (object) Represents the checkout response from stripe Example: {"priceByShop":"","checkoutUrl":"string","publicKey":"string","customerId":"string","ephemeralKeySecret":"string","paymentIntentClientSecret":"string"} - `data.stripe.publicKey` (string) Example: "string" - `data.stripe.customerId` (string) Example: "string" - `data.stripe.ephemeralKeySecret` (string) Example: "string" - `data.stripe.paymentIntentClientSecret` (string) Example: "string" - `data.testMode` (boolean) True if the checkout session ran in test mode (no real payments). False if the checkout session ran in live mode (with real payments). Example: true - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details. ## Response 422 fields (application/json): - `data` (object) The response data. Example: {"orderNo":"string","currency":"string","fullPrice":0,"fullTax":0,"shippingCost":0,"novalnet":{"priceByShop":"","checkoutUrl":"string"},"stripe":{"priceByShop":"","checkoutUrl":"string","publicKey":"string","customerId":"string","ephemeralKeySecret":"string","paymentIntentClientSecret":"string"},"testMode":true} - `data.orderNo` (string) Example: "string" - `data.currency` (string) The currency used for payment Example: "string" - `data.fullPrice` (integer) The full price of the products checked out (including tax, shipping, etc.). The price is given in minor units. Divide it by 100 before present it. - `data.fullTax` (integer) The full tax given in minor units. Divide it by 100 before present it. - `data.shippingCost` (integer) The shipping cost given in minor units. Divide it by 100 before present it. - `data.novalnet` (object) Represents the checkout response from stripe Example: {"priceByShop":"","checkoutUrl":"string"} - `data.novalnet.priceByShop` (object) The price of the products checked out for each shop (including tax, shipping, etc.). Each price is given in minor units. Divide it by 100 before present it. Example: "" - `data.novalnet.checkoutUrl` (string) Example: "string" - `data.stripe` (object) Represents the checkout response from stripe Example: {"priceByShop":"","checkoutUrl":"string","publicKey":"string","customerId":"string","ephemeralKeySecret":"string","paymentIntentClientSecret":"string"} - `data.stripe.publicKey` (string) Example: "string" - `data.stripe.customerId` (string) Example: "string" - `data.stripe.ephemeralKeySecret` (string) Example: "string" - `data.stripe.paymentIntentClientSecret` (string) Example: "string" - `data.testMode` (boolean) True if the checkout session ran in test mode (no real payments). False if the checkout session ran in live mode (with real payments). Example: true - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details.