PayNow

Cart

Get cart

GEThttps://api.paynow.gg/v1/store/cart

Retrieves the current customer's shopping cart.

Headers
AuthorizationCustomer tokenRequired
Authentication token for this request, sent as Authorization: Customer TOKEN.
x-paynow-customer-ipstringOptional
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.
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.
Response
200OKCartDto
Represents a customer's shopping cart
Show fields
currencystringRequired
The currency code (e.g., usd, eur, gbp)
customer_idFlakeIdRequired
linesCartLineDto[]Required
The line items in the cart
custom_variablesCartLineCustomVariableDto[]Required
Selected custom variables for this cart line.
descriptionstringRequired
The description of the custom variable
idFlakeIdRequired
identifierstringRequired
The unique identifier string for the custom variable
namestringRequired
The display name of the custom variable
optionsStorefrontCustomVariableOptionDto[]Required
The collection of available options for this custom variable. Only present for dropdown type
→ StorefrontCustomVariableOptionDto
typeenumRequired
Defines the type of input method for a custom variable.
Possible enum values
  • dropdown

    Dropdown selection with predefined options. Customers choose from a list of available options. Allows for additional pricing based on the selected entry.

  • text

    Free-form text input. Customers can enter any text value (subject to validation).

  • number

    Numeric input. Customers can enter numeric values (subject to validation).

valuestringRequired
The selected value of the custom variable
selected_optionStorefrontCustomVariableOptionDtoOptional
→ StorefrontCustomVariableOptionDto
line_keystringRequired
The unique key for this line item
namestringRequired
The name of the product
priceintegerRequired
The price of the product in the smallest currency unit (e.g., cents)
pricingStorefrontProductPricingDtoRequired
The pricing details for the product in the storefront.
price_finalintegerRequired
The final price of the product after all discounts, in the lowest denominator (e.g. cents).
price_originalintegerRequired
The original price of the product before any discounts, in the lowest denominator (e.g. cents).
active_saleStorefrontSaleDtoOptional
→ StorefrontSaleDto
regional_pricingStorefrontProductRegionalPricingDtoOptional
→ StorefrontProductRegionalPricingDto
sale_valueintegerOptional
The amount of the sale discount in the lowest denominator (e.g. cents).
vat_rateSalesTaxEstimateDtoOptional
→ SalesTaxEstimateDto
product_idFlakeIdRequired
quantityintegerRequired
The quantity of this product in the cart
slugstringRequired
The slug of the product
subscriptionbooleanRequired
Indicates whether this line item should be a subscription
trialbooleanRequired
Indicates whether this line will be trialied by the customer.
gift_to_customerStorefrontCustomerDtoOptional
A storefront representation of a customer in the PayNow system with their associated profiles and metadata.
idFlakeIdRequired
store_idFlakeIdRequired
minecraftStorefrontCustomerMinecraftProfileDtoOptional
→ StorefrontCustomerMinecraftProfileDto
minecraft_platformenumOptional
Possible enum values
  • unknown
  • java
  • bedrock
minecraft_uuidstringOptional
The customer's Minecraft UUID, if they have linked their Minecraft account. Not set for offline Minecraft stores. If the platform type is Minecraft - Geyser, and the profile is a bedrock account, this will be a UUID generated from the Xbox XUID.
namestringOptional
The display name for the customer.
profileCustomerGenericProfileDtoOptional
→ CustomerGenericProfileDto
steamStorefrontCustomerSteamProfileDtoOptional
→ StorefrontCustomerSteamProfileDto
steam_idSteamIdOptional
A 64-bit Steam account identifier. Accepts string or numeric format.
xbox_xuidstringOptional
The customer's Xbox XUID, if available.
gift_to_customer_idFlakeIdOptional
image_urlstringOptional
The URL to the product image
selected_gameserverStorefrontGameServerDtoOptional
Represents a simplified view of a game server for storefront display purposes.
enabledbooleanRequired
Indicates whether the game server is currently enabled.
idFlakeIdRequired
namestringRequired
The display name of the game server.
selected_gameserver_idFlakeIdOptional
store_idFlakeIdRequired
totalintegerRequired
The total price of all items in the cart in the smallest currency unit (e.g., cents)

Failed requests return a PayNowError body. See the error response guide.

curl -X GET "https://api.paynow.gg/v1/store/cart" \
  -H "Authorization: Customer TOKEN"
