Cart

Get cart

get

Retrieves the current customer's shopping cart.

Authorizations
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
200
OK
application/json
get
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,
      "image_url": "text",
      "selected_gameserver_id": "411486491630370816",
      "selected_gameserver": {
        "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
          }
        }
      ]
    }
  ],
  "total": 1,
  "currency": "text"
}

Clear cart

delete

Clears all items from the customer's shopping cart.

Authorizations
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
204
No Content
delete
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
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.

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).

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
204
No Content
put
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
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_redirectbooleanRequired

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

Responses
200
OK
application/json
post
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"
}

Was this helpful?