Cart
Authorization: Customer TOKEN.Show fieldsHide fields
linesCartLineDto[]RequiredThe line items in the cart
custom_variablesCartLineCustomVariableDto[]RequiredSelected custom variables for this cart line.
dropdownDropdown selection with predefined options. Customers choose from a list of available options. Allows for additional pricing based on the selected entry.
textFree-form text input. Customers can enter any text value (subject to validation).
numberNumeric input. Customers can enter numeric values (subject to validation).
pricingStorefrontProductPricingDtoRequiredThe pricing details for the product in the storefront.
gift_to_customerStorefrontCustomerDtoOptionalA storefront representation of a customer in the PayNow system with their associated profiles and metadata.
unknownjavabedrock
selected_gameserverStorefrontGameServerDtoOptionalRepresents a simplified view of a game server for storefront display purposes.
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"import { createStorefrontClient } from "@paynow-gg/typescript-sdk";
const paynow = createStorefrontClient({
storeId: "STORE_ID",
customerToken: "CUSTOMER_TOKEN",
});
const result = await paynow.cart.getCart();import requests
headers = {"Authorization": "Customer TOKEN"}
response = requests.get("https://api.paynow.gg/v1/store/cart", headers=headers){
"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
Clears all items from the customer's shopping cart.
Authorization: Customer TOKEN.curl -X DELETE "https://api.paynow.gg/v1/store/cart" \
-H "Authorization: Customer TOKEN"import { createStorefrontClient } from "@paynow-gg/typescript-sdk";
const paynow = createStorefrontClient({
storeId: "STORE_ID",
customerToken: "CUSTOMER_TOKEN",
});
await paynow.cart.clearCart();import requests
headers = {"Authorization": "Customer TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/store/cart", headers=headers)Add product to cart
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.
Authorization: Customer TOKEN.curl -X PUT "https://api.paynow.gg/v1/store/cart/lines?product_id=411486491630370816&gift_to.id=76561198152492642" \
-H "Authorization: Customer TOKEN"import { createStorefrontClient } from "@paynow-gg/typescript-sdk";
const paynow = createStorefrontClient({
storeId: "STORE_ID",
customerToken: "CUSTOMER_TOKEN",
});
await paynow.cart.addLine({
product_id: "411486491630370816",
"gift_to.id": "76561198152492642",
});import requests
headers = {"Authorization": "Customer TOKEN"}
response = requests.put("https://api.paynow.gg/v1/store/cart/lines?product_id=411486491630370816&gift_to.id=76561198152492642", headers=headers)Create a cart checkout session
Creates a checkout session from the contents of the cart. After creating the checkout session, redirect the customer to the `url` returned.
Authorization: Customer TOKEN.Show fieldsHide fields
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
}'import { createStorefrontClient } from "@paynow-gg/typescript-sdk";
const paynow = createStorefrontClient({
storeId: "STORE_ID",
customerToken: "CUSTOMER_TOKEN",
});
const result = await paynow.cart.createCartCheckout({
coupon_id: "411486491630370816",
promo_codes: [
"string",
],
affiliate_code: "string",
return_url: "string",
cancel_url: "string",
auto_redirect: true,
});import requests
headers = {"Authorization": "Customer TOKEN"}
payload = {
"coupon_id": "411486491630370816",
"promo_codes": [
"string",
],
"affiliate_code": "string",
"return_url": "string",
"cancel_url": "string",
"auto_redirect": True,
}
response = requests.post("https://api.paynow.gg/v1/store/cart/checkout", headers=headers, json=payload){
"id": "411486491630370816",
"token": "string",
"url": "string"
}