For the complete documentation index, see llms.txt. This page is also available as Markdown.

Checkout

Create a checkout session

post

Creates a checkout session using a Customer token. After creating the checkout session, redirect the customer to the url returned.

Authorizations
AuthorizationstringRequired

A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.

Header parameters
x-paynow-customer-ipstring · ipv4Optional

The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.

x-paynow-customer-countrycodestringOptional

The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.

Pattern: ^[A-Z]{2}$
Body

Request to create a new checkout session

coupon_idstring · flake-idOptionalExample: 411486491630370816
promo_codesstring[] · nullableOptional

Optional array of promo codes (coupons, gift cards, affiliates) to apply. An invalid promo code will cause an error.

affiliate_codestring · nullableOptional

Optional affiliate code to track referrals. An invalid affiliate code will NOT cause an error.

return_urlstring · nullableOptional

Optional URL to redirect to after successful checkout

cancel_urlstring · nullableOptional

Optional URL to redirect to if checkout is canceled

auto_redirectboolean · nullableOptional

Whether to automatically redirect the customer (return_url must be set)

Responses
200

OK

application/json

Response after creating a checkout session

idstring · flake-idRequiredExample: 411486491630370816
tokenstringRequired

The token for the checkout session

urlstringRequired

The URL to redirect the customer to complete checkout

post/v1/checkouts
POST /v1/checkouts HTTP/1.1
Authorization: Customer TOKEN_HERE
Content-Type: application/json
Accept: */*
Content-Length: 399

{
  "lines": [
    {
      "product_id": "411486491630370816",
      "subscription": null,
      "trial": null,
      "gift_to": {
        "platform": "invalid",
        "id": "76561198152492642"
      },
      "gift_to_customer_id": "411486491630370816",
      "quantity": 1,
      "selected_gameserver_id": "411486491630370816",
      "custom_variables": null
    }
  ],
  "coupon_id": "411486491630370816",
  "promo_codes": [
    "text"
  ],
  "affiliate_code": null,
  "return_url": null,
  "cancel_url": null,
  "auto_redirect": null
}
{
  "id": "411486491630370816",
  "token": "text",
  "url": "text"
}

Last updated

Was this helpful?