Response200
{
  "currency": "string",
  "customer_id": "411486491630370816",
  "lines": [
    {
      "custom_variables": [
        {
          "description": "string",
          "id": "411486491630370816",
          "identifier": "string",
          "name": "string",
          "options": [
            {
              "is_default": true,
              "name": "string",
              "price": 0,
              "sort_order": 0,
              "value": "string"
            }
          ],
          "type": "dropdown",
          "value": "string",
          "selected_option": {
            "is_default": true,
            "name": "string",
            "price": 0,
            "sort_order": 0,
            "value": "string"
          }
        }
      ],
      "line_key": "string",
      "name": "string",
      "price": 0,
      "pricing": {
        "price_final": 1499,
        "price_original": 1999,
        "active_sale": {
          "begins_at": "2025-06-01T00:00:00Z",
          "discount_amount": 2000,
          "discount_type": "percent",
          "id": "411486491630370816",
          "minimum_order_value": 0,
          "name": "Summer Sale",
          "version_id": "411486491630370816",
          "ends_at": "2025-06-30T23:59:59Z"
        },
        "sale_value": 500,
        "vat_rate": {
          "country_code": "CZ",
          "country_name": "Czech Republic",
          "currency": "CZK",
          "eservice_rate": 21,
          "eu_member_state": true,
          "percentage": 21,
          "vat_abbreviation": "DPH",
          "vat_local_name": "Daň z přidané hodnoty",
          "tax_number_abbreviation": "string",
          "tax_number_local_name": "string"
        },
        "regional_pricing": {
          "base_price": 1799,
          "currency": "eur",
          "region_id": "eu",
          "tax_inclusive": true
        }
      },
      "product_id": "411486491630370816",
      "quantity": 0,
      "slug": "string",
      "subscription": true,
      "trial": true,
      "image_url": "string",
      "selected_gameserver_id": "411486491630370816",
      "selected_gameserver": {
        "enabled": true,
        "id": "411486491630370816",
        "name": "string"
      },
      "gift_to_customer": {
        "id": "411486491630370816",
        "store_id": "411486491630370816",
        "profile": {
          "id": "string",
          "name": "string",
          "platform": "steam",
          "avatar_url": "string"
        },
        "steam_id": "76561197960287930",
        "steam": {
          "avatar_url": "string",
          "id": "76561197960287930",
          "name": "string"
        },
        "minecraft_uuid": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
        "minecraft": {
          "avatar_url": "string",
          "id": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
          "name": "notch"
        },
        "minecraft_platform": "unknown",
        "xbox_xuid": "string",
        "name": "m0uka"
      },
      "gift_to_customer_id": "411486491630370816"
    }
  ],
  "store_id": "411486491630370816",
  "total": 0
}

Clear cart

DELETEhttps://api.paynow.gg/v1/store/cart

Clears all items from the customer's shopping cart.

Headers
AuthorizationCustomer tokenRequired
Authentication token for this request, sent as Authorization: Customer TOKEN.
x-paynow-customer-ipstringOptional
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.
Response
204No Content

Failed requests return a PayNowError body. See the error response guide.

curl -X DELETE "https://api.paynow.gg/v1/store/cart" \
  -H "Authorization: Customer TOKEN"

Add product to cart

PUThttps://api.paynow.gg/v1/store/cart/lines

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.

Headers
AuthorizationCustomer tokenRequired
Authentication token for this request, sent as Authorization: Customer TOKEN.
x-paynow-customer-ipstringOptional
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.
Query parameters
product_idFlakeIdRequired
The ID of the product that should be added to the cart.
quantityintegerOptional
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_idFlakeIdOptional
A game server ID, required if single_game_server_only is enabled for the product.
incrementstringOptional
Set to either '1' or 'true' to increment (add quantity instead of setting).
custom_variablesobjectOptional
Dictionary of product custom variables where each entry consists of a string key (identifier) and its corresponding selected value. Use the following URL parameter format: ?custom_variables[IDENTIFIER]=VALUE
gift_to_customer_idFlakeIdOptional
The ID of the customer in which this line is a gift for.
gift_to.platformenumOptional
The platform type
gift_to.idstringOptional
The account ID on the platform
Response
204No Content

Failed requests return a PayNowError body. See the error response guide.

curl -X PUT "https://api.paynow.gg/v1/store/cart/lines?product_id=411486491630370816&gift_to.id=76561198152492642" \
  -H "Authorization: Customer TOKEN"

Create a cart checkout session

POSThttps://api.paynow.gg/v1/store/cart/checkout

Creates a checkout session from the contents of the cart. After creating the checkout session, redirect the customer to the `url` returned.

Headers
AuthorizationCustomer tokenRequired
Authentication token for this request, sent as Authorization: Customer TOKEN.
x-paynow-customer-ipstringOptional
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.
Request body
affiliate_codestringOptional
Optional affiliate code to track referrals. An invalid affiliate code will NOT cause an error.
auto_redirectbooleanOptional
Whether to automatically redirect the customer (return_url must be set)
cancel_urlstringOptional
Optional URL to redirect to if checkout is canceled
coupon_idFlakeIdOptional
promo_codesstring[]Optional
Optional array of promo codes (coupons, gift cards, affiliates) to apply. An invalid promo code will cause an error.
return_urlstringOptional
Optional URL to redirect to after successful checkout
Response
200OKCreateCheckoutSessionResponseDto
Response after creating a checkout session
Show fields
idFlakeIdRequired
tokenstringRequired
The token for the checkout session
urlstringRequired
The URL to redirect the customer to complete checkout

Failed requests return a PayNowError body. See the error response guide.

curl -X POST "https://api.paynow.gg/v1/store/cart/checkout" \
  -H "Authorization: Customer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "coupon_id": "411486491630370816",
  "promo_codes": [
    "string"
  ],
  "affiliate_code": "string",
  "return_url": "string",
  "cancel_url": "string",
  "auto_redirect": true
}'
Response200
{
  "id": "411486491630370816",
  "token": "string",
  "url": "string"
}