Cart

Get cart

get

Retrieves the current customer's shopping cart.

Authorizations
AuthorizationstringRequired

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

Query parameters
currencystringOptional

The ISO three-letter lowercase currency code (e.g., usd, eur, gbp) to display prices in. If not provided, the store's default currency will be used.

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}$
Responses
get
/v1/store/cart
GET /v1/store/cart HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
{
  "store_id": "411486491630370816",
  "customer_id": "411486491630370816",
  "lines": [
    {
      "line_key": "text",
      "product_id": "411486491630370816",
      "name": "text",
      "slug": "text",
      "price": 1,
      "quantity": 1,
      "subscription": true,
      "trial": true,
      "image_url": "text",
      "selected_gameserver_id": "411486491630370816",
      "selected_gameserver": {
        "id": "411486491630370816",
        "store_id": "411486491630370816",
        "name": "text",
        "enabled": true
      },
      "pricing": {
        "active_sale": {
          "id": "411486491630370816",
          "name": "Summer Sale",
          "discount_type": "percent",
          "discount_amount": 2000,
          "minimum_order_value": 0,
          "begins_at": "2025-06-01T00:00:00Z",
          "ends_at": "2025-06-30T23:59:59Z"
        },
        "sale_value": 500,
        "vat_rate": {
          "country_code": "CZ",
          "country_name": "Czech Republic",
          "currency": "CZK",
          "vat_abbreviation": "DPH",
          "vat_local_name": "Daň z přidané hodnoty",
          "eu_member_state": true,
          "eservice_rate": 21,
          "percentage": 21
        },
        "regional_pricing": {
          "region_id": "eu",
          "currency": "eur",
          "tax_inclusive": true,
          "base_price": 1799
        },
        "price_original": 1999,
        "price_final": 1499
      },
      "custom_variables": [
        {
          "id": "411486491630370816",
          "name": "text",
          "identifier": "text",
          "description": "text",
          "type": "dropdown",
          "value": "text",
          "options": [
            {
              "name": "text",
              "value": "text",
              "price": 1,
              "is_default": true,
              "sort_order": 1
            }
          ],
          "selected_option": {
            "name": "text",
            "value": "text",
            "price": 1,
            "is_default": true,
            "sort_order": 1
          }
        }
      ],
      "gift_to_customer": {
        "id": "411486491630370816",
        "store_id": "411486491630370816",
        "profile": {
          "id": "text",
          "platform": "steam",
          "name": "text",
          "avatar_url": "text"
        },
        "steam_id": "76561197960287930",
        "steam": {
          "id": "76561197960287930",
          "name": "text",
          "avatar_url": "text"
        },
        "minecraft_uuid": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
        "minecraft": {
          "id": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
          "name": "notch",
          "avatar_url": "text"
        },
        "xbox_xuid": "text",
        "minecraft_platform": "unknown",
        "name": "m0uka",
        "created_at": "2025-11-19T15:40:13.481Z",
        "updated_at": "2025-11-19T15:40:13.481Z",
        "metadata": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      },
      "gift_to_customer_id": "411486491630370816"
    }
  ],
  "total": 1,
  "currency": "text"
}

Clear cart

delete

Clears all items from the customer's shopping cart.

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}$
Responses
delete
/v1/store/cart
DELETE /v1/store/cart HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*

No content

Add product to cart

put

Adds a product to the cart or updates the quantity of an existing product. When increment parameter is "true" or "1", the specified quantity will be added to any existing quantity. Otherwise, the quantity will be set to the specified value, replacing any existing quantity.

Authorizations
AuthorizationstringRequired

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

Query parameters
product_idstring · flake-idRequired

The ID of the product that should be added to the cart.

Example: 411486491630370816
quantityinteger · int32Optional

The quantity to set or increment.

subscriptionstringOptional

Set to either '1' or 'true' to store as a subscription line item.

trialstringOptional

Set to either '1' or 'true' to indicate if the line should be trialed.

gameserver_idstring · flake-idOptional

A game server ID, required if single_game_server_only is enabled for the product.

Example: 411486491630370816
incrementstringOptional

Set to either '1' or 'true' to increment (add quantity instead of setting).

gift_to_customer_idstring · flake-idOptional

The ID of the customer in which this line is a gift for.

Example: 411486491630370816
gift_to.platformstring · enumOptional

The platform type

Example: SteamPossible values:
gift_to.idstringOptional

The account ID on the platform

Example: 76561198152492642
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}$
Responses
put
/v1/store/cart/lines
PUT /v1/store/cart/lines?product_id=411486491630370816 HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*

No content

Create a cart checkout session

post

Creates a checkout session from the contents of the cart. 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 from a cart

coupon_idstring · flake-idOptionalExample: 411486491630370816
affiliate_codestring | nullableOptional

Optional affiliate code to track referrals

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
post
/v1/store/cart/checkout
POST /v1/store/cart/checkout HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 165

{
  "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"
}

Last updated

Was this helpful?