# Introduction

Welcome to the official PayNow API documentation!

PayNow is still in beta and all features/implementations are subject to change. To stay up to date, join the official PayNow [discord](https://discord.gg/eU55zFdxvN).<br>

## Getting Started

There are two sets of routes for PayNow. The first set includes the management routes, which let you manage your store remotely (create products, customers, etc.). The second group includes the storefront routes, which allows your customers access the data for your store from your custom store implementation.

To get started with the management API, create a new API Key in your [dashboard](https://dashboard.paynow.gg/api-keys).

[How to use your API key](/getting-started/types-of-authentication#api-key)

To get started with the storefront API, create a new customer token in your [dashboard](https://dashboard.paynow.gg/customers).

[How to use your Customer's token](/getting-started/types-of-authentication#customer)

***

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>StoreFront API</td><td><a href="/pages/cgF7cCrcEctjmKMmkxek">/pages/cgF7cCrcEctjmKMmkxek</a></td></tr><tr><td>Management API</td><td><a href="/pages/IYGi5opRwHKRGtbYJu9X">/pages/IYGi5opRwHKRGtbYJu9X</a></td></tr><tr><td>Webhooks</td><td></td></tr><tr><td>Hosted Webstores</td><td></td></tr></tbody></table>


# Overview

The PayNow API can be used both from a store management perspective, as well as a customer's perspective.

In order to support the different types of actors in our system, we have developed the following types of authentication:

#### API Key

API keys are used to automate the management of a [store](/management/management-api). Whether it's pulling metrics, editing products, or generating customer tokens, API key are the correct way to modify a store and its entities in a headless manner.

API keys can be created in the [API Keys section on the dashboard](https://dashboard.paynow.gg/api-keys).

API keys can only be managed by a user.

#### Customer

[Customers](https://docs.paynow.gg/api/customer) are the users of a store. Customer tokens can generated with an [API request](https://docs.paynow.gg/api/customer#create-customer-token) by a [User](https://docs.paynow.gg/api/user) or API Key. These tokens allow a customer to access the resources of store they belong to, and manage their own customer account.

Customer tokens can be used from anywhere on the internet. Whether it's your own website, your backend server, or from a game plugin, the customer token is the correct way to perform actions on behalf of a customer.

Customer tokens can be created in the [customer section on the dashboard](https://dashboard.paynow.gg/customers). Select a customer and then click "Create token".

[Read more about customer tokens](https://docs.paynow.gg/api/customer#customer-tokens)

#### Game Server

[Game Servers](https://docs.paynow.gg/api/gameserver) represent the individual servers that you host. Game Server tokens can be generated with an API request by a [User](https://docs.paynow.gg/api/user) or API Key.

These are more restricted than API Keys because they can only access certain routes responsible for processing commands in-game.

Game Server tokens can be found in the [game server section on the dashboard](https://dashboard.paynow.gg/gameservers). Select a game server to see the token.

#### User

[Users](https://docs.paynow.gg/api/user) are human users who are allowed to create and manage stores on the [dashboard](https://dashboard.paynow.gg/).


# Management vs Storefront APIs

The PayNow API can be divided into two groups of routes: **Management** and **Storefront**. The Management API is used for store management and can be accessed by Users and API keys. This API allows you to perform actions like [updating products](https://docs.paynow.gg/management/management-api/products), [creating coupons](https://docs.paynow.gg/management/management-api/coupons), and [managing customer items](https://docs.paynow.gg/management/management-api/delivery).

On the other hand, Storefront API is intended for customer use, and provides a different representation of the same resources available in the Management API. For example, the Storefront API lets you [display products](https://docs.paynow.gg/storefront-headless/storefront-api/products) to customers and keep track of [items in their cart](https://docs.paynow.gg/storefront-headless/storefront-api/cart). You can use the Storefront API from any location on the internet, such as your custom domain or a plugin on your game server or other application.


# Types of Authentication

The PayNow API can be used both from a store management perspective, as well as a customer's perspective.

In order to support the different types of actors in our system, we have developed the following types of authentication:

#### API Key

API keys are used to automate the management of a [store](broken://pages/653e0236f71d90d773682a75a5eaff532b66d6f7). Whether it's pulling metrics, editing products, or generating customer tokens, API key are the correct way to modify a store and its entities in a headless manner.

API keys can be created in the [API Keys section on the dashboard](https://dashboard.paynow.gg/api-keys).

API keys can only be managed by a user.

#### Customer

[Customers](/management/management-api/customers) are the users of a store. Customer tokens can generated with an [API request](/management/management-api/customers#post-v1-stores-storeid-customers-customerid-tokens) by a [User](https://docs.paynow.gg/api/user) or API Key. These tokens allow a customer to access the resources of store they belong to, and manage their own customer account.

Customer tokens can be used from anywhere on the internet. Whether it's your own website, your backend server, or from a game plugin, the customer token is the correct way to perform actions on behalf of a customer.

Customer tokens can be created in the [customer section on the dashboard](https://dashboard.paynow.gg/customers). Select a customer and then click "Create token".

[Read more about customer tokens](/getting-started/types-of-authentication#customer)

#### Game Server

[Game Servers](https://docs.paynow.gg/api/gameserver) represent the individual servers that you host. Game Server tokens can be generated with an API request by a [User](https://docs.paynow.gg/api/user) or API Key.

These are more restricted than API Keys because they can only access certain routes responsible for processing commands in-game.

Game Server tokens can be found in the [game server section on the dashboard](https://dashboard.paynow.gg/gameservers). Select a game server to see the token.

#### User

[Users](https://docs.paynow.gg/api/user) are human users who are allowed to create and manage stores on the [dashboard](https://dashboard.paynow.gg/).


# Authentication

PayNow's API is reachable by an HTTPS/REST gateway for serving requests using JSON.

#### Base URL

```yaml
https://api.paynow.gg/v1
```

***

\
Authentication is provided with the `Authorization` HTTP header in the format `Authorization: AUTH_PREFIX TOKEN`.

| Auth Type   | Auth Prefix  |
| ----------- | ------------ |
| API Key     | `apikey`     |
| Customer    | `customer`   |
| Game Server | `gameserver` |

*Auth prefixes are case insensitive.*

Example headers for the different types of authentication:

```yaml
Authorization: apikey pnapi_v1_BRaqcrwTqptneZTsxUJKVPH1L9y14HZBae18vybzhVwT
```

```yaml
Authorization: customer yArTi2CZekPCHyxjetxUfRnUMANF5hXBxHyDrf3Nia38gGtfJCqa1EJYReqDPUaaV1UNN1U
```

```yaml
Authorization: gameserver J7273cAJT7s3cP5WdSjJPtVCsLXK3bVfVPJimTX2YDT4
```

<br>


# Flake IDs

PayNow uses [Snowflake IDs](https://en.wikipedia.org/wiki/Snowflake_ID) (shorted to "flake" in our system) for everything that requires a unique identifier. These IDs are unique across the entire system.

Because our implementation uses signed 64-bit integers (`int64`), they are always returned as a strings in our API to prevent overflows in inferior languages. In our documentation we label ID fields with the `flake` type. When calling routes that expect a `flake`, you should always send it in string form.

#### Flake ID in Binary

```
sign  timestamp                                  node       increment
0     11111111111111111111111111111111111111111  1111111111 111111111111
64    63                                         22         12          0
```

#### PayNow Epoch

The timestamp component is offset by an epoch.

```yaml
Unix ms: 1645568542000
ISO8601: 2022-02-22T22:22:22.000Z
```

Convert ID to time:

```go
TimeFromUnixMillis((id >> 22) + epoch)
```


# Error Response

#### Fields

* `status` <sup><sub>integer<sub></sup>

  the HTTP status code for this error
* `code` <sup><sub>string<sub></sup>

  the type of error
* `message` <sup><sub>string<sub></sup>

  the error's message
* `errors` [<sup><sub>validation error<sub></sup>](#validation-error-structure) <sup><sub><mark style="color:yellow;">NULLABLE<mark style="color:yellow;"><sub></sup>

  list of validation errors, only used for certain APIs

{% code title="Example Error Response" fullWidth="false" %}

```json
{
	"status": 400,
	"code": "InvalidInput",
	"message": "cannot parse Steam ID from string: clearlynotasteamid"
}
```

{% endcode %}

### Validation Error Structure <a href="#validation-error-structure" id="validation-error-structure"></a>

#### Fields

* `code` <sup><sub>string<sub></sup>

  the type of error
* `message` <sup><sub>string<sub></sup>

  the error's message
* `path` <sup><sub>string array<sub></sup>

  path to property that caused the error
* `validation` <sup><sub>string<sub></sup>

  type of validation error

#### Note

In catastrophic cases, you might not get any of these values in response. This is however unlikely.


# Storefront API


# Cart

## Get cart

> Retrieves the current customer's shopping cart.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"cart"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"CartDto":{"required":["currency","customer_id","lines","store_id","total"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/CartLineDto"},"description":"The line items in the cart"},"total":{"type":"integer","description":"The total price of all items in the cart in the smallest currency unit (e.g., cents)","format":"int64"},"currency":{"type":"string","description":"The currency code (e.g., usd, eur, gbp)"}},"additionalProperties":false,"description":"Represents a customer's shopping cart"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CartLineDto":{"required":["custom_variables","line_key","name","price","pricing","product_id","quantity","slug","subscription","trial"],"type":"object","properties":{"line_key":{"type":"string","description":"The unique key for this line item"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The slug of the product"},"price":{"type":"integer","description":"The price of the product in the smallest currency unit (e.g., cents)","format":"int64"},"quantity":{"type":"integer","description":"The quantity of this product in the cart","format":"int32"},"subscription":{"type":"boolean","description":"Indicates whether this line item should be a subscription"},"trial":{"type":"boolean","description":"Indicates whether this line will be trialied by the customer."},"image_url":{"type":["null","string"],"description":"The URL to the product image"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver":{"$ref":"#/components/schemas/StorefrontGameServerDto"},"pricing":{"$ref":"#/components/schemas/StorefrontProductPricingDto"},"custom_variables":{"type":"array","items":{"$ref":"#/components/schemas/CartLineCustomVariableDto"},"description":"Selected custom variables for this cart line."},"gift_to_customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents a line item in a cart"},"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"StorefrontProductPricingDto":{"required":["price_final","price_original"],"type":"object","properties":{"active_sale":{"$ref":"#/components/schemas/StorefrontSaleDto"},"sale_value":{"type":["null","integer"],"description":"The amount of the sale discount in the lowest denominator (e.g. cents).","format":"int64"},"vat_rate":{"$ref":"#/components/schemas/SalesTaxEstimateDto"},"regional_pricing":{"$ref":"#/components/schemas/StorefrontProductRegionalPricingDto"},"price_original":{"type":"integer","description":"The original price of the product before any discounts, in the lowest denominator (e.g. cents).","format":"int64"},"price_final":{"type":"integer","description":"The final price of the product after all discounts, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"The pricing details for the product in the storefront."},"StorefrontSaleDto":{"required":["begins_at","discount_amount","discount_type","id","minimum_order_value","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The amount of the discount, either as a percentage in permille or as an absolute value in cents.","format":"int64"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).","format":"int64"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends, if applicable.","format":"date-time"}},"additionalProperties":false},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SalesTaxEstimateDto":{"required":["country_code","country_name","currency","eservice_rate","eu_member_state","percentage","vat_abbreviation","vat_local_name"],"type":"object","properties":{"country_code":{"type":"string","description":"The ISO country code."},"country_name":{"type":"string","description":"The full name of the country."},"currency":{"type":"string","description":"The local currency used in the country."},"vat_abbreviation":{"type":"string","description":"The abbreviation of the tax term in the local language.","readOnly":true},"vat_local_name":{"type":"string","description":"The full name of the tax term in the local language.","readOnly":true},"tax_number_abbreviation":{"type":["null","string"],"description":"The abbreviation of the local tax identification number."},"tax_number_local_name":{"type":["null","string"],"description":"The name of the local tax identification number."},"eu_member_state":{"type":"boolean","description":"Indicates whether the country is a member of the European Union."},"eservice_rate":{"type":"number","description":"The tax rate applicable for electronic services, as a percentage.","format":"double"},"percentage":{"type":"number","description":"The VAT rate (synonym for EServiceRate).","format":"double","readOnly":true}},"additionalProperties":false,"description":"The Sales Tax estimation for the passed in customer country / IP.\nInclude the tax percentage + abbreviation in your product view to inform your customers about the tax."},"StorefrontProductRegionalPricingDto":{"required":["base_price","currency","region_id","tax_inclusive"],"type":"object","properties":{"region_id":{"type":"string","description":"The identifier for the region."},"currency":{"type":"string","description":"The currency code used in the region."},"tax_inclusive":{"type":"boolean","description":"Indicates whether the base price includes tax."},"base_price":{"type":"integer","description":"The base price in the regional currency, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"Regional pricing information for this product.\nOnly present if there is a regional pricing configured."},"CartLineCustomVariableDto":{"required":["description","id","identifier","name","options","type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the custom variable"},"identifier":{"type":"string","description":"The unique identifier string for the custom variable"},"description":{"type":"string","description":"The description of the custom variable"},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value":{"type":"string","description":"The selected value of the custom variable"},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"},"description":"The collection of available options for this custom variable. Only present for dropdown type"},"selected_option":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/cart":{"get":{"tags":["cart"],"summary":"Get cart","description":"Retrieves the current customer's shopping cart.","operationId":"StorefrontCart_GetCart","parameters":[{"name":"currency","in":"query","description":"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.","schema":{"type":"string"}},{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Clear cart

> Clears all items from the customer's shopping cart.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"cart"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/cart":{"delete":{"tags":["cart"],"summary":"Clear cart","description":"Clears all items from the customer's shopping cart.","operationId":"StorefrontCart_ClearCart","parameters":[{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

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

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"cart"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/cart/lines":{"put":{"tags":["cart"],"summary":"Add product to cart","description":"Adds a product to the cart or updates the quantity of an existing product.\nWhen increment parameter is \"true\" or \"1\", the specified quantity will be added to any existing quantity.\nOtherwise, the quantity will be set to the specified value, replacing any existing quantity.","operationId":"StorefrontCart_AddLine","parameters":[{"name":"product_id","in":"query","description":"The ID of the product that should be added to the cart.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"quantity","in":"query","description":"The quantity to set or increment.","schema":{"type":"integer","format":"int32"}},{"name":"subscription","in":"query","description":"Set to either '1' or 'true' to store as a subscription line item.","schema":{"type":"string"}},{"name":"trial","in":"query","description":"Set to either '1' or 'true' to indicate if the line should be trialed.","schema":{"type":"string"}},{"name":"gameserver_id","in":"query","description":"A game server ID, required if single_game_server_only is enabled for the product.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"increment","in":"query","description":"Set to either '1' or 'true' to increment (add quantity instead of setting).","schema":{"type":"string"}},{"name":"custom_variables","in":"query","description":"Dictionary of product custom variables where each entry consists of a string key (identifier) \nand its corresponding selected value. Use the following URL parameter format: \n?custom_variables[IDENTIFIER]=VALUE","style":"deepObject","schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"gift_to_customer_id","in":"query","description":"The ID of the customer in which this line is a gift for.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gift_to.platform","in":"query","description":"The platform type","schema":{"$ref":"#/components/schemas/CustomerProfilePlatform"}},{"name":"gift_to.id","in":"query","description":"The account ID on the platform","schema":{"type":"string"}},{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

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

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"cart"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"CreateCartCheckoutSessionDto":{"type":"object","properties":{"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"promo_codes":{"type":["null","array"],"items":{"type":"string"},"description":"Optional array of promo codes (coupons, gift cards, affiliates) to apply.\nAn invalid promo code will cause an error."},"affiliate_code":{"type":["null","string"],"description":"Optional affiliate code to track referrals.\nAn invalid affiliate code will NOT cause an error."},"return_url":{"type":["null","string"],"description":"Optional URL to redirect to after successful checkout"},"cancel_url":{"type":["null","string"],"description":"Optional URL to redirect to if checkout is canceled"},"auto_redirect":{"type":["null","boolean"],"description":"Whether to automatically redirect the customer (return_url must be set)"}},"additionalProperties":false,"description":"Request to create a new checkout session from a cart"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateCheckoutSessionResponseDto":{"required":["id","token","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"token":{"type":"string","description":"The token for the checkout session"},"url":{"type":"string","description":"The URL to redirect the customer to complete checkout"}},"additionalProperties":false,"description":"Response after creating a checkout session"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/cart/checkout":{"post":{"tags":["cart"],"summary":"Create a cart checkout session","description":"Creates a checkout session from the contents of the cart.\nAfter creating the checkout session, redirect the customer to the `url` returned.","operationId":"StorefrontCart_CreateCartCheckout","parameters":[{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCartCheckoutSessionDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateCartCheckoutSessionDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateCartCheckoutSessionDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Checkout

## Create a checkout session

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

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"checkout"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"CreateCheckoutSessionRequestDto":{"required":["lines"],"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/CreateCheckoutSessionLineDto"},"description":"The line items to include in the checkout."},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"promo_codes":{"type":["null","array"],"items":{"type":"string"},"description":"Optional array of promo codes (coupons, gift cards, affiliates) to apply.\nAn invalid promo code will cause an error."},"affiliate_code":{"type":["null","string"],"description":"Optional affiliate code to track referrals.\nAn invalid affiliate code will NOT cause an error."},"return_url":{"type":["null","string"],"description":"Optional URL to redirect to after successful checkout"},"cancel_url":{"type":["null","string"],"description":"Optional URL to redirect to if checkout is canceled"},"auto_redirect":{"type":["null","boolean"],"description":"Whether to automatically redirect the customer (return_url must be set)"}},"additionalProperties":false,"description":"Request to create a new checkout session"},"CreateCheckoutSessionLineDto":{"required":["product_id","quantity"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"subscription":{"type":["null","boolean"],"description":"Determines whether this line should create a subscription"},"trial":{"type":["null","boolean"],"description":"Indicates whether the product should be trialed"},"gift_to":{"$ref":"#/components/schemas/CustomerPlatformAccountDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":"integer","description":"The quantity of this product to purchase","format":"int32"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Key-value pair mapping custom variable identifiers to their selected values.\nRequired only when the product includes custom variables."}},"additionalProperties":false,"description":"Represents a line item in a checkout session request"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"},"CreateCheckoutSessionResponseDto":{"required":["id","token","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"token":{"type":"string","description":"The token for the checkout session"},"url":{"type":"string","description":"The URL to redirect the customer to complete checkout"}},"additionalProperties":false,"description":"Response after creating a checkout session"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/checkouts":{"post":{"tags":["checkout"],"summary":"Create a checkout session","description":"Creates a checkout session using a Customer token.\nAfter creating the checkout session, redirect the customer to the `url` returned.","operationId":"StorefrontCheckout_CreateCheckoutSession","parameters":[{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Customer

## Authenticate customer

> Creates a customer and returns a customer token from a platform account.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"customer"}],"paths":{"/v1/store/customer/auth":{"post":{"tags":["customer"],"summary":"Authenticate customer","description":"Creates a customer and returns a customer token from a platform account.","operationId":"StorefrontAuth_AuthenticateStorefrontCustomer","parameters":[{"name":"x-paynow-store-id","in":"header","description":"PayNow Store Identifier (Store ID) available in Store Settings","required":true,"schema":{"type":"string","format":"flake-id"}},{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticateStorefrontCustomerRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/AuthenticateStorefrontCustomerRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/AuthenticateStorefrontCustomerRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticateStorefrontCustomerResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}},"components":{"schemas":{"AuthenticateStorefrontCustomerRequestDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"},"AuthenticateStorefrontCustomerResponseDto":{"required":["customer_token"],"type":"object","properties":{"customer_token":{"type":"string","description":"The token for the Customer"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## Get current customer

> Retrieves the current customer from the passed Customer token.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"customer"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/customer":{"get":{"tags":["customer"],"summary":"Get current customer","description":"Retrieves the current customer from the passed Customer token.","operationId":"StorefrontCustomer_GetStorefrontCustomer","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/store/customer/giftcards/lookup/{code}

> Lookup a gift card by the code

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"customer"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"StorefrontGiftCardDto":{"required":["balance","code","starting_balance"],"type":"object","properties":{"code":{"type":"string"},"balance":{"type":"integer","format":"int32"},"starting_balance":{"type":"integer","format":"int32"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/customer/giftcards/lookup/{code}":{"get":{"tags":["customer"],"summary":"Lookup a gift card by the code","operationId":"StorefrontCustomer_GetStorefrontGiftCard","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontGiftCardDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Delivery

## Get the customers delivery items

> Retrieves the current customers delivery items.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorefrontDeliveryItemDto":{"required":["added_at","customer_id","expirable","gift","id","product","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/customer/delivery/items":{"get":{"tags":["delivery"],"summary":"Get the customers delivery items","description":"Retrieves the current customers delivery items.","operationId":"StorefrontCustomerDelivery_GetStorefrontCustomerDeliveryItems","parameters":[{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontDeliveryItemDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Discord

## GET /v1/stores/{storeId}/product\_versions/discord\_actions

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"discord"}],"security":[{},{"Customer":[],"APIKey":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/product_versions/discord_actions":{"get":{"tags":["discord"],"operationId":"ProductsDiscord_DoProductsHaveDiscordActions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"product_version_id","in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Navlinks

## Get navlinks

> Retrieves the store's navlink structure used for navigation.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"navlinks"}],"security":[{},{"Customer":[],"APIKey":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"StorefrontNavLinkDto":{"required":["children","name","node_id","order","tag_id","tag_query","tag_slug"],"type":"object","properties":{"node_id":{"type":"string","description":"The unique identifier for this navigation node in the navigation tree."},"parent_node_id":{"type":["null","string"],"description":"The identifier of the parent navigation node, if this is a child node."},"tag_id":{"$ref":"#/components/schemas/FlakeId"},"tag_slug":{"type":"string","description":"The URL-friendly slug for the tag associated with this navigation link."},"tag_query":{"type":"array","items":{"type":"string"},"description":"A list containing all parent tags and this node's tag, representing the complete path in the tag hierarchy."},"name":{"type":"string","description":"The display name of the associated tag shown to users in the UI."},"order":{"type":"integer","description":"The display order of this navigation link relative to its siblings.","format":"int32"},"children":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontNavLinkDto"},"description":"The collection of child navigation links that appear beneath this link in the hierarchy."}},"additionalProperties":false,"description":"Represents a navigation link in the storefront's hierarchical navigation structure."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/navlinks":{"get":{"tags":["navlinks"],"summary":"Get navlinks","description":"Retrieves the store's navlink structure used for navigation.","operationId":"StorefrontNavLinks_GetStorefrontNavLinks","parameters":[{"name":"x-paynow-store-id","in":"header","description":"PayNow Store Identifier (Store ID) available in Store Settings","required":true,"schema":{"type":"string","format":"flake-id"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontNavLinkDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Orders

## Get orders

> Retrieves all orders for the specified customer token.\
> {% hint style="warning" %}\
> This endpoint is only available for stores that use Steam based authentication.\
> {% endhint %}

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"orders"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorefrontOrderDto":{"required":["currency","customer","customer_id","discount_amount","discount_amount_str","giftcard_usage_amount","giftcard_usage_amount_str","id","is_subscription","lines","presentment_currency","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","total_amount","total_amount_str","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the order.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"status":{"$ref":"#/components/schemas/OrderStatus"},"type":{"$ref":"#/components/schemas/OrderType"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"is_subscription":{"type":"boolean","description":"Indicates whether this order is a subscription order."},"currency":{"type":"string","description":"Currency code used for this order."},"discount_amount":{"type":"integer","description":"The total discount amount applied to this order in smallest currency unit","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order in smallest currency unit","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order in smallest currency unit","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order in smallest currency unit","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card value used for this order in smallest currency unit","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"presentment_currency":{"type":"string","description":"The presentment currency code used for this order (currency shown to customer)"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount in smallest currency unit","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount in smallest currency unit","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount in the smallest currency unit","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount in smallest currency unit","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount in the smallest currency unit","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the billing cycle, if this order is associated with a subscription.","format":"int32"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontOrderLineDto"},"description":"Line items associated with this order."},"created_at":{"type":["null","string"],"description":"Date and time when the order was created.","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Date and time when the order was completed.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the order was canceled.","format":"date-time"}},"additionalProperties":false,"description":"Data transfer object representing a store order."},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"OrderStatus":{"enum":["created","completed","canceled","refunded","chargeback"],"type":"string"},"OrderType":{"enum":["one_time","subscription_initial","subscription_renewal","subscription_proration","mixed"],"type":"string","description":"Defines the type of items contained in an order"},"StorefrontOrderLineDto":{"required":["checkout_line_id","discount_amount","discount_amount_str","gift","giftcard_usage_amount","giftcard_usage_amount_str","id","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","price","price_str","product_id","product_image_url","product_name","product_version_id","quantity","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this order line."},"product_image_url":{"type":"string","description":"URL for the product image."},"subscription_interval_value":{"type":["null","integer"],"description":"Numeric value of the subscription billing interval, if this line is a subscription.","format":"int32"},"subscription_interval_scale":{"type":["null","string"],"description":"Scale of the subscription billing interval (e.g., \"day\", \"month\", \"year\"), if applicable."},"gift":{"type":"boolean","description":"Indicates whether this order line is a gift to another customer."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"price":{"type":"integer","description":"The unit price of the product in the smallest currency unit (e.g., cents)","format":"int32"},"price_str":{"type":"string","description":"The unit price of the product formatted as a string"},"quantity":{"type":"integer","description":"The quantity of the product in this order line","format":"int32"},"discount_amount":{"type":"integer","description":"The discount amount (from sales, coupons, and affiliate links) applied to this order line","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card used for this order line","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order line","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order line","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order line","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount for this order line","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount for this order line","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount for this order line","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount for this order line","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount for this order line","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price, or added on top"},"pricing_region_id":{"type":["null","string"],"description":"The regional pricing region ID for this order line, null if no regional pricing set"},"custom_variables":{"type":["null","object"],"additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Key-value pair of selected custom variables for this order."}},"additionalProperties":false,"description":"Represents a line item within an order."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/customer/orders":{"get":{"tags":["orders"],"summary":"Get orders","description":"Retrieves all orders for the specified customer token.\n{% hint style=\"warning\" %}\nThis endpoint is only available for stores that use Steam based authentication.\n{% endhint %}","operationId":"StorefrontOrders_GetOrders","parameters":[{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontOrderDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get order by ID

> Retrieves an order by its ID for the specified customer token.\
> {% hint style="warning" %}\
> This endpoint is only available for stores that use Steam based authentication.\
> {% endhint %}

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"orders"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorefrontOrderDto":{"required":["currency","customer","customer_id","discount_amount","discount_amount_str","giftcard_usage_amount","giftcard_usage_amount_str","id","is_subscription","lines","presentment_currency","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","total_amount","total_amount_str","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the order.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"status":{"$ref":"#/components/schemas/OrderStatus"},"type":{"$ref":"#/components/schemas/OrderType"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"is_subscription":{"type":"boolean","description":"Indicates whether this order is a subscription order."},"currency":{"type":"string","description":"Currency code used for this order."},"discount_amount":{"type":"integer","description":"The total discount amount applied to this order in smallest currency unit","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order in smallest currency unit","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order in smallest currency unit","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order in smallest currency unit","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card value used for this order in smallest currency unit","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"presentment_currency":{"type":"string","description":"The presentment currency code used for this order (currency shown to customer)"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount in smallest currency unit","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount in smallest currency unit","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount in the smallest currency unit","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount in smallest currency unit","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount in the smallest currency unit","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the billing cycle, if this order is associated with a subscription.","format":"int32"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontOrderLineDto"},"description":"Line items associated with this order."},"created_at":{"type":["null","string"],"description":"Date and time when the order was created.","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Date and time when the order was completed.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the order was canceled.","format":"date-time"}},"additionalProperties":false,"description":"Data transfer object representing a store order."},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"OrderStatus":{"enum":["created","completed","canceled","refunded","chargeback"],"type":"string"},"OrderType":{"enum":["one_time","subscription_initial","subscription_renewal","subscription_proration","mixed"],"type":"string","description":"Defines the type of items contained in an order"},"StorefrontOrderLineDto":{"required":["checkout_line_id","discount_amount","discount_amount_str","gift","giftcard_usage_amount","giftcard_usage_amount_str","id","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","price","price_str","product_id","product_image_url","product_name","product_version_id","quantity","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this order line."},"product_image_url":{"type":"string","description":"URL for the product image."},"subscription_interval_value":{"type":["null","integer"],"description":"Numeric value of the subscription billing interval, if this line is a subscription.","format":"int32"},"subscription_interval_scale":{"type":["null","string"],"description":"Scale of the subscription billing interval (e.g., \"day\", \"month\", \"year\"), if applicable."},"gift":{"type":"boolean","description":"Indicates whether this order line is a gift to another customer."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"price":{"type":"integer","description":"The unit price of the product in the smallest currency unit (e.g., cents)","format":"int32"},"price_str":{"type":"string","description":"The unit price of the product formatted as a string"},"quantity":{"type":"integer","description":"The quantity of the product in this order line","format":"int32"},"discount_amount":{"type":"integer","description":"The discount amount (from sales, coupons, and affiliate links) applied to this order line","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card used for this order line","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order line","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order line","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order line","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount for this order line","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount for this order line","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount for this order line","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount for this order line","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount for this order line","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price, or added on top"},"pricing_region_id":{"type":["null","string"],"description":"The regional pricing region ID for this order line, null if no regional pricing set"},"custom_variables":{"type":["null","object"],"additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Key-value pair of selected custom variables for this order."}},"additionalProperties":false,"description":"Represents a line item within an order."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/customer/orders/{orderId}":{"get":{"tags":["orders"],"summary":"Get order by ID","description":"Retrieves an order by its ID for the specified customer token.\n{% hint style=\"warning\" %}\nThis endpoint is only available for stores that use Steam based authentication.\n{% endhint %}","operationId":"StorefrontOrders_GetOrderById","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontOrderDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Products

## Get products

> Retrieves the available products. To make sure all VAT rates are properly displayed, pass in the IP headers as instructed.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"products"}],"security":[{},{"Customer":[],"APIKey":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"StorefrontProductDto":{"required":["allow_one_time_purchase","allow_subscription","currency","custom_variables","description","gameservers","hidden","id","is_affiliate_links_disabled","is_coupons_disabled","is_gift_cards_disabled","is_gifting_disabled","name","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","single_game_server_only","slug","sort_order","store_id","subscription_interval_scale","subscription_interval_value","tags","trial","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"label":{"type":["null","string"],"description":"The display label for the product."},"hidden":{"type":"boolean","description":"Indicates if the product is hidden."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"currency":{"type":"string","description":"The ISO three-letter lowercase currency code (e.g., usd, eur, gbp) the product is denominated in."},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"is_gifting_disabled":{"type":"boolean","description":"Indicates whether gifting is disabled for this product."},"is_gift_cards_disabled":{"type":"boolean","description":"Indicates whether gift cards are disabled entirely for the product."},"is_coupons_disabled":{"type":"boolean","description":"Indicates whether coupons are disabled entirely for the product."},"is_affiliate_links_disabled":{"type":"boolean","description":"Indicates whether affiliate links are disabled entirely for the product."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"pricing":{"$ref":"#/components/schemas/StorefrontProductPricingDto"},"stock":{"$ref":"#/components/schemas/StorefrontProductStockDto"},"trial":{"$ref":"#/components/schemas/StorefrontProductTrialDto"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontGameServerDto"},"description":"The game servers associated with the product."},"custom_variables":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableDto"},"description":"Custom Variables associated with the product."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"},"active_tier_group":{"$ref":"#/components/schemas/CustomerTierGroupDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"StorefrontProductPricingDto":{"required":["price_final","price_original"],"type":"object","properties":{"active_sale":{"$ref":"#/components/schemas/StorefrontSaleDto"},"sale_value":{"type":["null","integer"],"description":"The amount of the sale discount in the lowest denominator (e.g. cents).","format":"int64"},"vat_rate":{"$ref":"#/components/schemas/SalesTaxEstimateDto"},"regional_pricing":{"$ref":"#/components/schemas/StorefrontProductRegionalPricingDto"},"price_original":{"type":"integer","description":"The original price of the product before any discounts, in the lowest denominator (e.g. cents).","format":"int64"},"price_final":{"type":"integer","description":"The final price of the product after all discounts, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"The pricing details for the product in the storefront."},"StorefrontSaleDto":{"required":["begins_at","discount_amount","discount_type","id","minimum_order_value","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The amount of the discount, either as a percentage in permille or as an absolute value in cents.","format":"int64"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).","format":"int64"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends, if applicable.","format":"date-time"}},"additionalProperties":false},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SalesTaxEstimateDto":{"required":["country_code","country_name","currency","eservice_rate","eu_member_state","percentage","vat_abbreviation","vat_local_name"],"type":"object","properties":{"country_code":{"type":"string","description":"The ISO country code."},"country_name":{"type":"string","description":"The full name of the country."},"currency":{"type":"string","description":"The local currency used in the country."},"vat_abbreviation":{"type":"string","description":"The abbreviation of the tax term in the local language.","readOnly":true},"vat_local_name":{"type":"string","description":"The full name of the tax term in the local language.","readOnly":true},"tax_number_abbreviation":{"type":["null","string"],"description":"The abbreviation of the local tax identification number."},"tax_number_local_name":{"type":["null","string"],"description":"The name of the local tax identification number."},"eu_member_state":{"type":"boolean","description":"Indicates whether the country is a member of the European Union."},"eservice_rate":{"type":"number","description":"The tax rate applicable for electronic services, as a percentage.","format":"double"},"percentage":{"type":"number","description":"The VAT rate (synonym for EServiceRate).","format":"double","readOnly":true}},"additionalProperties":false,"description":"The Sales Tax estimation for the passed in customer country / IP.\nInclude the tax percentage + abbreviation in your product view to inform your customers about the tax."},"StorefrontProductRegionalPricingDto":{"required":["base_price","currency","region_id","tax_inclusive"],"type":"object","properties":{"region_id":{"type":"string","description":"The identifier for the region."},"currency":{"type":"string","description":"The currency code used in the region."},"tax_inclusive":{"type":"boolean","description":"Indicates whether the base price includes tax."},"base_price":{"type":"integer","description":"The base price in the regional currency, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"Regional pricing information for this product.\nOnly present if there is a regional pricing configured."},"StorefrontProductStockDto":{"required":["available_to_purchase","customer_available"],"type":"object","properties":{"available_to_purchase":{"type":"boolean","description":"Indicates whether the product is currently available for purchase (there is available stock)."},"customer_available":{"type":"integer","description":"The number of items available for the customer to purchase (customer stock limit remaining).","format":"int32"}},"additionalProperties":false,"description":"The stock status information for the product in the storefront."},"StorefrontProductTrialDto":{"required":["eligible","enabled","period_scale","period_value"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether the trial period is enabled for this product."},"eligible":{"type":"boolean","description":"Indicates whether the customer is eligible for the trial period."},"period_value":{"type":"integer","description":"The duration value of the trial period.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"StorefrontCustomVariableDto":{"required":["description","identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"CustomerTierGroupDto":{"required":["active_product_id","currency","next_billing_amount","next_billing_presentment_amount","next_renewal_at","presentment_currency","tier_group_id"],"type":"object","properties":{"tier_group_id":{"$ref":"#/components/schemas/FlakeId"},"active_product_id":{"$ref":"#/components/schemas/FlakeId"},"pending_change_product_id":{"$ref":"#/components/schemas/FlakeId"},"next_renewal_at":{"type":"string","description":"The date and time of the next subscription renewal for this tier group.","format":"date-time"},"next_billing_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the settlement currency.","format":"int64"},"next_billing_presentment_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the customer-facing presentment currency.","format":"int64"},"currency":{"type":"string","description":"The settlement currency code (e.g., \"usd\")."},"presentment_currency":{"type":"string","description":"The customer-facing presentment currency code (e.g., \"eur\")."}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/products":{"get":{"tags":["products"],"summary":"Get products","description":"Retrieves the available products. To make sure all VAT rates are properly displayed, pass in the IP headers as instructed.","operationId":"StorefrontProducts_GetStorefrontProducts","parameters":[{"name":"tag","in":"query","description":"Tag slugs to filter by. Each tag slug is a separate query parameter.","schema":{"type":"array","items":{"type":"string"}}},{"name":"currency","in":"query","description":"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.","schema":{"type":"string"}},{"name":"x-paynow-store-id","in":"header","description":"PayNow Store Identifier (Store ID) available in Store Settings","required":true,"schema":{"type":"string","format":"flake-id"}},{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontProductDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get product by ID or slug

> Retrieves a product by an ID or a slug. To make sure all VAT rates are properly displayed, pass in the IP headers as instructed.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"products"}],"security":[{},{"Customer":[],"APIKey":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"StorefrontProductDto":{"required":["allow_one_time_purchase","allow_subscription","currency","custom_variables","description","gameservers","hidden","id","is_affiliate_links_disabled","is_coupons_disabled","is_gift_cards_disabled","is_gifting_disabled","name","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","single_game_server_only","slug","sort_order","store_id","subscription_interval_scale","subscription_interval_value","tags","trial","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"label":{"type":["null","string"],"description":"The display label for the product."},"hidden":{"type":"boolean","description":"Indicates if the product is hidden."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"currency":{"type":"string","description":"The ISO three-letter lowercase currency code (e.g., usd, eur, gbp) the product is denominated in."},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"is_gifting_disabled":{"type":"boolean","description":"Indicates whether gifting is disabled for this product."},"is_gift_cards_disabled":{"type":"boolean","description":"Indicates whether gift cards are disabled entirely for the product."},"is_coupons_disabled":{"type":"boolean","description":"Indicates whether coupons are disabled entirely for the product."},"is_affiliate_links_disabled":{"type":"boolean","description":"Indicates whether affiliate links are disabled entirely for the product."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"pricing":{"$ref":"#/components/schemas/StorefrontProductPricingDto"},"stock":{"$ref":"#/components/schemas/StorefrontProductStockDto"},"trial":{"$ref":"#/components/schemas/StorefrontProductTrialDto"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontGameServerDto"},"description":"The game servers associated with the product."},"custom_variables":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableDto"},"description":"Custom Variables associated with the product."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"},"active_tier_group":{"$ref":"#/components/schemas/CustomerTierGroupDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"StorefrontProductPricingDto":{"required":["price_final","price_original"],"type":"object","properties":{"active_sale":{"$ref":"#/components/schemas/StorefrontSaleDto"},"sale_value":{"type":["null","integer"],"description":"The amount of the sale discount in the lowest denominator (e.g. cents).","format":"int64"},"vat_rate":{"$ref":"#/components/schemas/SalesTaxEstimateDto"},"regional_pricing":{"$ref":"#/components/schemas/StorefrontProductRegionalPricingDto"},"price_original":{"type":"integer","description":"The original price of the product before any discounts, in the lowest denominator (e.g. cents).","format":"int64"},"price_final":{"type":"integer","description":"The final price of the product after all discounts, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"The pricing details for the product in the storefront."},"StorefrontSaleDto":{"required":["begins_at","discount_amount","discount_type","id","minimum_order_value","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The amount of the discount, either as a percentage in permille or as an absolute value in cents.","format":"int64"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).","format":"int64"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends, if applicable.","format":"date-time"}},"additionalProperties":false},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SalesTaxEstimateDto":{"required":["country_code","country_name","currency","eservice_rate","eu_member_state","percentage","vat_abbreviation","vat_local_name"],"type":"object","properties":{"country_code":{"type":"string","description":"The ISO country code."},"country_name":{"type":"string","description":"The full name of the country."},"currency":{"type":"string","description":"The local currency used in the country."},"vat_abbreviation":{"type":"string","description":"The abbreviation of the tax term in the local language.","readOnly":true},"vat_local_name":{"type":"string","description":"The full name of the tax term in the local language.","readOnly":true},"tax_number_abbreviation":{"type":["null","string"],"description":"The abbreviation of the local tax identification number."},"tax_number_local_name":{"type":["null","string"],"description":"The name of the local tax identification number."},"eu_member_state":{"type":"boolean","description":"Indicates whether the country is a member of the European Union."},"eservice_rate":{"type":"number","description":"The tax rate applicable for electronic services, as a percentage.","format":"double"},"percentage":{"type":"number","description":"The VAT rate (synonym for EServiceRate).","format":"double","readOnly":true}},"additionalProperties":false,"description":"The Sales Tax estimation for the passed in customer country / IP.\nInclude the tax percentage + abbreviation in your product view to inform your customers about the tax."},"StorefrontProductRegionalPricingDto":{"required":["base_price","currency","region_id","tax_inclusive"],"type":"object","properties":{"region_id":{"type":"string","description":"The identifier for the region."},"currency":{"type":"string","description":"The currency code used in the region."},"tax_inclusive":{"type":"boolean","description":"Indicates whether the base price includes tax."},"base_price":{"type":"integer","description":"The base price in the regional currency, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"Regional pricing information for this product.\nOnly present if there is a regional pricing configured."},"StorefrontProductStockDto":{"required":["available_to_purchase","customer_available"],"type":"object","properties":{"available_to_purchase":{"type":"boolean","description":"Indicates whether the product is currently available for purchase (there is available stock)."},"customer_available":{"type":"integer","description":"The number of items available for the customer to purchase (customer stock limit remaining).","format":"int32"}},"additionalProperties":false,"description":"The stock status information for the product in the storefront."},"StorefrontProductTrialDto":{"required":["eligible","enabled","period_scale","period_value"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether the trial period is enabled for this product."},"eligible":{"type":"boolean","description":"Indicates whether the customer is eligible for the trial period."},"period_value":{"type":"integer","description":"The duration value of the trial period.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"StorefrontCustomVariableDto":{"required":["description","identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"CustomerTierGroupDto":{"required":["active_product_id","currency","next_billing_amount","next_billing_presentment_amount","next_renewal_at","presentment_currency","tier_group_id"],"type":"object","properties":{"tier_group_id":{"$ref":"#/components/schemas/FlakeId"},"active_product_id":{"$ref":"#/components/schemas/FlakeId"},"pending_change_product_id":{"$ref":"#/components/schemas/FlakeId"},"next_renewal_at":{"type":"string","description":"The date and time of the next subscription renewal for this tier group.","format":"date-time"},"next_billing_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the settlement currency.","format":"int64"},"next_billing_presentment_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the customer-facing presentment currency.","format":"int64"},"currency":{"type":"string","description":"The settlement currency code (e.g., \"usd\")."},"presentment_currency":{"type":"string","description":"The customer-facing presentment currency code (e.g., \"eur\")."}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/products/{idOrSlug}":{"get":{"tags":["products"],"summary":"Get product by ID or slug","description":"Retrieves a product by an ID or a slug. To make sure all VAT rates are properly displayed, pass in the IP headers as instructed.","operationId":"StorefrontProducts_GetStorefrontProduct","parameters":[{"name":"idOrSlug","in":"path","required":true,"schema":{"type":"string"}},{"name":"currency","in":"query","description":"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.","schema":{"type":"string"}},{"name":"x-paynow-store-id","in":"header","description":"PayNow Store Identifier (Store ID) available in Store Settings","required":true,"schema":{"type":"string","format":"flake-id"}},{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontProductDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Store

## Get current store

> Retrieves a store by the passed in x-paynow-store-id or Customer token.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"store"}],"security":[{},{"Customer":[],"APIKey":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"StorefrontStoreDto":{"required":["creator_currency","currency","game","id","live_mode","name","platform","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-friendly identifier for the store, used in store URLs."},"name":{"type":"string","description":"The display name of the store shown to customers."},"platform":{"type":"string","description":"The platform or the game of the store."},"game":{"type":"string","description":"The game of the store. Equivalent to the `platform` for backwards compatibility.","readOnly":true},"currency":{"type":"string","description":"The three-letter ISO currency code used for pricing in this store.\nIf using the Adaptive Currency feature, this will be updated to reflect customer's local currency\n(based on passed in IP / country headers)."},"creator_currency":{"type":"string","description":"The three-letter ISO currency code signifying the main currency of the store."},"description":{"type":["null","string"],"description":"A detailed description of the store. Only present for some platform types."},"website_url":{"type":["null","string"],"description":"The URL of the store's main website, if not using Hosted Webstores."},"support_email":{"type":["null","string"],"description":"The email address customers can use to contact store support."},"support_url":{"type":["null","string"],"description":"The URL of the store's support page."},"integration_type":{"type":["null","string"],"description":"The type of integration this store uses with external systems."},"live_mode":{"type":"boolean","description":"Indicates whether the store is in live mode (true) or test mode (false)."},"logo_url":{"type":["null","string"],"description":"The URL to the store's main logo image."},"logo_square_url":{"type":["null","string"],"description":"The URL to the store's square logo image."},"created_at":{"type":["null","string"],"description":"The date and time when the store was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the store was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a store entity within the storefront system."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store":{"get":{"tags":["store"],"summary":"Get current store","description":"Retrieves a store by the passed in x-paynow-store-id or Customer token.","operationId":"StorefrontStore_GetStorefrontStore","parameters":[{"name":"x-paynow-store-id","in":"header","description":"PayNow Store Identifier (Store ID) available in Store Settings","required":true,"schema":{"type":"string","format":"flake-id"}},{"name":"x-paynow-customer-ip","in":"header","description":"The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.","schema":{"type":"string","format":"ipv4"}},{"name":"x-paynow-customer-countrycode","in":"header","description":"The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.","schema":{"pattern":"^[A-Z]{2}$","type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontStoreDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Subscriptions

## Get subscriptions

> Retrieves all subscriptions for the specified customer token.\
> {% hint style="warning" %}\
> This endpoint is only available for stores that use Steam based authentication.\
> {% endhint %}

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionStatusDto":{"enum":["invalid","created","active","canceled"],"type":"string","description":"Represents the current state of a subscription."},"StorefrontSubscriptionDto":{"required":["coupon_ids","created_at","currency","customer","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","interval_scale","interval_value","lines","next_billing_amount","next_billing_presentment_amount","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_jurisdictions","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the subscription.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"pending_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"status":{"$ref":"#/components/schemas/SubscriptionStatusDto"},"coupon_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Identifiers of coupons applied to this subscription."},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"List of tax jurisdictions applicable to this subscription."},"interval_value":{"type":"integer","description":"Numeric value of the billing interval.","format":"int32"},"interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"currency":{"type":"string","description":"Currency code used for billing this subscription."},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in the smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in the smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in the smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true},"fx_rate":{"type":["null","string"],"description":"The foreign exchange rate applied (if presentment currency differs from settlement currency)."},"current_period_start":{"type":["null","string"],"description":"Start date of the current billing period.","format":"date-time"},"current_period_end":{"type":["null","string"],"description":"End date of the current billing period.","format":"date-time"},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the current billing cycle.","format":"int32"},"next_attempt_at":{"type":["null","string"],"description":"Date and time when the next payment attempt will occur.","format":"date-time"},"attempt_count":{"type":["null","integer"],"description":"Number of payment attempts made for the current billing cycle.","format":"int32"},"created_at":{"type":"string","description":"Date and time when the subscription was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"Date and time when the subscription was last updated.","format":"date-time"},"active_at":{"type":["null","string"],"description":"Date and time when the subscription became active.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the subscription was canceled.","format":"date-time"},"cancel_reason":{"type":["null","string"],"description":"Reason provided for cancellation."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontSubscriptionLineDto"},"description":"Line items associated with this subscription."}},"additionalProperties":false,"description":"Data transfer object representing a store subscription."},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"SubscriptionBillingAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Represents a billing amount breakdown for a subscription."},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"StorefrontSubscriptionLineDto":{"required":["currency","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","price","product_id","product_name","product_version_id","store_id","subscription_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"initial_order_line_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription line."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this subscription line."},"product_image_url":{"type":["null","string"],"description":"URL for the product image."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself."},"currency":{"type":"string","description":"Currency code for this subscription line."},"price":{"type":"integer","description":"Base price of the subscription line in smallest currency units (e.g., cents).","format":"int64"},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true}},"additionalProperties":false,"description":"Represents a line item within a subscription."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/customer/subscriptions":{"get":{"tags":["subscriptions"],"summary":"Get subscriptions","description":"Retrieves all subscriptions for the specified customer token.\n{% hint style=\"warning\" %}\nThis endpoint is only available for stores that use Steam based authentication.\n{% endhint %}","operationId":"StorefrontSubscriptions_GetSubscriptions","parameters":[{"name":"customer_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"subscription_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"billing_email","in":"query","schema":{"type":"string"}},{"name":"payment_method_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"checkout_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"trial_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"status","in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionStatusDto"}}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontSubscriptionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get subscription by ID

> Retrieves a subscription for the specified store by the supplied customer token.\
> {% hint style="warning" %}\
> This endpoint is only available for stores that use Steam based authentication.\
> {% endhint %}

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorefrontSubscriptionDto":{"required":["coupon_ids","created_at","currency","customer","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","interval_scale","interval_value","lines","next_billing_amount","next_billing_presentment_amount","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_jurisdictions","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the subscription.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"pending_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"status":{"$ref":"#/components/schemas/SubscriptionStatusDto"},"coupon_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Identifiers of coupons applied to this subscription."},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"List of tax jurisdictions applicable to this subscription."},"interval_value":{"type":"integer","description":"Numeric value of the billing interval.","format":"int32"},"interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"currency":{"type":"string","description":"Currency code used for billing this subscription."},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in the smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in the smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in the smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true},"fx_rate":{"type":["null","string"],"description":"The foreign exchange rate applied (if presentment currency differs from settlement currency)."},"current_period_start":{"type":["null","string"],"description":"Start date of the current billing period.","format":"date-time"},"current_period_end":{"type":["null","string"],"description":"End date of the current billing period.","format":"date-time"},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the current billing cycle.","format":"int32"},"next_attempt_at":{"type":["null","string"],"description":"Date and time when the next payment attempt will occur.","format":"date-time"},"attempt_count":{"type":["null","integer"],"description":"Number of payment attempts made for the current billing cycle.","format":"int32"},"created_at":{"type":"string","description":"Date and time when the subscription was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"Date and time when the subscription was last updated.","format":"date-time"},"active_at":{"type":["null","string"],"description":"Date and time when the subscription became active.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the subscription was canceled.","format":"date-time"},"cancel_reason":{"type":["null","string"],"description":"Reason provided for cancellation."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontSubscriptionLineDto"},"description":"Line items associated with this subscription."}},"additionalProperties":false,"description":"Data transfer object representing a store subscription."},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"SubscriptionBillingAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Represents a billing amount breakdown for a subscription."},"SubscriptionStatusDto":{"enum":["invalid","created","active","canceled"],"type":"string","description":"Represents the current state of a subscription."},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"StorefrontSubscriptionLineDto":{"required":["currency","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","price","product_id","product_name","product_version_id","store_id","subscription_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"initial_order_line_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription line."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this subscription line."},"product_image_url":{"type":["null","string"],"description":"URL for the product image."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself."},"currency":{"type":"string","description":"Currency code for this subscription line."},"price":{"type":"integer","description":"Base price of the subscription line in smallest currency units (e.g., cents).","format":"int64"},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true}},"additionalProperties":false,"description":"Represents a line item within a subscription."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/customer/subscriptions/{subscriptionId}":{"get":{"tags":["subscriptions"],"summary":"Get subscription by ID","description":"Retrieves a subscription for the specified store by the supplied customer token.\n{% hint style=\"warning\" %}\nThis endpoint is only available for stores that use Steam based authentication.\n{% endhint %}","operationId":"StorefrontSubscriptions_GetSubscriptionById","parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontSubscriptionDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Cancel subscription by ID

> Cancels a subscription for the specified store by the supplied customer token.\
> {% hint style="warning" %}\
> This endpoint is only available for stores that use Steam based authentication.\
> {% endhint %}

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/customer/subscriptions/{subscriptionId}":{"delete":{"tags":["subscriptions"],"summary":"Cancel subscription by ID","description":"Cancels a subscription for the specified store by the supplied customer token.\n{% hint style=\"warning\" %}\nThis endpoint is only available for stores that use Steam based authentication.\n{% endhint %}","operationId":"StorefrontSubscriptions_CancelSubscription","parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Tags

## Get tags

> Retrieves the store's tags.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"tags"}],"security":[{},{"Customer":[],"APIKey":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"StorefrontTagDto":{"required":["created_at","enabled","id","name","slug","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-friendly identifier for the tag, used in category URLs."},"name":{"type":"string","description":"The display name of the tag shown to customers."},"description":{"type":["null","string"],"description":"A detailed description of the tag's purpose or the category it represents."},"image_url":{"type":["null","string"],"description":"The URL to the tag image."},"enabled":{"type":"boolean","description":"Indicates whether the tag is active and should be included in navigation and filtering."},"created_at":{"type":"string","description":"The date and time when the tag was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the tag was last updated, if applicable.","format":"date-time"}},"additionalProperties":false,"description":"Represents a tag entity used for categorizing and filtering products within a store."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/tags":{"get":{"tags":["tags"],"summary":"Get tags","description":"Retrieves the store's tags.","operationId":"StorefrontTags_GetStorefrontTags","parameters":[{"name":"x-paynow-store-id","in":"header","description":"PayNow Store Identifier (Store ID) available in Store Settings","required":true,"schema":{"type":"string","format":"flake-id"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontTagDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Tier Groups

## Get customer tier groups

> Retrieves tier group state for a logged in customer. Returns an empty array if not logged in.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"tier-groups"}],"security":[{},{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"CustomerTierGroupDto":{"required":["active_product_id","currency","next_billing_amount","next_billing_presentment_amount","next_renewal_at","presentment_currency","tier_group_id"],"type":"object","properties":{"tier_group_id":{"$ref":"#/components/schemas/FlakeId"},"active_product_id":{"$ref":"#/components/schemas/FlakeId"},"pending_change_product_id":{"$ref":"#/components/schemas/FlakeId"},"next_renewal_at":{"type":"string","description":"The date and time of the next subscription renewal for this tier group.","format":"date-time"},"next_billing_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the settlement currency.","format":"int64"},"next_billing_presentment_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the customer-facing presentment currency.","format":"int64"},"currency":{"type":"string","description":"The settlement currency code (e.g., \"usd\")."},"presentment_currency":{"type":"string","description":"The customer-facing presentment currency code (e.g., \"eur\")."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/tier-groups":{"get":{"tags":["tier-groups"],"summary":"Get customer tier groups","description":"Retrieves tier group state for a logged in customer. Returns an empty array if not logged in.","operationId":"StorefrontTierGroups_GetCustomerTierGroups","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerTierGroupDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update subscription tier group

> Upgrades or downgrades an existing subscription tier group. The customer must have an active subscription within this tier group.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"tier-groups"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateSubscriptionTierRequestDto":{"required":["target_product_id"],"type":"object","properties":{"target_product_id":{"$ref":"#/components/schemas/FlakeId"},"verification_code":{"type":["null","string"],"description":"A verification code sent to the customer's subscription billing e-mail.\nPass this if the `status` field on the `subscription_change` object equals `pending_verification`."}},"additionalProperties":false},"UpdateSubscriptionResponseDto":{"required":["subscription_change"],"type":"object","properties":{"subscription_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"pending_payment":{"$ref":"#/components/schemas/CheckoutPaymentInfoDto"}},"additionalProperties":false,"description":"Response returned after a subscription change is initiated."},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"CheckoutPaymentInfoDto":{"required":["declined","status"],"type":"object","properties":{"status":{"type":"string","description":"Status string from the payment provider."},"declined":{"type":"boolean","description":"Indicates whether the payment was declined."},"decline_message":{"type":["null","string"],"description":"The customer readable decline reason, if the payment was declined."},"checkout_url":{"type":["null","string"],"description":"Checkout URL to redirect to for on-session payments."}},"additionalProperties":false,"description":"Payment outcome information returned after a subscription change triggers an immediate charge."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/tier-groups/{id}/change":{"post":{"tags":["tier-groups"],"summary":"Update subscription tier group","description":"Upgrades or downgrades an existing subscription tier group. The customer must have an active subscription within this tier group.","operationId":"StorefrontTierGroups_UpdateSubscriptionTierGroup","parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionTierRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionTierRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionTierRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Preview update subscription tier group

> Previews an upgrade or a downgrade an existing subscription tier group. The customer must have an active subscription within this tier group.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"tags":[{"name":"tier-groups"}],"security":[{"Customer":[]}],"components":{"securitySchemes":{"Customer":{"type":"apiKey","description":"A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateSubscriptionTierRequestDto":{"required":["target_product_id"],"type":"object","properties":{"target_product_id":{"$ref":"#/components/schemas/FlakeId"},"verification_code":{"type":["null","string"],"description":"A verification code sent to the customer's subscription billing e-mail.\nPass this if the `status` field on the `subscription_change` object equals `pending_verification`."}},"additionalProperties":false},"UpdateSubscriptionResponseDto":{"required":["subscription_change"],"type":"object","properties":{"subscription_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"pending_payment":{"$ref":"#/components/schemas/CheckoutPaymentInfoDto"}},"additionalProperties":false,"description":"Response returned after a subscription change is initiated."},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"CheckoutPaymentInfoDto":{"required":["declined","status"],"type":"object","properties":{"status":{"type":"string","description":"Status string from the payment provider."},"declined":{"type":"boolean","description":"Indicates whether the payment was declined."},"decline_message":{"type":["null","string"],"description":"The customer readable decline reason, if the payment was declined."},"checkout_url":{"type":["null","string"],"description":"Checkout URL to redirect to for on-session payments."}},"additionalProperties":false,"description":"Payment outcome information returned after a subscription change triggers an immediate charge."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/store/tier-groups/{id}/change/preview":{"post":{"tags":["tier-groups"],"summary":"Preview update subscription tier group","description":"Previews an upgrade or a downgrade an existing subscription tier group. The customer must have an active subscription within this tier group.","operationId":"StorefrontTierGroups_UpdateSubscriptionTierGroupPreview","parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionTierRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionTierRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionTierRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Models

## The ActorDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The AuthenticateStorefrontCustomerRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"AuthenticateStorefrontCustomerRequestDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"}}}}
```

## The AuthenticateStorefrontCustomerResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"AuthenticateStorefrontCustomerResponseDto":{"required":["customer_token"],"type":"object","properties":{"customer_token":{"type":"string","description":"The token for the Customer"}},"additionalProperties":false}}}}
```

## The CartDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CartDto":{"required":["currency","customer_id","lines","store_id","total"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/CartLineDto"},"description":"The line items in the cart"},"total":{"type":"integer","description":"The total price of all items in the cart in the smallest currency unit (e.g., cents)","format":"int64"},"currency":{"type":"string","description":"The currency code (e.g., usd, eur, gbp)"}},"additionalProperties":false,"description":"Represents a customer's shopping cart"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CartLineDto":{"required":["custom_variables","line_key","name","price","pricing","product_id","quantity","slug","subscription","trial"],"type":"object","properties":{"line_key":{"type":"string","description":"The unique key for this line item"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The slug of the product"},"price":{"type":"integer","description":"The price of the product in the smallest currency unit (e.g., cents)","format":"int64"},"quantity":{"type":"integer","description":"The quantity of this product in the cart","format":"int32"},"subscription":{"type":"boolean","description":"Indicates whether this line item should be a subscription"},"trial":{"type":"boolean","description":"Indicates whether this line will be trialied by the customer."},"image_url":{"type":["null","string"],"description":"The URL to the product image"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver":{"$ref":"#/components/schemas/StorefrontGameServerDto"},"pricing":{"$ref":"#/components/schemas/StorefrontProductPricingDto"},"custom_variables":{"type":"array","items":{"$ref":"#/components/schemas/CartLineCustomVariableDto"},"description":"Selected custom variables for this cart line."},"gift_to_customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents a line item in a cart"},"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"StorefrontProductPricingDto":{"required":["price_final","price_original"],"type":"object","properties":{"active_sale":{"$ref":"#/components/schemas/StorefrontSaleDto"},"sale_value":{"type":["null","integer"],"description":"The amount of the sale discount in the lowest denominator (e.g. cents).","format":"int64"},"vat_rate":{"$ref":"#/components/schemas/SalesTaxEstimateDto"},"regional_pricing":{"$ref":"#/components/schemas/StorefrontProductRegionalPricingDto"},"price_original":{"type":"integer","description":"The original price of the product before any discounts, in the lowest denominator (e.g. cents).","format":"int64"},"price_final":{"type":"integer","description":"The final price of the product after all discounts, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"The pricing details for the product in the storefront."},"StorefrontSaleDto":{"required":["begins_at","discount_amount","discount_type","id","minimum_order_value","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The amount of the discount, either as a percentage in permille or as an absolute value in cents.","format":"int64"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).","format":"int64"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends, if applicable.","format":"date-time"}},"additionalProperties":false},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SalesTaxEstimateDto":{"required":["country_code","country_name","currency","eservice_rate","eu_member_state","percentage","vat_abbreviation","vat_local_name"],"type":"object","properties":{"country_code":{"type":"string","description":"The ISO country code."},"country_name":{"type":"string","description":"The full name of the country."},"currency":{"type":"string","description":"The local currency used in the country."},"vat_abbreviation":{"type":"string","description":"The abbreviation of the tax term in the local language.","readOnly":true},"vat_local_name":{"type":"string","description":"The full name of the tax term in the local language.","readOnly":true},"tax_number_abbreviation":{"type":["null","string"],"description":"The abbreviation of the local tax identification number."},"tax_number_local_name":{"type":["null","string"],"description":"The name of the local tax identification number."},"eu_member_state":{"type":"boolean","description":"Indicates whether the country is a member of the European Union."},"eservice_rate":{"type":"number","description":"The tax rate applicable for electronic services, as a percentage.","format":"double"},"percentage":{"type":"number","description":"The VAT rate (synonym for EServiceRate).","format":"double","readOnly":true}},"additionalProperties":false,"description":"The Sales Tax estimation for the passed in customer country / IP.\nInclude the tax percentage + abbreviation in your product view to inform your customers about the tax."},"StorefrontProductRegionalPricingDto":{"required":["base_price","currency","region_id","tax_inclusive"],"type":"object","properties":{"region_id":{"type":"string","description":"The identifier for the region."},"currency":{"type":"string","description":"The currency code used in the region."},"tax_inclusive":{"type":"boolean","description":"Indicates whether the base price includes tax."},"base_price":{"type":"integer","description":"The base price in the regional currency, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"Regional pricing information for this product.\nOnly present if there is a regional pricing configured."},"CartLineCustomVariableDto":{"required":["description","id","identifier","name","options","type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the custom variable"},"identifier":{"type":"string","description":"The unique identifier string for the custom variable"},"description":{"type":"string","description":"The description of the custom variable"},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value":{"type":"string","description":"The selected value of the custom variable"},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"},"description":"The collection of available options for this custom variable. Only present for dropdown type"},"selected_option":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"}}}}
```

## The CartLineCustomVariableDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CartLineCustomVariableDto":{"required":["description","id","identifier","name","options","type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the custom variable"},"identifier":{"type":"string","description":"The unique identifier string for the custom variable"},"description":{"type":"string","description":"The description of the custom variable"},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value":{"type":"string","description":"The selected value of the custom variable"},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"},"description":"The collection of available options for this custom variable. Only present for dropdown type"},"selected_option":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false}}}}
```

## The CartLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CartLineDto":{"required":["custom_variables","line_key","name","price","pricing","product_id","quantity","slug","subscription","trial"],"type":"object","properties":{"line_key":{"type":"string","description":"The unique key for this line item"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The slug of the product"},"price":{"type":"integer","description":"The price of the product in the smallest currency unit (e.g., cents)","format":"int64"},"quantity":{"type":"integer","description":"The quantity of this product in the cart","format":"int32"},"subscription":{"type":"boolean","description":"Indicates whether this line item should be a subscription"},"trial":{"type":"boolean","description":"Indicates whether this line will be trialied by the customer."},"image_url":{"type":["null","string"],"description":"The URL to the product image"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver":{"$ref":"#/components/schemas/StorefrontGameServerDto"},"pricing":{"$ref":"#/components/schemas/StorefrontProductPricingDto"},"custom_variables":{"type":"array","items":{"$ref":"#/components/schemas/CartLineCustomVariableDto"},"description":"Selected custom variables for this cart line."},"gift_to_customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents a line item in a cart"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"StorefrontProductPricingDto":{"required":["price_final","price_original"],"type":"object","properties":{"active_sale":{"$ref":"#/components/schemas/StorefrontSaleDto"},"sale_value":{"type":["null","integer"],"description":"The amount of the sale discount in the lowest denominator (e.g. cents).","format":"int64"},"vat_rate":{"$ref":"#/components/schemas/SalesTaxEstimateDto"},"regional_pricing":{"$ref":"#/components/schemas/StorefrontProductRegionalPricingDto"},"price_original":{"type":"integer","description":"The original price of the product before any discounts, in the lowest denominator (e.g. cents).","format":"int64"},"price_final":{"type":"integer","description":"The final price of the product after all discounts, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"The pricing details for the product in the storefront."},"StorefrontSaleDto":{"required":["begins_at","discount_amount","discount_type","id","minimum_order_value","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The amount of the discount, either as a percentage in permille or as an absolute value in cents.","format":"int64"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).","format":"int64"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends, if applicable.","format":"date-time"}},"additionalProperties":false},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SalesTaxEstimateDto":{"required":["country_code","country_name","currency","eservice_rate","eu_member_state","percentage","vat_abbreviation","vat_local_name"],"type":"object","properties":{"country_code":{"type":"string","description":"The ISO country code."},"country_name":{"type":"string","description":"The full name of the country."},"currency":{"type":"string","description":"The local currency used in the country."},"vat_abbreviation":{"type":"string","description":"The abbreviation of the tax term in the local language.","readOnly":true},"vat_local_name":{"type":"string","description":"The full name of the tax term in the local language.","readOnly":true},"tax_number_abbreviation":{"type":["null","string"],"description":"The abbreviation of the local tax identification number."},"tax_number_local_name":{"type":["null","string"],"description":"The name of the local tax identification number."},"eu_member_state":{"type":"boolean","description":"Indicates whether the country is a member of the European Union."},"eservice_rate":{"type":"number","description":"The tax rate applicable for electronic services, as a percentage.","format":"double"},"percentage":{"type":"number","description":"The VAT rate (synonym for EServiceRate).","format":"double","readOnly":true}},"additionalProperties":false,"description":"The Sales Tax estimation for the passed in customer country / IP.\nInclude the tax percentage + abbreviation in your product view to inform your customers about the tax."},"StorefrontProductRegionalPricingDto":{"required":["base_price","currency","region_id","tax_inclusive"],"type":"object","properties":{"region_id":{"type":"string","description":"The identifier for the region."},"currency":{"type":"string","description":"The currency code used in the region."},"tax_inclusive":{"type":"boolean","description":"Indicates whether the base price includes tax."},"base_price":{"type":"integer","description":"The base price in the regional currency, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"Regional pricing information for this product.\nOnly present if there is a regional pricing configured."},"CartLineCustomVariableDto":{"required":["description","id","identifier","name","options","type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the custom variable"},"identifier":{"type":"string","description":"The unique identifier string for the custom variable"},"description":{"type":"string","description":"The description of the custom variable"},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value":{"type":"string","description":"The selected value of the custom variable"},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"},"description":"The collection of available options for this custom variable. Only present for dropdown type"},"selected_option":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"}}}}
```

## The CheckoutPaymentInfoDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CheckoutPaymentInfoDto":{"required":["declined","status"],"type":"object","properties":{"status":{"type":"string","description":"Status string from the payment provider."},"declined":{"type":"boolean","description":"Indicates whether the payment was declined."},"decline_message":{"type":["null","string"],"description":"The customer readable decline reason, if the payment was declined."},"checkout_url":{"type":["null","string"],"description":"Checkout URL to redirect to for on-session payments."}},"additionalProperties":false,"description":"Payment outcome information returned after a subscription change triggers an immediate charge."}}}}
```

## The CreateCartCheckoutSessionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CreateCartCheckoutSessionDto":{"type":"object","properties":{"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"promo_codes":{"type":["null","array"],"items":{"type":"string"},"description":"Optional array of promo codes (coupons, gift cards, affiliates) to apply.\nAn invalid promo code will cause an error."},"affiliate_code":{"type":["null","string"],"description":"Optional affiliate code to track referrals.\nAn invalid affiliate code will NOT cause an error."},"return_url":{"type":["null","string"],"description":"Optional URL to redirect to after successful checkout"},"cancel_url":{"type":["null","string"],"description":"Optional URL to redirect to if checkout is canceled"},"auto_redirect":{"type":["null","boolean"],"description":"Whether to automatically redirect the customer (return_url must be set)"}},"additionalProperties":false,"description":"Request to create a new checkout session from a cart"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CreateCheckoutSessionLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CreateCheckoutSessionLineDto":{"required":["product_id","quantity"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"subscription":{"type":["null","boolean"],"description":"Determines whether this line should create a subscription"},"trial":{"type":["null","boolean"],"description":"Indicates whether the product should be trialed"},"gift_to":{"$ref":"#/components/schemas/CustomerPlatformAccountDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":"integer","description":"The quantity of this product to purchase","format":"int32"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Key-value pair mapping custom variable identifiers to their selected values.\nRequired only when the product includes custom variables."}},"additionalProperties":false,"description":"Represents a line item in a checkout session request"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"}}}}
```

## The CreateCheckoutSessionRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CreateCheckoutSessionRequestDto":{"required":["lines"],"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/CreateCheckoutSessionLineDto"},"description":"The line items to include in the checkout."},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"promo_codes":{"type":["null","array"],"items":{"type":"string"},"description":"Optional array of promo codes (coupons, gift cards, affiliates) to apply.\nAn invalid promo code will cause an error."},"affiliate_code":{"type":["null","string"],"description":"Optional affiliate code to track referrals.\nAn invalid affiliate code will NOT cause an error."},"return_url":{"type":["null","string"],"description":"Optional URL to redirect to after successful checkout"},"cancel_url":{"type":["null","string"],"description":"Optional URL to redirect to if checkout is canceled"},"auto_redirect":{"type":["null","boolean"],"description":"Whether to automatically redirect the customer (return_url must be set)"}},"additionalProperties":false,"description":"Request to create a new checkout session"},"CreateCheckoutSessionLineDto":{"required":["product_id","quantity"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"subscription":{"type":["null","boolean"],"description":"Determines whether this line should create a subscription"},"trial":{"type":["null","boolean"],"description":"Indicates whether the product should be trialed"},"gift_to":{"$ref":"#/components/schemas/CustomerPlatformAccountDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":"integer","description":"The quantity of this product to purchase","format":"int32"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Key-value pair mapping custom variable identifiers to their selected values.\nRequired only when the product includes custom variables."}},"additionalProperties":false,"description":"Represents a line item in a checkout session request"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"}}}}
```

## The CreateCheckoutSessionResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CreateCheckoutSessionResponseDto":{"required":["id","token","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"token":{"type":"string","description":"The token for the checkout session"},"url":{"type":"string","description":"The URL to redirect the customer to complete checkout"}},"additionalProperties":false,"description":"Response after creating a checkout session"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CustomVariableLineItemDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CustomVariableType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."}}}}
```

## The CustomerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"}}}}
```

## The CustomerGenericProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."}}}}
```

## The CustomerMinecraftPlatform object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"}}}}
```

## The CustomerMinecraftProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."}}}}
```

## The CustomerPlatformAccountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"}}}}
```

## The CustomerProfilePlatform object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"}}}}
```

## The CustomerSteamProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The CustomerTierGroupDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"CustomerTierGroupDto":{"required":["active_product_id","currency","next_billing_amount","next_billing_presentment_amount","next_renewal_at","presentment_currency","tier_group_id"],"type":"object","properties":{"tier_group_id":{"$ref":"#/components/schemas/FlakeId"},"active_product_id":{"$ref":"#/components/schemas/FlakeId"},"pending_change_product_id":{"$ref":"#/components/schemas/FlakeId"},"next_renewal_at":{"type":"string","description":"The date and time of the next subscription renewal for this tier group.","format":"date-time"},"next_billing_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the settlement currency.","format":"int64"},"next_billing_presentment_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the customer-facing presentment currency.","format":"int64"},"currency":{"type":"string","description":"The settlement currency code (e.g., \"usd\")."},"presentment_currency":{"type":"string","description":"The customer-facing presentment currency code (e.g., \"eur\")."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DeliveryItemProductDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DeliveryItemStateDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"}}}}
```

## The FlakeId object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The OrderStatus object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"OrderStatus":{"enum":["created","completed","canceled","refunded","chargeback"],"type":"string"}}}}
```

## The OrderType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"OrderType":{"enum":["one_time","subscription_initial","subscription_renewal","subscription_proration","mixed"],"type":"string","description":"Defines the type of items contained in an order"}}}}
```

## The PayNowActorType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The PayNowError object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## The PlatformCapability object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"}}}}
```

## The PlatformStoreTypeAssociationDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"PlatformStoreTypeAssociationDetailsDto":{"required":["disable_billing_plans","display_disclaimers","full_external_management","platform_id","store_platform"],"type":"object","properties":{"platform_id":{"$ref":"#/components/schemas/FlakeId"},"associated_platform":{"$ref":"#/components/schemas/PublicPlatformDto"},"store_platform":{"type":"string","description":"The store platform identifier string (e.g. \"rust\", \"minecraft\")."},"paynow_platform_fee_percentage_override":{"type":["null","integer"],"description":"Overrides the default PayNow platform fee percentage for this association.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_fee_percentage":{"type":["null","integer"],"description":"The fee percentage charged by the connected platform.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_wallet_id":{"$ref":"#/components/schemas/FlakeId"},"disable_billing_plans":{"type":"boolean","description":"When true, billing plans are disabled for this platform/store type combination."},"display_disclaimers":{"type":"boolean","description":"When true, legal or compliance disclaimers should be displayed to the end user."},"full_external_management":{"type":"boolean","description":"Whether the management hides some PayNow UI"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"}}}}
```

## The PlatformType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"}}}}
```

## The ProductDeliverableActionsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false}}}}
```

## The ProductRemoveAfterIntervalScale object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"}}}}
```

## The ProductSubscriptionIntervalScale object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"}}}}
```

## The ProductTagDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ProrationBehaviorDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."}}}}
```

## The PublicPlatformDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"}}}}
```

## The SaleDiscountTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"}}}}
```

## The SalesTaxEstimateDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SalesTaxEstimateDto":{"required":["country_code","country_name","currency","eservice_rate","eu_member_state","percentage","vat_abbreviation","vat_local_name"],"type":"object","properties":{"country_code":{"type":"string","description":"The ISO country code."},"country_name":{"type":"string","description":"The full name of the country."},"currency":{"type":"string","description":"The local currency used in the country."},"vat_abbreviation":{"type":"string","description":"The abbreviation of the tax term in the local language.","readOnly":true},"vat_local_name":{"type":"string","description":"The full name of the tax term in the local language.","readOnly":true},"tax_number_abbreviation":{"type":["null","string"],"description":"The abbreviation of the local tax identification number."},"tax_number_local_name":{"type":["null","string"],"description":"The name of the local tax identification number."},"eu_member_state":{"type":"boolean","description":"Indicates whether the country is a member of the European Union."},"eservice_rate":{"type":"number","description":"The tax rate applicable for electronic services, as a percentage.","format":"double"},"percentage":{"type":"number","description":"The VAT rate (synonym for EServiceRate).","format":"double","readOnly":true}},"additionalProperties":false,"description":"The Sales Tax estimation for the passed in customer country / IP.\nInclude the tax percentage + abbreviation in your product view to inform your customers about the tax."}}}}
```

## The SalesTaxJurisdictionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."}}}}
```

## The SalesTaxJurisdictionTaxDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."}}}}
```

## The SteamId object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The StoreDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreDto":{"required":["currency","description","game","id","live_mode","name","owner_id","platform","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"owner_id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-safe slug used to identify the store (e.g. \"my-rust-server\")."},"name":{"type":"string","description":"The display name of the store."},"platform":{"type":"string","description":"The platform this store is associated with (e.g. \"rust\", \"minecraft\")."},"game":{"type":"string","description":"Alias for 'platform'. Returns the platform identifier as a game name.","readOnly":true},"currency":{"type":"string","description":"The ISO 4217 currency code used by this store for pricing (e.g. \"usd\", \"eur\")"},"description":{"type":"string","description":"A human-readable description of the store shown to customers and PayNow."},"website_url":{"type":["null","string"],"description":"The store's public website URL."},"contact_email":{"type":["null","string"],"description":"General contact email address for the store."},"support_email":{"type":["null","string"],"description":"Dedicated support email address for customer inquiries."},"support_url":{"type":["null","string"],"description":"URL to the store's support portal or help page."},"integration_type":{"type":["null","string"],"description":"The integration type used by the store."},"live_mode":{"type":"boolean","description":"When set to true, the store is processing real transactions in live mode."},"logo_url":{"type":["null","string"],"description":"URL of the store's full-size logo image."},"logo_square_url":{"type":["null","string"],"description":"URL of the store's square/icon logo image."},"minecraft_bedrock_username_prefix":{"type":["null","string"],"description":"Username prefix used to identify Minecraft Bedrock players (e.g. \".\")."},"created_at":{"type":["null","string"],"description":"The UTC timestamp when the store was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The UTC timestamp when the store was last updated.","format":"date-time"},"onboarding_completed_at":{"type":["null","string"],"description":"The UTC timestamp when the store completed onboarding.","format":"date-time"},"platform_store_type_association":{"$ref":"#/components/schemas/PlatformStoreTypeAssociationDetailsDto"}},"additionalProperties":false,"description":"Represents a PayNow store and its associated configuration."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PlatformStoreTypeAssociationDetailsDto":{"required":["disable_billing_plans","display_disclaimers","full_external_management","platform_id","store_platform"],"type":"object","properties":{"platform_id":{"$ref":"#/components/schemas/FlakeId"},"associated_platform":{"$ref":"#/components/schemas/PublicPlatformDto"},"store_platform":{"type":"string","description":"The store platform identifier string (e.g. \"rust\", \"minecraft\")."},"paynow_platform_fee_percentage_override":{"type":["null","integer"],"description":"Overrides the default PayNow platform fee percentage for this association.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_fee_percentage":{"type":["null","integer"],"description":"The fee percentage charged by the connected platform.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_wallet_id":{"$ref":"#/components/schemas/FlakeId"},"disable_billing_plans":{"type":"boolean","description":"When true, billing plans are disabled for this platform/store type combination."},"display_disclaimers":{"type":"boolean","description":"When true, legal or compliance disclaimers should be displayed to the end user."},"full_external_management":{"type":"boolean","description":"Whether the management hides some PayNow UI"}},"additionalProperties":false},"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"}}}}
```

## The StoreMemberDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreMemberDto":{"required":["id","user","user_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"user_id":{"$ref":"#/components/schemas/FlakeId"},"user":{"$ref":"#/components/schemas/StoreMemberUserDto"},"added_at":{"type":["null","string"],"description":"The UTC timestamp when the member was added to the store.","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"role_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents a member of a PayNow store."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreMemberUserDto":{"required":["id","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"},"email":{"type":["null","string"],"description":"The email address associated with the user.\nOnly visible if you are the store owner."},"first_name":{"type":["null","string"],"description":"The first name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"last_name":{"type":["null","string"],"description":"The last name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"nickname":{"type":["null","string"],"description":"The nickname of the user."}},"additionalProperties":false,"description":"Represents identity and profile information for a store member."},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false}}}}
```

## The StoreMemberUserDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreMemberUserDto":{"required":["id","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"},"email":{"type":["null","string"],"description":"The email address associated with the user.\nOnly visible if you are the store owner."},"first_name":{"type":["null","string"],"description":"The first name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"last_name":{"type":["null","string"],"description":"The last name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"nickname":{"type":["null","string"],"description":"The nickname of the user."}},"additionalProperties":false,"description":"Represents identity and profile information for a store member."},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The StoreRequirementActionParty object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreRequirementActionParty":{"enum":["invalid","store","paynow","payment_processor","payout_provider","kyc_provider","external"],"type":"string","description":"Determines the party that needs to perform or requests a verification"}}}}
```

## The StoreRequirementCategory object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreRequirementCategory":{"enum":["invalid","business","kyc","compliance","risk","technical","financial","legal","other"],"type":"string","description":"Represents categories of requirements that must be fulfilled for store setup and compliance in the PayNow platform."}}}}
```

## The StoreRequirementStatus object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreRequirementStatus":{"enum":["invalid","pending","under_review","requires_revision","approved","expired","waived","rejected_final"],"type":"string"}}}}
```

## The StoreRestrictionFlagDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreRestrictionFlagDto":{"enum":["none","payments_disabled","payouts_disabled"],"type":"string"}}}}
```

## The StoreTrustDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreTrustDto":{"required":["created_at","events","pending_requirements","restrictions","status","store_id"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/StoreTrustStatusDto"},"status_reason":{"type":["null","string"]},"restrictions":{"$ref":"#/components/schemas/StoreRestrictionFlagDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"onboarding_steps":{"$ref":"#/components/schemas/StoreTrustOnboardingStepsDto"},"events":{"type":"array","items":{"$ref":"#/components/schemas/StoreTrustEventDto"}},"pending_requirements":{"type":"array","items":{"$ref":"#/components/schemas/TrustStoreRequirementDto"}}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreTrustStatusDto":{"enum":["invalid","pending_review","requires_action","under_review","active","restricted","offboarded"],"type":"string"},"StoreRestrictionFlagDto":{"enum":["none","payments_disabled","payouts_disabled"],"type":"string"},"StoreTrustOnboardingStepsDto":{"required":["downloadable_files_added","gameserver_linked","kyc_completed","payout_onboarding_completed","products_created","store_id","store_owner_id","webhooks_active"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_owner_id":{"$ref":"#/components/schemas/FlakeId"},"payout_onboarding_completed":{"type":"boolean"},"kyc_completed":{"type":"boolean"},"products_created":{"type":"boolean"},"gameserver_linked":{"type":"boolean"},"webhooks_active":{"type":"boolean"},"downloadable_files_added":{"type":"boolean"}},"additionalProperties":false},"StoreTrustEventDto":{"required":["actor","created_at","id","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/StoreTrustEventTypeDto"},"description":{"type":["null","string"]},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_review_id":{"$ref":"#/components/schemas/FlakeId"},"actor":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"StoreTrustEventTypeDto":{"enum":["invalid","onboarded","escalated_to_review","action_required","restricted","offboarded","reactivated","requirement_added","requirement_submitted","requirement_verified","requirement_rejected","requirement_deadline_missed","requirement_waived","requirement_requires_revision","restriction_added","restriction_lifted","review_scheduled","review_completed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"TrustStoreRequirementDto":{"required":["category","code","created_at","id","metadata","name","requested_by","restricts_capabilities","status","store_id","submissions"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"template_id":{"type":["null","string"],"description":"Template ID if this requirement was created from a template. Null for ad-hoc requirements."},"originating_flag_id":{"$ref":"#/components/schemas/FlakeId"},"category":{"$ref":"#/components/schemas/StoreRequirementCategory"},"code":{"type":"string","description":"Unique code identifying the type of requirement. Copied from template or custom for ad-hoc requirements."},"name":{"type":"string","description":"Human-readable name of the requirement. Copied from template or custom for ad-hoc requirements."},"description":{"type":["null","string"],"description":"Detailed description explaining what the store needs to provide. Copied from template or custom for ad-hoc requirements."},"schema":{"type":"null","description":"JSON schema defining the form fields, validation rules, and document requirements"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for this requirement (stored as JSON)"},"status":{"$ref":"#/components/schemas/StoreRequirementStatus"},"requested_by":{"$ref":"#/components/schemas/StoreRequirementActionParty"},"requested_by_detail":{"type":["null","string"],"description":"Specifies the specific requester entity (e.g., \"stripe\", \"trolley\", or admin user ID)\nFree-form string for internal records"},"created_at":{"type":"string","description":"When this requirement was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When this requirement was last updated","format":"date-time"},"deadline_at":{"type":["null","string"],"description":"When this requirement must be completed by (optional)","format":"date-time"},"submitted_at":{"type":["null","string"],"description":"When the store submitted their response to this requirement","format":"date-time"},"verified_at":{"type":["null","string"],"description":"When this requirement was verified and approved","format":"date-time"},"rejected_at":{"type":["null","string"],"description":"When this requirement was rejected for not meeting standards","format":"date-time"},"restricts_capabilities":{"type":"array","items":{"type":"string"},"description":"Store capabilities that are restricted until this requirement is satisfied"},"submissions":{"type":"array","items":{"$ref":"#/components/schemas/TrustStoreRequirementSubmissionDto"},"description":"Associated submissions for this requriement."}},"additionalProperties":false},"StoreRequirementCategory":{"enum":["invalid","business","kyc","compliance","risk","technical","financial","legal","other"],"type":"string","description":"Represents categories of requirements that must be fulfilled for store setup and compliance in the PayNow platform."},"StoreRequirementStatus":{"enum":["invalid","pending","under_review","requires_revision","approved","expired","waived","rejected_final"],"type":"string"},"StoreRequirementActionParty":{"enum":["invalid","store","paynow","payment_processor","payout_provider","kyc_provider","external"],"type":"string","description":"Determines the party that needs to perform or requests a verification"},"TrustStoreRequirementSubmissionDto":{"required":["id","store_id","store_requirement_field_id","store_requirement_id","submitted_at","submitted_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_field_id":{"type":"string","description":"The identifier of the specific field within the store requirement."},"text_value":{"type":["null","string"],"description":"The text value submitted for this field, if applicable."},"file_id":{"type":["null","string"],"description":"The identifier of the uploaded file, if a file was submitted."},"file_name":{"type":["null","string"],"description":"The original name of the uploaded file."},"file_content_type":{"type":["null","string"],"description":"The MIME content type of the uploaded file."},"file_size_bytes":{"type":["null","integer"],"description":"The size of the uploaded file in bytes.","format":"int64"},"submitted_at":{"type":"string","description":"The timestamp when this submission was made.","format":"date-time"},"submitted_by":{"$ref":"#/components/schemas/ActorDto"},"submitted_by_ip_address":{"type":["null","string"],"description":"The IP address from which the submission was made."},"submitted_by_user_agent":{"type":["null","string"],"description":"The user agent string of the client that made the submission."}},"additionalProperties":false}}}}
```

## The StoreTrustEventDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreTrustEventDto":{"required":["actor","created_at","id","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/StoreTrustEventTypeDto"},"description":{"type":["null","string"]},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_review_id":{"$ref":"#/components/schemas/FlakeId"},"actor":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreTrustEventTypeDto":{"enum":["invalid","onboarded","escalated_to_review","action_required","restricted","offboarded","reactivated","requirement_added","requirement_submitted","requirement_verified","requirement_rejected","requirement_deadline_missed","requirement_waived","requirement_requires_revision","restriction_added","restriction_lifted","review_scheduled","review_completed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The StoreTrustEventTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreTrustEventTypeDto":{"enum":["invalid","onboarded","escalated_to_review","action_required","restricted","offboarded","reactivated","requirement_added","requirement_submitted","requirement_verified","requirement_rejected","requirement_deadline_missed","requirement_waived","requirement_requires_revision","restriction_added","restriction_lifted","review_scheduled","review_completed"],"type":"string"}}}}
```

## The StoreTrustOnboardingStepsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreTrustOnboardingStepsDto":{"required":["downloadable_files_added","gameserver_linked","kyc_completed","payout_onboarding_completed","products_created","store_id","store_owner_id","webhooks_active"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_owner_id":{"$ref":"#/components/schemas/FlakeId"},"payout_onboarding_completed":{"type":"boolean"},"kyc_completed":{"type":"boolean"},"products_created":{"type":"boolean"},"gameserver_linked":{"type":"boolean"},"webhooks_active":{"type":"boolean"},"downloadable_files_added":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The StoreTrustStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StoreTrustStatusDto":{"enum":["invalid","pending_review","requires_action","under_review","active","restricted","offboarded"],"type":"string"}}}}
```

## The StorefrontCustomVariableDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontCustomVariableDto":{"required":["description","identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false}}}}
```

## The StorefrontCustomVariableOptionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false}}}}
```

## The StorefrontCustomerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"}}}}
```

## The StorefrontCustomerMinecraftProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."}}}}
```

## The StorefrontCustomerSteamProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The StorefrontDeliveryItemDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontDeliveryItemDto":{"required":["added_at","customer_id","expirable","gift","id","product","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"}}}}
```

## The StorefrontGameServerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The StorefrontGiftCardDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontGiftCardDto":{"required":["balance","code","starting_balance"],"type":"object","properties":{"code":{"type":"string"},"balance":{"type":"integer","format":"int32"},"starting_balance":{"type":"integer","format":"int32"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false}}}}
```

## The StorefrontNavLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontNavLinkDto":{"required":["children","name","node_id","order","tag_id","tag_query","tag_slug"],"type":"object","properties":{"node_id":{"type":"string","description":"The unique identifier for this navigation node in the navigation tree."},"parent_node_id":{"type":["null","string"],"description":"The identifier of the parent navigation node, if this is a child node."},"tag_id":{"$ref":"#/components/schemas/FlakeId"},"tag_slug":{"type":"string","description":"The URL-friendly slug for the tag associated with this navigation link."},"tag_query":{"type":"array","items":{"type":"string"},"description":"A list containing all parent tags and this node's tag, representing the complete path in the tag hierarchy."},"name":{"type":"string","description":"The display name of the associated tag shown to users in the UI."},"order":{"type":"integer","description":"The display order of this navigation link relative to its siblings.","format":"int32"},"children":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontNavLinkDto"},"description":"The collection of child navigation links that appear beneath this link in the hierarchy."}},"additionalProperties":false,"description":"Represents a navigation link in the storefront's hierarchical navigation structure."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The StorefrontOrderDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontOrderDto":{"required":["currency","customer","customer_id","discount_amount","discount_amount_str","giftcard_usage_amount","giftcard_usage_amount_str","id","is_subscription","lines","presentment_currency","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","total_amount","total_amount_str","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the order.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"status":{"$ref":"#/components/schemas/OrderStatus"},"type":{"$ref":"#/components/schemas/OrderType"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"is_subscription":{"type":"boolean","description":"Indicates whether this order is a subscription order."},"currency":{"type":"string","description":"Currency code used for this order."},"discount_amount":{"type":"integer","description":"The total discount amount applied to this order in smallest currency unit","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order in smallest currency unit","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order in smallest currency unit","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order in smallest currency unit","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card value used for this order in smallest currency unit","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"presentment_currency":{"type":"string","description":"The presentment currency code used for this order (currency shown to customer)"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount in smallest currency unit","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount in smallest currency unit","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount in the smallest currency unit","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount in smallest currency unit","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount in the smallest currency unit","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the billing cycle, if this order is associated with a subscription.","format":"int32"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontOrderLineDto"},"description":"Line items associated with this order."},"created_at":{"type":["null","string"],"description":"Date and time when the order was created.","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Date and time when the order was completed.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the order was canceled.","format":"date-time"}},"additionalProperties":false,"description":"Data transfer object representing a store order."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"OrderStatus":{"enum":["created","completed","canceled","refunded","chargeback"],"type":"string"},"OrderType":{"enum":["one_time","subscription_initial","subscription_renewal","subscription_proration","mixed"],"type":"string","description":"Defines the type of items contained in an order"},"StorefrontOrderLineDto":{"required":["checkout_line_id","discount_amount","discount_amount_str","gift","giftcard_usage_amount","giftcard_usage_amount_str","id","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","price","price_str","product_id","product_image_url","product_name","product_version_id","quantity","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this order line."},"product_image_url":{"type":"string","description":"URL for the product image."},"subscription_interval_value":{"type":["null","integer"],"description":"Numeric value of the subscription billing interval, if this line is a subscription.","format":"int32"},"subscription_interval_scale":{"type":["null","string"],"description":"Scale of the subscription billing interval (e.g., \"day\", \"month\", \"year\"), if applicable."},"gift":{"type":"boolean","description":"Indicates whether this order line is a gift to another customer."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"price":{"type":"integer","description":"The unit price of the product in the smallest currency unit (e.g., cents)","format":"int32"},"price_str":{"type":"string","description":"The unit price of the product formatted as a string"},"quantity":{"type":"integer","description":"The quantity of the product in this order line","format":"int32"},"discount_amount":{"type":"integer","description":"The discount amount (from sales, coupons, and affiliate links) applied to this order line","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card used for this order line","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order line","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order line","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order line","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount for this order line","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount for this order line","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount for this order line","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount for this order line","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount for this order line","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price, or added on top"},"pricing_region_id":{"type":["null","string"],"description":"The regional pricing region ID for this order line, null if no regional pricing set"},"custom_variables":{"type":["null","object"],"additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Key-value pair of selected custom variables for this order."}},"additionalProperties":false,"description":"Represents a line item within an order."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false}}}}
```

## The StorefrontOrderLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontOrderLineDto":{"required":["checkout_line_id","discount_amount","discount_amount_str","gift","giftcard_usage_amount","giftcard_usage_amount_str","id","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","price","price_str","product_id","product_image_url","product_name","product_version_id","quantity","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this order line."},"product_image_url":{"type":"string","description":"URL for the product image."},"subscription_interval_value":{"type":["null","integer"],"description":"Numeric value of the subscription billing interval, if this line is a subscription.","format":"int32"},"subscription_interval_scale":{"type":["null","string"],"description":"Scale of the subscription billing interval (e.g., \"day\", \"month\", \"year\"), if applicable."},"gift":{"type":"boolean","description":"Indicates whether this order line is a gift to another customer."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"price":{"type":"integer","description":"The unit price of the product in the smallest currency unit (e.g., cents)","format":"int32"},"price_str":{"type":"string","description":"The unit price of the product formatted as a string"},"quantity":{"type":"integer","description":"The quantity of the product in this order line","format":"int32"},"discount_amount":{"type":"integer","description":"The discount amount (from sales, coupons, and affiliate links) applied to this order line","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card used for this order line","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order line","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order line","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order line","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount for this order line","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount for this order line","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount for this order line","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount for this order line","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount for this order line","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price, or added on top"},"pricing_region_id":{"type":["null","string"],"description":"The regional pricing region ID for this order line, null if no regional pricing set"},"custom_variables":{"type":["null","object"],"additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Key-value pair of selected custom variables for this order."}},"additionalProperties":false,"description":"Represents a line item within an order."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false}}}}
```

## The StorefrontProductDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontProductDto":{"required":["allow_one_time_purchase","allow_subscription","currency","custom_variables","description","gameservers","hidden","id","is_affiliate_links_disabled","is_coupons_disabled","is_gift_cards_disabled","is_gifting_disabled","name","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","single_game_server_only","slug","sort_order","store_id","subscription_interval_scale","subscription_interval_value","tags","trial","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"label":{"type":["null","string"],"description":"The display label for the product."},"hidden":{"type":"boolean","description":"Indicates if the product is hidden."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"currency":{"type":"string","description":"The ISO three-letter lowercase currency code (e.g., usd, eur, gbp) the product is denominated in."},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"is_gifting_disabled":{"type":"boolean","description":"Indicates whether gifting is disabled for this product."},"is_gift_cards_disabled":{"type":"boolean","description":"Indicates whether gift cards are disabled entirely for the product."},"is_coupons_disabled":{"type":"boolean","description":"Indicates whether coupons are disabled entirely for the product."},"is_affiliate_links_disabled":{"type":"boolean","description":"Indicates whether affiliate links are disabled entirely for the product."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"pricing":{"$ref":"#/components/schemas/StorefrontProductPricingDto"},"stock":{"$ref":"#/components/schemas/StorefrontProductStockDto"},"trial":{"$ref":"#/components/schemas/StorefrontProductTrialDto"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontGameServerDto"},"description":"The game servers associated with the product."},"custom_variables":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableDto"},"description":"Custom Variables associated with the product."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"},"active_tier_group":{"$ref":"#/components/schemas/CustomerTierGroupDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"StorefrontProductPricingDto":{"required":["price_final","price_original"],"type":"object","properties":{"active_sale":{"$ref":"#/components/schemas/StorefrontSaleDto"},"sale_value":{"type":["null","integer"],"description":"The amount of the sale discount in the lowest denominator (e.g. cents).","format":"int64"},"vat_rate":{"$ref":"#/components/schemas/SalesTaxEstimateDto"},"regional_pricing":{"$ref":"#/components/schemas/StorefrontProductRegionalPricingDto"},"price_original":{"type":"integer","description":"The original price of the product before any discounts, in the lowest denominator (e.g. cents).","format":"int64"},"price_final":{"type":"integer","description":"The final price of the product after all discounts, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"The pricing details for the product in the storefront."},"StorefrontSaleDto":{"required":["begins_at","discount_amount","discount_type","id","minimum_order_value","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The amount of the discount, either as a percentage in permille or as an absolute value in cents.","format":"int64"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).","format":"int64"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends, if applicable.","format":"date-time"}},"additionalProperties":false},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SalesTaxEstimateDto":{"required":["country_code","country_name","currency","eservice_rate","eu_member_state","percentage","vat_abbreviation","vat_local_name"],"type":"object","properties":{"country_code":{"type":"string","description":"The ISO country code."},"country_name":{"type":"string","description":"The full name of the country."},"currency":{"type":"string","description":"The local currency used in the country."},"vat_abbreviation":{"type":"string","description":"The abbreviation of the tax term in the local language.","readOnly":true},"vat_local_name":{"type":"string","description":"The full name of the tax term in the local language.","readOnly":true},"tax_number_abbreviation":{"type":["null","string"],"description":"The abbreviation of the local tax identification number."},"tax_number_local_name":{"type":["null","string"],"description":"The name of the local tax identification number."},"eu_member_state":{"type":"boolean","description":"Indicates whether the country is a member of the European Union."},"eservice_rate":{"type":"number","description":"The tax rate applicable for electronic services, as a percentage.","format":"double"},"percentage":{"type":"number","description":"The VAT rate (synonym for EServiceRate).","format":"double","readOnly":true}},"additionalProperties":false,"description":"The Sales Tax estimation for the passed in customer country / IP.\nInclude the tax percentage + abbreviation in your product view to inform your customers about the tax."},"StorefrontProductRegionalPricingDto":{"required":["base_price","currency","region_id","tax_inclusive"],"type":"object","properties":{"region_id":{"type":"string","description":"The identifier for the region."},"currency":{"type":"string","description":"The currency code used in the region."},"tax_inclusive":{"type":"boolean","description":"Indicates whether the base price includes tax."},"base_price":{"type":"integer","description":"The base price in the regional currency, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"Regional pricing information for this product.\nOnly present if there is a regional pricing configured."},"StorefrontProductStockDto":{"required":["available_to_purchase","customer_available"],"type":"object","properties":{"available_to_purchase":{"type":"boolean","description":"Indicates whether the product is currently available for purchase (there is available stock)."},"customer_available":{"type":"integer","description":"The number of items available for the customer to purchase (customer stock limit remaining).","format":"int32"}},"additionalProperties":false,"description":"The stock status information for the product in the storefront."},"StorefrontProductTrialDto":{"required":["eligible","enabled","period_scale","period_value"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether the trial period is enabled for this product."},"eligible":{"type":"boolean","description":"Indicates whether the customer is eligible for the trial period."},"period_value":{"type":"integer","description":"The duration value of the trial period.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"StorefrontCustomVariableDto":{"required":["description","identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontCustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"StorefrontCustomVariableOptionDto":{"required":["is_default","name","price","sort_order","value"],"type":"object","properties":{"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Additional price in the lowest denominator (e.g. cents) when this option is selected.","format":"int64"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"CustomerTierGroupDto":{"required":["active_product_id","currency","next_billing_amount","next_billing_presentment_amount","next_renewal_at","presentment_currency","tier_group_id"],"type":"object","properties":{"tier_group_id":{"$ref":"#/components/schemas/FlakeId"},"active_product_id":{"$ref":"#/components/schemas/FlakeId"},"pending_change_product_id":{"$ref":"#/components/schemas/FlakeId"},"next_renewal_at":{"type":"string","description":"The date and time of the next subscription renewal for this tier group.","format":"date-time"},"next_billing_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the settlement currency.","format":"int64"},"next_billing_presentment_amount":{"type":"integer","description":"The next billing amount in the smallest currency unit (e.g., cents) in the customer-facing presentment currency.","format":"int64"},"currency":{"type":"string","description":"The settlement currency code (e.g., \"usd\")."},"presentment_currency":{"type":"string","description":"The customer-facing presentment currency code (e.g., \"eur\")."}},"additionalProperties":false}}}}
```

## The StorefrontProductPricingDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontProductPricingDto":{"required":["price_final","price_original"],"type":"object","properties":{"active_sale":{"$ref":"#/components/schemas/StorefrontSaleDto"},"sale_value":{"type":["null","integer"],"description":"The amount of the sale discount in the lowest denominator (e.g. cents).","format":"int64"},"vat_rate":{"$ref":"#/components/schemas/SalesTaxEstimateDto"},"regional_pricing":{"$ref":"#/components/schemas/StorefrontProductRegionalPricingDto"},"price_original":{"type":"integer","description":"The original price of the product before any discounts, in the lowest denominator (e.g. cents).","format":"int64"},"price_final":{"type":"integer","description":"The final price of the product after all discounts, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"The pricing details for the product in the storefront."},"StorefrontSaleDto":{"required":["begins_at","discount_amount","discount_type","id","minimum_order_value","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The amount of the discount, either as a percentage in permille or as an absolute value in cents.","format":"int64"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).","format":"int64"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends, if applicable.","format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SalesTaxEstimateDto":{"required":["country_code","country_name","currency","eservice_rate","eu_member_state","percentage","vat_abbreviation","vat_local_name"],"type":"object","properties":{"country_code":{"type":"string","description":"The ISO country code."},"country_name":{"type":"string","description":"The full name of the country."},"currency":{"type":"string","description":"The local currency used in the country."},"vat_abbreviation":{"type":"string","description":"The abbreviation of the tax term in the local language.","readOnly":true},"vat_local_name":{"type":"string","description":"The full name of the tax term in the local language.","readOnly":true},"tax_number_abbreviation":{"type":["null","string"],"description":"The abbreviation of the local tax identification number."},"tax_number_local_name":{"type":["null","string"],"description":"The name of the local tax identification number."},"eu_member_state":{"type":"boolean","description":"Indicates whether the country is a member of the European Union."},"eservice_rate":{"type":"number","description":"The tax rate applicable for electronic services, as a percentage.","format":"double"},"percentage":{"type":"number","description":"The VAT rate (synonym for EServiceRate).","format":"double","readOnly":true}},"additionalProperties":false,"description":"The Sales Tax estimation for the passed in customer country / IP.\nInclude the tax percentage + abbreviation in your product view to inform your customers about the tax."},"StorefrontProductRegionalPricingDto":{"required":["base_price","currency","region_id","tax_inclusive"],"type":"object","properties":{"region_id":{"type":"string","description":"The identifier for the region."},"currency":{"type":"string","description":"The currency code used in the region."},"tax_inclusive":{"type":"boolean","description":"Indicates whether the base price includes tax."},"base_price":{"type":"integer","description":"The base price in the regional currency, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"Regional pricing information for this product.\nOnly present if there is a regional pricing configured."}}}}
```

## The StorefrontProductRegionalPricingDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontProductRegionalPricingDto":{"required":["base_price","currency","region_id","tax_inclusive"],"type":"object","properties":{"region_id":{"type":"string","description":"The identifier for the region."},"currency":{"type":"string","description":"The currency code used in the region."},"tax_inclusive":{"type":"boolean","description":"Indicates whether the base price includes tax."},"base_price":{"type":"integer","description":"The base price in the regional currency, in the lowest denominator (e.g. cents).","format":"int64"}},"additionalProperties":false,"description":"Regional pricing information for this product.\nOnly present if there is a regional pricing configured."}}}}
```

## The StorefrontProductStockDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontProductStockDto":{"required":["available_to_purchase","customer_available"],"type":"object","properties":{"available_to_purchase":{"type":"boolean","description":"Indicates whether the product is currently available for purchase (there is available stock)."},"customer_available":{"type":"integer","description":"The number of items available for the customer to purchase (customer stock limit remaining).","format":"int32"}},"additionalProperties":false,"description":"The stock status information for the product in the storefront."}}}}
```

## The StorefrontProductTrialDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontProductTrialDto":{"required":["eligible","enabled","period_scale","period_value"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether the trial period is enabled for this product."},"eligible":{"type":"boolean","description":"Indicates whether the customer is eligible for the trial period."},"period_value":{"type":"integer","description":"The duration value of the trial period.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"}}}}
```

## The StorefrontSaleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontSaleDto":{"required":["begins_at","discount_amount","discount_type","id","minimum_order_value","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The amount of the discount, either as a percentage in permille or as an absolute value in cents.","format":"int64"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).","format":"int64"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends, if applicable.","format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"}}}}
```

## The StorefrontStoreDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontStoreDto":{"required":["creator_currency","currency","game","id","live_mode","name","platform","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-friendly identifier for the store, used in store URLs."},"name":{"type":"string","description":"The display name of the store shown to customers."},"platform":{"type":"string","description":"The platform or the game of the store."},"game":{"type":"string","description":"The game of the store. Equivalent to the `platform` for backwards compatibility.","readOnly":true},"currency":{"type":"string","description":"The three-letter ISO currency code used for pricing in this store.\nIf using the Adaptive Currency feature, this will be updated to reflect customer's local currency\n(based on passed in IP / country headers)."},"creator_currency":{"type":"string","description":"The three-letter ISO currency code signifying the main currency of the store."},"description":{"type":["null","string"],"description":"A detailed description of the store. Only present for some platform types."},"website_url":{"type":["null","string"],"description":"The URL of the store's main website, if not using Hosted Webstores."},"support_email":{"type":["null","string"],"description":"The email address customers can use to contact store support."},"support_url":{"type":["null","string"],"description":"The URL of the store's support page."},"integration_type":{"type":["null","string"],"description":"The type of integration this store uses with external systems."},"live_mode":{"type":"boolean","description":"Indicates whether the store is in live mode (true) or test mode (false)."},"logo_url":{"type":["null","string"],"description":"The URL to the store's main logo image."},"logo_square_url":{"type":["null","string"],"description":"The URL to the store's square logo image."},"created_at":{"type":["null","string"],"description":"The date and time when the store was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the store was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a store entity within the storefront system."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The StorefrontSubscriptionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontSubscriptionDto":{"required":["coupon_ids","created_at","currency","customer","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","interval_scale","interval_value","lines","next_billing_amount","next_billing_presentment_amount","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_jurisdictions","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the subscription.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/StorefrontCustomerDto"},"pending_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"status":{"$ref":"#/components/schemas/SubscriptionStatusDto"},"coupon_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Identifiers of coupons applied to this subscription."},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"List of tax jurisdictions applicable to this subscription."},"interval_value":{"type":"integer","description":"Numeric value of the billing interval.","format":"int32"},"interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"currency":{"type":"string","description":"Currency code used for billing this subscription."},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in the smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in the smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in the smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true},"fx_rate":{"type":["null","string"],"description":"The foreign exchange rate applied (if presentment currency differs from settlement currency)."},"current_period_start":{"type":["null","string"],"description":"Start date of the current billing period.","format":"date-time"},"current_period_end":{"type":["null","string"],"description":"End date of the current billing period.","format":"date-time"},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the current billing cycle.","format":"int32"},"next_attempt_at":{"type":["null","string"],"description":"Date and time when the next payment attempt will occur.","format":"date-time"},"attempt_count":{"type":["null","integer"],"description":"Number of payment attempts made for the current billing cycle.","format":"int32"},"created_at":{"type":"string","description":"Date and time when the subscription was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"Date and time when the subscription was last updated.","format":"date-time"},"active_at":{"type":["null","string"],"description":"Date and time when the subscription became active.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the subscription was canceled.","format":"date-time"},"cancel_reason":{"type":["null","string"],"description":"Reason provided for cancellation."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StorefrontSubscriptionLineDto"},"description":"Line items associated with this subscription."}},"additionalProperties":false,"description":"Data transfer object representing a store subscription."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorefrontCustomerDto":{"required":["id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/StorefrontCustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/StorefrontCustomerMinecraftProfileDto"},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"name":{"type":["null","string"],"description":"The display name for the customer."}},"additionalProperties":false,"description":"A storefront representation of a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"StorefrontCustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"A storefront representation of a customers Steam profile."},"StorefrontCustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"A storefront representation of a customers Minecraft profile."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"SubscriptionBillingAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Represents a billing amount breakdown for a subscription."},"SubscriptionStatusDto":{"enum":["invalid","created","active","canceled"],"type":"string","description":"Represents the current state of a subscription."},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"StorefrontSubscriptionLineDto":{"required":["currency","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","price","product_id","product_name","product_version_id","store_id","subscription_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"initial_order_line_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription line."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this subscription line."},"product_image_url":{"type":["null","string"],"description":"URL for the product image."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself."},"currency":{"type":"string","description":"Currency code for this subscription line."},"price":{"type":"integer","description":"Base price of the subscription line in smallest currency units (e.g., cents).","format":"int64"},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true}},"additionalProperties":false,"description":"Represents a line item within a subscription."}}}}
```

## The StorefrontSubscriptionLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontSubscriptionLineDto":{"required":["currency","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","price","product_id","product_name","product_version_id","store_id","subscription_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"initial_order_line_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription line."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this subscription line."},"product_image_url":{"type":["null","string"],"description":"URL for the product image."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself."},"currency":{"type":"string","description":"Currency code for this subscription line."},"price":{"type":"integer","description":"Base price of the subscription line in smallest currency units (e.g., cents).","format":"int64"},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true}},"additionalProperties":false,"description":"Represents a line item within a subscription."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The StorefrontTagDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"StorefrontTagDto":{"required":["created_at","enabled","id","name","slug","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-friendly identifier for the tag, used in category URLs."},"name":{"type":"string","description":"The display name of the tag shown to customers."},"description":{"type":["null","string"],"description":"A detailed description of the tag's purpose or the category it represents."},"image_url":{"type":["null","string"],"description":"The URL to the tag image."},"enabled":{"type":"boolean","description":"Indicates whether the tag is active and should be included in navigation and filtering."},"created_at":{"type":"string","description":"The date and time when the tag was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the tag was last updated, if applicable.","format":"date-time"}},"additionalProperties":false,"description":"Represents a tag entity used for categorizing and filtering products within a store."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The SubscriptionBillingAmountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionBillingAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Represents a billing amount breakdown for a subscription."}}}}
```

## The SubscriptionChangeAmountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."}}}}
```

## The SubscriptionChangeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."}}}}
```

## The SubscriptionChangeLineAmountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."}}}}
```

## The SubscriptionChangeLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."}}}}
```

## The SubscriptionChangeLineProductDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false}}}}
```

## The SubscriptionChangeProratedAmountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."}}}}
```

## The SubscriptionChangeStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."}}}}
```

## The SubscriptionStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"SubscriptionStatusDto":{"enum":["invalid","created","active","canceled"],"type":"string","description":"Represents the current state of a subscription."}}}}
```

## The TrustStoreRequirementDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"TrustStoreRequirementDto":{"required":["category","code","created_at","id","metadata","name","requested_by","restricts_capabilities","status","store_id","submissions"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"template_id":{"type":["null","string"],"description":"Template ID if this requirement was created from a template. Null for ad-hoc requirements."},"originating_flag_id":{"$ref":"#/components/schemas/FlakeId"},"category":{"$ref":"#/components/schemas/StoreRequirementCategory"},"code":{"type":"string","description":"Unique code identifying the type of requirement. Copied from template or custom for ad-hoc requirements."},"name":{"type":"string","description":"Human-readable name of the requirement. Copied from template or custom for ad-hoc requirements."},"description":{"type":["null","string"],"description":"Detailed description explaining what the store needs to provide. Copied from template or custom for ad-hoc requirements."},"schema":{"type":"null","description":"JSON schema defining the form fields, validation rules, and document requirements"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for this requirement (stored as JSON)"},"status":{"$ref":"#/components/schemas/StoreRequirementStatus"},"requested_by":{"$ref":"#/components/schemas/StoreRequirementActionParty"},"requested_by_detail":{"type":["null","string"],"description":"Specifies the specific requester entity (e.g., \"stripe\", \"trolley\", or admin user ID)\nFree-form string for internal records"},"created_at":{"type":"string","description":"When this requirement was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When this requirement was last updated","format":"date-time"},"deadline_at":{"type":["null","string"],"description":"When this requirement must be completed by (optional)","format":"date-time"},"submitted_at":{"type":["null","string"],"description":"When the store submitted their response to this requirement","format":"date-time"},"verified_at":{"type":["null","string"],"description":"When this requirement was verified and approved","format":"date-time"},"rejected_at":{"type":["null","string"],"description":"When this requirement was rejected for not meeting standards","format":"date-time"},"restricts_capabilities":{"type":"array","items":{"type":"string"},"description":"Store capabilities that are restricted until this requirement is satisfied"},"submissions":{"type":"array","items":{"$ref":"#/components/schemas/TrustStoreRequirementSubmissionDto"},"description":"Associated submissions for this requriement."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreRequirementCategory":{"enum":["invalid","business","kyc","compliance","risk","technical","financial","legal","other"],"type":"string","description":"Represents categories of requirements that must be fulfilled for store setup and compliance in the PayNow platform."},"StoreRequirementStatus":{"enum":["invalid","pending","under_review","requires_revision","approved","expired","waived","rejected_final"],"type":"string"},"StoreRequirementActionParty":{"enum":["invalid","store","paynow","payment_processor","payout_provider","kyc_provider","external"],"type":"string","description":"Determines the party that needs to perform or requests a verification"},"TrustStoreRequirementSubmissionDto":{"required":["id","store_id","store_requirement_field_id","store_requirement_id","submitted_at","submitted_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_field_id":{"type":"string","description":"The identifier of the specific field within the store requirement."},"text_value":{"type":["null","string"],"description":"The text value submitted for this field, if applicable."},"file_id":{"type":["null","string"],"description":"The identifier of the uploaded file, if a file was submitted."},"file_name":{"type":["null","string"],"description":"The original name of the uploaded file."},"file_content_type":{"type":["null","string"],"description":"The MIME content type of the uploaded file."},"file_size_bytes":{"type":["null","integer"],"description":"The size of the uploaded file in bytes.","format":"int64"},"submitted_at":{"type":"string","description":"The timestamp when this submission was made.","format":"date-time"},"submitted_by":{"$ref":"#/components/schemas/ActorDto"},"submitted_by_ip_address":{"type":["null","string"],"description":"The IP address from which the submission was made."},"submitted_by_user_agent":{"type":["null","string"],"description":"The user agent string of the client that made the submission."}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The TrustStoreRequirementSubmissionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"TrustStoreRequirementSubmissionDto":{"required":["id","store_id","store_requirement_field_id","store_requirement_id","submitted_at","submitted_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_field_id":{"type":"string","description":"The identifier of the specific field within the store requirement."},"text_value":{"type":["null","string"],"description":"The text value submitted for this field, if applicable."},"file_id":{"type":["null","string"],"description":"The identifier of the uploaded file, if a file was submitted."},"file_name":{"type":["null","string"],"description":"The original name of the uploaded file."},"file_content_type":{"type":["null","string"],"description":"The MIME content type of the uploaded file."},"file_size_bytes":{"type":["null","integer"],"description":"The size of the uploaded file in bytes.","format":"int64"},"submitted_at":{"type":"string","description":"The timestamp when this submission was made.","format":"date-time"},"submitted_by":{"$ref":"#/components/schemas/ActorDto"},"submitted_by_ip_address":{"type":["null","string"],"description":"The IP address from which the submission was made."},"submitted_by_user_agent":{"type":["null","string"],"description":"The user agent string of the client that made the submission."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The UpdateSubscriptionResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"UpdateSubscriptionResponseDto":{"required":["subscription_change"],"type":"object","properties":{"subscription_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"pending_payment":{"$ref":"#/components/schemas/CheckoutPaymentInfoDto"}},"additionalProperties":false,"description":"Response returned after a subscription change is initiated."},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"CheckoutPaymentInfoDto":{"required":["declined","status"],"type":"object","properties":{"status":{"type":"string","description":"Status string from the payment provider."},"declined":{"type":"boolean","description":"Indicates whether the payment was declined."},"decline_message":{"type":["null","string"],"description":"The customer readable decline reason, if the payment was declined."},"checkout_url":{"type":["null","string"],"description":"Checkout URL to redirect to for on-session payments."}},"additionalProperties":false,"description":"Payment outcome information returned after a subscription change triggers an immediate charge."}}}}
```

## The UpdateSubscriptionTierRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"UpdateSubscriptionTierRequestDto":{"required":["target_product_id"],"type":"object","properties":{"target_product_id":{"$ref":"#/components/schemas/FlakeId"},"verification_code":{"type":["null","string"],"description":"A verification code sent to the customer's subscription billing e-mail.\nPass this if the `status` field on the `subscription_change` object equals `pending_verification`."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ValidationError object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Storefront (Headless) API","version":"v1"},"components":{"schemas":{"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```


# Management API


# Affiliate Links

## GET /v1/stores/{storeId}/affiliate-links

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"affiliate-links"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"AffiliateLinkDto":{"required":["apply_for_subscriptions","code","commission_amount","commission_amount_steps","commission_type","created_at","created_by","discount_amount","discount_type","enabled","id","last_commission_amount_step_repeats","referer_type","store_id","tracking_length_days","wallet_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"wallet_id":{"type":"string","description":"The identifier of the wallet that receives the affiliate commission payouts."},"enabled":{"type":"boolean","description":"Indicates whether the affiliate link is enabled."},"code":{"type":"string","description":"The unique code associated with the affiliate link."},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","description":"The number of days a customer's referral is tracked after following the affiliate link.","format":"int32"},"apply_for_subscriptions":{"type":"boolean","description":"Whether the affiliate earns commission on subscription renewals.\nMust be enabled for 'commission_amount_steps' past the first cycle to apply - when disabled, only the initial purchase earns commission."},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount, in the smallest currency unit (e.g., cents) for fixed discounts, or tenths of a percent (e.g., 125 = 12.5%) for percentage discounts.","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","description":"The commission amount, in tenths of a percent (e.g., 125 = 12.5%) for percentage commissions.","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"},"description":"Per-cycle commission overrides. Requires 'apply_for_subscriptions' to be enabled for billing cycles past 1.\nWhen empty, the base commission amount applies to every renewal. When steps are defined, each renewal cycle pays its matching steps amount.\nCycles without a matching step earn no commission, except cycles past the last step when 'last_commission_amount_step_repeats' is true."},"last_commission_amount_step_repeats":{"type":"boolean","description":"Whether the last commission amount steps rate continues to apply to all billing cycles past the last step.\nWhen false, cycles past the last step earn no commission."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the affiliate link was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the affiliate link was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of an affiliate link, including configuration and audit information."},"AffiliateLinkRefererTypeDto":{"enum":["invalid","first_referer","last_referer"],"type":"string","description":"Specifies which affiliate link is credited when a customer follows multiple links before purchasing."},"AffiliateLinkDiscountTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of discount offered to customers referred through an affiliate link."},"AffiliateLinkCommissionTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of commission an affiliate earns from referred purchases."},"AffiliateLinkCommissionAmountStepDto":{"required":["billing_cycle_sequence","commission_amount"],"type":"object","properties":{"billing_cycle_sequence":{"type":"integer","description":"The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.","format":"int32"},"commission_amount":{"type":"integer","description":"The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).","format":"int64"}},"additionalProperties":false,"description":"Represents the commission for a specific subscription renewal billing cycle.\nA step applies to its exact cycle - see the affiliate link's 'last_commission_amount_step_repeats' for what happens past the last step."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/affiliate-links":{"get":{"tags":["affiliate-links"],"operationId":"AffiliateLinks_GetAffiliateLinks","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/affiliate-links

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"affiliate-links"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateAffiliateLinkDto":{"required":["wallet_id","enabled","code","referer_type","tracking_length_days","apply_for_subscriptions","discount_type","discount_amount","commission_type","commission_amount","commission_amount_steps","last_commission_amount_step_repeats"],"type":"object","properties":{"wallet_id":{"type":"string"},"enabled":{"type":"boolean"},"code":{"type":"string"},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","format":"int32"},"apply_for_subscriptions":{"type":"boolean"},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"}},"last_commission_amount_step_repeats":{"type":"boolean"}}},"AffiliateLinkRefererTypeDto":{"enum":["invalid","first_referer","last_referer"],"type":"string","description":"Specifies which affiliate link is credited when a customer follows multiple links before purchasing."},"AffiliateLinkDiscountTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of discount offered to customers referred through an affiliate link."},"AffiliateLinkCommissionTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of commission an affiliate earns from referred purchases."},"AffiliateLinkCommissionAmountStepDto":{"required":["billing_cycle_sequence","commission_amount"],"type":"object","properties":{"billing_cycle_sequence":{"type":"integer","description":"The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.","format":"int32"},"commission_amount":{"type":"integer","description":"The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).","format":"int64"}},"additionalProperties":false,"description":"Represents the commission for a specific subscription renewal billing cycle.\nA step applies to its exact cycle - see the affiliate link's 'last_commission_amount_step_repeats' for what happens past the last step."},"AffiliateLinkDto":{"required":["apply_for_subscriptions","code","commission_amount","commission_amount_steps","commission_type","created_at","created_by","discount_amount","discount_type","enabled","id","last_commission_amount_step_repeats","referer_type","store_id","tracking_length_days","wallet_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"wallet_id":{"type":"string","description":"The identifier of the wallet that receives the affiliate commission payouts."},"enabled":{"type":"boolean","description":"Indicates whether the affiliate link is enabled."},"code":{"type":"string","description":"The unique code associated with the affiliate link."},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","description":"The number of days a customer's referral is tracked after following the affiliate link.","format":"int32"},"apply_for_subscriptions":{"type":"boolean","description":"Whether the affiliate earns commission on subscription renewals.\nMust be enabled for 'commission_amount_steps' past the first cycle to apply - when disabled, only the initial purchase earns commission."},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount, in the smallest currency unit (e.g., cents) for fixed discounts, or tenths of a percent (e.g., 125 = 12.5%) for percentage discounts.","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","description":"The commission amount, in tenths of a percent (e.g., 125 = 12.5%) for percentage commissions.","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"},"description":"Per-cycle commission overrides. Requires 'apply_for_subscriptions' to be enabled for billing cycles past 1.\nWhen empty, the base commission amount applies to every renewal. When steps are defined, each renewal cycle pays its matching steps amount.\nCycles without a matching step earn no commission, except cycles past the last step when 'last_commission_amount_step_repeats' is true."},"last_commission_amount_step_repeats":{"type":"boolean","description":"Whether the last commission amount steps rate continues to apply to all billing cycles past the last step.\nWhen false, cycles past the last step earn no commission."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the affiliate link was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the affiliate link was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of an affiliate link, including configuration and audit information."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/affiliate-links":{"post":{"tags":["affiliate-links"],"operationId":"AffiliateLinks_CreateAffiliateLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAffiliateLinkDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateAffiliateLinkDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateAffiliateLinkDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateLinkDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/affiliate-links/{affiliateLinkId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"affiliate-links"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"AffiliateLinkDto":{"required":["apply_for_subscriptions","code","commission_amount","commission_amount_steps","commission_type","created_at","created_by","discount_amount","discount_type","enabled","id","last_commission_amount_step_repeats","referer_type","store_id","tracking_length_days","wallet_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"wallet_id":{"type":"string","description":"The identifier of the wallet that receives the affiliate commission payouts."},"enabled":{"type":"boolean","description":"Indicates whether the affiliate link is enabled."},"code":{"type":"string","description":"The unique code associated with the affiliate link."},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","description":"The number of days a customer's referral is tracked after following the affiliate link.","format":"int32"},"apply_for_subscriptions":{"type":"boolean","description":"Whether the affiliate earns commission on subscription renewals.\nMust be enabled for 'commission_amount_steps' past the first cycle to apply - when disabled, only the initial purchase earns commission."},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount, in the smallest currency unit (e.g., cents) for fixed discounts, or tenths of a percent (e.g., 125 = 12.5%) for percentage discounts.","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","description":"The commission amount, in tenths of a percent (e.g., 125 = 12.5%) for percentage commissions.","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"},"description":"Per-cycle commission overrides. Requires 'apply_for_subscriptions' to be enabled for billing cycles past 1.\nWhen empty, the base commission amount applies to every renewal. When steps are defined, each renewal cycle pays its matching steps amount.\nCycles without a matching step earn no commission, except cycles past the last step when 'last_commission_amount_step_repeats' is true."},"last_commission_amount_step_repeats":{"type":"boolean","description":"Whether the last commission amount steps rate continues to apply to all billing cycles past the last step.\nWhen false, cycles past the last step earn no commission."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the affiliate link was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the affiliate link was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of an affiliate link, including configuration and audit information."},"AffiliateLinkRefererTypeDto":{"enum":["invalid","first_referer","last_referer"],"type":"string","description":"Specifies which affiliate link is credited when a customer follows multiple links before purchasing."},"AffiliateLinkDiscountTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of discount offered to customers referred through an affiliate link."},"AffiliateLinkCommissionTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of commission an affiliate earns from referred purchases."},"AffiliateLinkCommissionAmountStepDto":{"required":["billing_cycle_sequence","commission_amount"],"type":"object","properties":{"billing_cycle_sequence":{"type":"integer","description":"The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.","format":"int32"},"commission_amount":{"type":"integer","description":"The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).","format":"int64"}},"additionalProperties":false,"description":"Represents the commission for a specific subscription renewal billing cycle.\nA step applies to its exact cycle - see the affiliate link's 'last_commission_amount_step_repeats' for what happens past the last step."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}":{"get":{"tags":["affiliate-links"],"operationId":"AffiliateLinks_GetAffiliateLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"affiliateLinkId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateLinkDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/affiliate-links/{affiliateLinkId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"affiliate-links"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}":{"delete":{"tags":["affiliate-links"],"operationId":"AffiliateLinks_DeleteAffiliateLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"affiliateLinkId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/affiliate-links/{affiliateLinkId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"affiliate-links"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateAffiliateLinkDto":{"type":"object","properties":{"wallet_id":{"type":"string"},"enabled":{"type":"boolean"},"code":{"type":"string"},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","format":"int32"},"apply_for_subscriptions":{"type":"boolean"},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"}},"last_commission_amount_step_repeats":{"type":"boolean"}}},"AffiliateLinkRefererTypeDto":{"enum":["invalid","first_referer","last_referer"],"type":"string","description":"Specifies which affiliate link is credited when a customer follows multiple links before purchasing."},"AffiliateLinkDiscountTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of discount offered to customers referred through an affiliate link."},"AffiliateLinkCommissionTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of commission an affiliate earns from referred purchases."},"AffiliateLinkCommissionAmountStepDto":{"required":["billing_cycle_sequence","commission_amount"],"type":"object","properties":{"billing_cycle_sequence":{"type":"integer","description":"The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.","format":"int32"},"commission_amount":{"type":"integer","description":"The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).","format":"int64"}},"additionalProperties":false,"description":"Represents the commission for a specific subscription renewal billing cycle.\nA step applies to its exact cycle - see the affiliate link's 'last_commission_amount_step_repeats' for what happens past the last step."},"AffiliateLinkDto":{"required":["apply_for_subscriptions","code","commission_amount","commission_amount_steps","commission_type","created_at","created_by","discount_amount","discount_type","enabled","id","last_commission_amount_step_repeats","referer_type","store_id","tracking_length_days","wallet_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"wallet_id":{"type":"string","description":"The identifier of the wallet that receives the affiliate commission payouts."},"enabled":{"type":"boolean","description":"Indicates whether the affiliate link is enabled."},"code":{"type":"string","description":"The unique code associated with the affiliate link."},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","description":"The number of days a customer's referral is tracked after following the affiliate link.","format":"int32"},"apply_for_subscriptions":{"type":"boolean","description":"Whether the affiliate earns commission on subscription renewals.\nMust be enabled for 'commission_amount_steps' past the first cycle to apply - when disabled, only the initial purchase earns commission."},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount, in the smallest currency unit (e.g., cents) for fixed discounts, or tenths of a percent (e.g., 125 = 12.5%) for percentage discounts.","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","description":"The commission amount, in tenths of a percent (e.g., 125 = 12.5%) for percentage commissions.","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"},"description":"Per-cycle commission overrides. Requires 'apply_for_subscriptions' to be enabled for billing cycles past 1.\nWhen empty, the base commission amount applies to every renewal. When steps are defined, each renewal cycle pays its matching steps amount.\nCycles without a matching step earn no commission, except cycles past the last step when 'last_commission_amount_step_repeats' is true."},"last_commission_amount_step_repeats":{"type":"boolean","description":"Whether the last commission amount steps rate continues to apply to all billing cycles past the last step.\nWhen false, cycles past the last step earn no commission."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the affiliate link was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the affiliate link was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of an affiliate link, including configuration and audit information."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}":{"patch":{"tags":["affiliate-links"],"operationId":"AffiliateLinks_UpdateAffiliateLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"affiliateLinkId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAffiliateLinkDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateAffiliateLinkDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateAffiliateLinkDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateLinkDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Bans

## GET /v1/stores/{storeId}/bans

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans":{"get":{"tags":["bans"],"operationId":"Bans_GetBans","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"ban_type","in":"query","schema":{"$ref":"#/components/schemas/BanType"}},{"name":"ban_type_value","in":"query","schema":{"type":"string"}},{"name":"reason","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BanDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/bans

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertBanRequestDto":{"type":"object","properties":{"reason":{"type":["null","string"]},"identities":{"type":["null","array"],"items":{"$ref":"#/components/schemas/BanIdentityDto"}},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans":{"post":{"tags":["bans"],"operationId":"Bans_CreateBan","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BanDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/bans/{banId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans/{banId}":{"get":{"tags":["bans"],"operationId":"Bans_GetBan","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"banId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BanDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/bans/{banId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans/{banId}":{"delete":{"tags":["bans"],"operationId":"Bans_DeleteBan","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"banId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/bans/{banId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertBanRequestDto":{"type":"object","properties":{"reason":{"type":["null","string"]},"identities":{"type":["null","array"],"items":{"$ref":"#/components/schemas/BanIdentityDto"}},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans/{banId}":{"patch":{"tags":["bans"],"operationId":"Bans_UpdateBan","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"banId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BanDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/bans/check

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CheckForBanIDByIdentitiesRequestDto":{"required":["identities"],"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"CheckForBanIDByIdentitiesResponseDto":{"required":["is_banned"],"type":"object","properties":{"is_banned":{"type":"boolean"},"ban_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans/check":{"post":{"tags":["bans"],"operationId":"Bans_CheckForBanByIdentities","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckForBanIDByIdentitiesRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CheckForBanIDByIdentitiesRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CheckForBanIDByIdentitiesRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckForBanIDByIdentitiesResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Checkout

## Create a checkout session

> Creates a checkout session from a secure server using an API Key.\
> If you have a Customer token, see the Storefront API Create Checkout endpoint.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"checkout"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"CreateCheckoutSessionManagementDto":{"required":["customer_id","lines"],"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/CreateCheckoutSessionLineManagementDto"},"description":"The line items to include in the checkout"},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"promo_codes":{"type":["null","array"],"items":{"type":"string"},"description":"Optional array of promo codes (coupons, gift cards, affiliates) to apply.\nAn invalid promo code will cause an error."},"affiliate_code":{"type":["null","string"],"description":"Optional affiliate code to track referrals.\nAn invalid affiliate code will NOT cause an error."},"return_url":{"type":["null","string"],"description":"Optional URL to redirect to after successful checkout"},"cancel_url":{"type":["null","string"],"description":"Optional URL to redirect to if checkout is canceled"},"auto_redirect":{"type":["null","boolean"],"description":"Whether to automatically redirect the customer (return_url must be set)"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Optional metadata to associate with the checkout session.\nDo not store any sensitive information here."},"customer_details":{"$ref":"#/components/schemas/CheckoutCustomerDetailsDto"}},"additionalProperties":false,"description":"Request to create a new checkout session from your back-end server using the management API.\n`customer_id` needs to be specified explicitly here instead of using a Customer token."},"CreateCheckoutSessionLineManagementDto":{"required":["quantity"],"type":"object","properties":{"subscription":{"type":["null","boolean"],"description":"Determines whether this line should create a subscription"},"trial":{"type":["null","boolean"],"description":"Indicates whether the product should be trialed"},"gift_to":{"$ref":"#/components/schemas/CustomerPlatformAccountDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":"integer","description":"The quantity of this product to purchase","format":"int32"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Key-value pair mapping custom variable identifiers to their selected values.\nRequired only when the product includes custom variables."},"product_id":{"$ref":"#/components/schemas/FlakeId"},"inline_product":{"$ref":"#/components/schemas/InlineProductCreateDto"},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/CreateCheckoutSessionLineManagementPayoutSplitDto"},"description":"Optional payout splits for line items (requires approval)"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Optional metadata to associate with the checkout session line.\nDo not store any sensitive information here."}},"additionalProperties":false,"description":"Represents a line item in a checkout session request.\nOpposed to CreateCheckoutSessionLineDto, this is used while creating a checkout session using the Management API,\nand allows for creating inline products and payout splits (subject to special approval)"},"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"InlineProductCreateDto":{"type":"object","properties":{"slug":{"type":["null","string"],"description":"The unique URL-safe identifier (slug) for the product."},"name":{"type":["null","string"],"description":"The display name of the product."},"description":{"type":["null","string"],"description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"price":{"type":["null","integer"],"description":"The price of the product in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":["null","boolean"],"description":"Indicates whether the customer is prompted to select a game server before purchasing."},"allow_one_time_purchase":{"type":["null","boolean"],"description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":["null","boolean"],"description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":["null","integer"],"description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/UpsertProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/UpsertProductUpsellConfigurationDto"},"remove_after_enabled":{"type":["null","boolean"],"description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":["null","integer"],"description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The tag IDs associated with the product."},"gameservers":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The gameserver IDs associated with the product."},"commands":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution.\nRequires special approval."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.\nSet to `null` to keep enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.\nSet to `null` to keep enabled.","format":"date-time"},"required_product_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Optional inline product definition for dynamic products.\nRequires special approval, use `product_id` instead."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"UpsertProductTrialConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"],"description":"Indicates if trials should be enabled for the product."},"period_value":{"type":["null","integer"],"description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":["null","boolean"],"description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":["null","boolean"],"description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":["null","integer"],"description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":["null","boolean"],"description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":["null","integer"],"description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trials is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"UpsertProductUpsellConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"]},"recommendations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/UpsertProductUpsellRecommendationDto"}}},"additionalProperties":false},"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."},"CreateCheckoutSessionLineManagementPayoutSplitDto":{"required":["payout_id"],"type":"object","properties":{"payout_id":{"type":"string","description":"The ID of the user's payout balance."},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)\nNOTE: The last payout split needs to have a null percentage set (so the remaining amount gets properly allocated)","format":"int64"},"platform_fee":{"type":["null","integer"],"description":"The platform fee percentage applied to this split (in basis points)\nOnly applicable to platforms.","format":"int64"}},"additionalProperties":false},"CheckoutCustomerDetailsDto":{"type":"object","properties":{"billing_name":{"type":["null","string"],"description":"The name the checkout is billed to."},"billing_email":{"type":["null","string"],"description":"The email address the checkout is billed to."},"billing_address":{"$ref":"#/components/schemas/AddressDto"},"billing_tax_id":{"type":["null","string"],"description":"The tax identifier of the customer, such as a VAT number."}},"additionalProperties":false,"description":"The billing details of the customer the checkout belongs to."},"AddressDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country of the address"},"state":{"type":["null","string"],"description":"The state or province of the address"},"city":{"type":["null","string"],"description":"The city of the address"},"postal_code":{"type":["null","string"],"description":"The postal code or zip code of the address"},"line_1":{"type":["null","string"],"description":"The first line of the street address"},"line_2":{"type":["null","string"],"description":"The second line of the street address, if any (apartment, suite, etc.)"}},"additionalProperties":false,"description":"Represents a physical or billing address"},"CreateCheckoutSessionResponseDto":{"required":["id","token","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"token":{"type":"string","description":"The token for the checkout session"},"url":{"type":"string","description":"The URL to redirect the customer to complete checkout"}},"additionalProperties":false,"description":"Response after creating a checkout session"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/checkouts":{"post":{"tags":["checkout"],"summary":"Create a checkout session","description":"Creates a checkout session from a secure server using an API Key.\nIf you have a Customer token, see the Storefront API Create Checkout endpoint.","operationId":"StoreCheckouts_CreateCheckoutSession","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionManagementDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionManagementDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionManagementDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Coupons

## GET /v1/stores/{storeId}/coupons

> Fetches all coupons for a store id

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"coupons"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CouponFilterStatusDto":{"enum":["all","active","inactive"],"type":"string","description":"Will filter by coupon status."},"CouponFilterTypeDto":{"enum":["all","manual","generated"],"type":"string","description":"Will filter by coupon creation type."},"CouponDto":{"required":["code","created_at","discount_amount","discount_apply_before_sales","discount_apply_individually","discount_type","duration","enabled","id","minimum_order_value","redeem_limit_customer_amount","redeem_limit_customer_enabled","redeem_limit_store_amount","redeem_limit_store_enabled","store_id","usable_on_one_time_purchase","usable_on_subscription","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the coupon is enabled."},"code":{"type":"string","description":"The unique code associated with the coupon."},"note":{"type":["null","string"],"description":"A note or internal description of the coupon."},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"description":"The number of months the coupon is valid for, used if the duration is repeating.","format":"int32","deprecated":true},"duration_in_intervals":{"type":["null","integer"],"description":"The number of subscription renewals the coupon is valid for, used if the duration is repeating.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount in the smallest currency unit (e.g., cents).","format":"int64"},"discount_apply_individually":{"type":"boolean","description":"Indicates whether the discount should be applied individually to required tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Indicates whether the discount is applied before existing sales."},"apply_to_products":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the coupon applies to."},"apply_to_tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the coupon applies to."},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to use the coupon.","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean","description":"Indicates whether a global redemption limit is enabled."},"redeem_limit_store_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed across the store.","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean","description":"Indicates whether a per-customer redemption limit is enabled."},"redeem_limit_customer_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed per customer.","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean","description":"Indicates whether the coupon can be used for one-time purchases."},"usable_on_subscription":{"type":"boolean","description":"Indicates whether the coupon can be used for subscriptions."},"usable_at":{"type":["null","string"],"description":"The date and time when the coupon becomes valid.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the coupon expires.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the coupon was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the coupon was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a coupon, including configuration and audit information."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/coupons":{"get":{"tags":["coupons"],"summary":"Fetches all coupons for a store id","operationId":"StoreCoupons_GetCouponsForStore","parameters":[{"name":"storeId","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}},{"name":"status","in":"query","description":"Filter by status","schema":{"$ref":"#/components/schemas/CouponFilterStatusDto"}},{"name":"type","in":"query","description":"Filter by creation type of coupons.","schema":{"$ref":"#/components/schemas/CouponFilterTypeDto"}},{"name":"usable_by_customer_id","in":"query","description":"Filter by ID of the customer this coupon is assigned to.","schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CouponDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/coupons

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"coupons"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateCouponDto":{"required":["enabled","code","duration","discount_type","discount_amount","discount_apply_individually","discount_apply_before_sales","minimum_order_value","redeem_limit_store_enabled","redeem_limit_store_amount","redeem_limit_customer_enabled","redeem_limit_customer_amount","usable_on_one_time_purchase","usable_on_subscription"],"type":"object","properties":{"enabled":{"type":"boolean"},"code":{"type":"string"},"note":{"type":"string"},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"format":"int32"},"duration_in_intervals":{"type":["null","integer"],"format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"discount_apply_individually":{"type":"boolean"},"discount_apply_before_sales":{"type":"boolean"},"apply_to_products":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"apply_to_tags":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean"},"redeem_limit_store_amount":{"type":"integer","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean"},"redeem_limit_customer_amount":{"type":"integer","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean"},"usable_on_subscription":{"type":"boolean"},"usable_at":{"type":["null","string"],"format":"date-time"},"expires_at":{"type":["null","string"],"format":"date-time"}}},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"CouponDto":{"required":["code","created_at","discount_amount","discount_apply_before_sales","discount_apply_individually","discount_type","duration","enabled","id","minimum_order_value","redeem_limit_customer_amount","redeem_limit_customer_enabled","redeem_limit_store_amount","redeem_limit_store_enabled","store_id","usable_on_one_time_purchase","usable_on_subscription","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the coupon is enabled."},"code":{"type":"string","description":"The unique code associated with the coupon."},"note":{"type":["null","string"],"description":"A note or internal description of the coupon."},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"description":"The number of months the coupon is valid for, used if the duration is repeating.","format":"int32","deprecated":true},"duration_in_intervals":{"type":["null","integer"],"description":"The number of subscription renewals the coupon is valid for, used if the duration is repeating.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount in the smallest currency unit (e.g., cents).","format":"int64"},"discount_apply_individually":{"type":"boolean","description":"Indicates whether the discount should be applied individually to required tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Indicates whether the discount is applied before existing sales."},"apply_to_products":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the coupon applies to."},"apply_to_tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the coupon applies to."},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to use the coupon.","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean","description":"Indicates whether a global redemption limit is enabled."},"redeem_limit_store_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed across the store.","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean","description":"Indicates whether a per-customer redemption limit is enabled."},"redeem_limit_customer_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed per customer.","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean","description":"Indicates whether the coupon can be used for one-time purchases."},"usable_on_subscription":{"type":"boolean","description":"Indicates whether the coupon can be used for subscriptions."},"usable_at":{"type":["null","string"],"description":"The date and time when the coupon becomes valid.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the coupon expires.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the coupon was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the coupon was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a coupon, including configuration and audit information."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/coupons":{"post":{"tags":["coupons"],"operationId":"StoreCoupons_CreateCouponForStore","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCouponDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateCouponDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateCouponDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/coupons/{couponId}

> Retrieves a coupon by ID

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"coupons"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CouponDto":{"required":["code","created_at","discount_amount","discount_apply_before_sales","discount_apply_individually","discount_type","duration","enabled","id","minimum_order_value","redeem_limit_customer_amount","redeem_limit_customer_enabled","redeem_limit_store_amount","redeem_limit_store_enabled","store_id","usable_on_one_time_purchase","usable_on_subscription","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the coupon is enabled."},"code":{"type":"string","description":"The unique code associated with the coupon."},"note":{"type":["null","string"],"description":"A note or internal description of the coupon."},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"description":"The number of months the coupon is valid for, used if the duration is repeating.","format":"int32","deprecated":true},"duration_in_intervals":{"type":["null","integer"],"description":"The number of subscription renewals the coupon is valid for, used if the duration is repeating.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount in the smallest currency unit (e.g., cents).","format":"int64"},"discount_apply_individually":{"type":"boolean","description":"Indicates whether the discount should be applied individually to required tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Indicates whether the discount is applied before existing sales."},"apply_to_products":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the coupon applies to."},"apply_to_tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the coupon applies to."},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to use the coupon.","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean","description":"Indicates whether a global redemption limit is enabled."},"redeem_limit_store_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed across the store.","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean","description":"Indicates whether a per-customer redemption limit is enabled."},"redeem_limit_customer_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed per customer.","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean","description":"Indicates whether the coupon can be used for one-time purchases."},"usable_on_subscription":{"type":"boolean","description":"Indicates whether the coupon can be used for subscriptions."},"usable_at":{"type":["null","string"],"description":"The date and time when the coupon becomes valid.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the coupon expires.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the coupon was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the coupon was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a coupon, including configuration and audit information."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/coupons/{couponId}":{"get":{"tags":["coupons"],"summary":"Retrieves a coupon by ID","operationId":"StoreCoupons_GetCouponByIdForStore","parameters":[{"name":"storeId","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"couponId","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/coupons/{couponId}

> Deletes a coupon

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"coupons"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/coupons/{couponId}":{"delete":{"tags":["coupons"],"summary":"Deletes a coupon","operationId":"StoreCoupons_DeleteCouponForStore","parameters":[{"name":"storeId","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"couponId","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/coupons/{couponId}

> Performs a Delta Update of a Coupon

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"coupons"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateCouponDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"code":{"type":"string"},"note":{"type":"string"},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"format":"int32"},"duration_in_intervals":{"type":["null","integer"],"format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"discount_apply_individually":{"type":"boolean"},"discount_apply_before_sales":{"type":"boolean"},"apply_to_products":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"apply_to_tags":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean"},"redeem_limit_store_amount":{"type":"integer","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean"},"redeem_limit_customer_amount":{"type":"integer","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean"},"usable_on_subscription":{"type":"boolean"},"usable_at":{"type":["null","string"],"format":"date-time"},"expires_at":{"type":["null","string"],"format":"date-time"}}},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"CouponDto":{"required":["code","created_at","discount_amount","discount_apply_before_sales","discount_apply_individually","discount_type","duration","enabled","id","minimum_order_value","redeem_limit_customer_amount","redeem_limit_customer_enabled","redeem_limit_store_amount","redeem_limit_store_enabled","store_id","usable_on_one_time_purchase","usable_on_subscription","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the coupon is enabled."},"code":{"type":"string","description":"The unique code associated with the coupon."},"note":{"type":["null","string"],"description":"A note or internal description of the coupon."},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"description":"The number of months the coupon is valid for, used if the duration is repeating.","format":"int32","deprecated":true},"duration_in_intervals":{"type":["null","integer"],"description":"The number of subscription renewals the coupon is valid for, used if the duration is repeating.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount in the smallest currency unit (e.g., cents).","format":"int64"},"discount_apply_individually":{"type":"boolean","description":"Indicates whether the discount should be applied individually to required tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Indicates whether the discount is applied before existing sales."},"apply_to_products":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the coupon applies to."},"apply_to_tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the coupon applies to."},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to use the coupon.","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean","description":"Indicates whether a global redemption limit is enabled."},"redeem_limit_store_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed across the store.","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean","description":"Indicates whether a per-customer redemption limit is enabled."},"redeem_limit_customer_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed per customer.","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean","description":"Indicates whether the coupon can be used for one-time purchases."},"usable_on_subscription":{"type":"boolean","description":"Indicates whether the coupon can be used for subscriptions."},"usable_at":{"type":["null","string"],"description":"The date and time when the coupon becomes valid.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the coupon expires.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the coupon was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the coupon was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a coupon, including configuration and audit information."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/coupons/{couponId}":{"patch":{"tags":["coupons"],"summary":"Performs a Delta Update of a Coupon","operationId":"StoreCoupons_UpdateCouponForStore","parameters":[{"name":"storeId","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"couponId","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCouponDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateCouponDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateCouponDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Custom Variables

## Get custom variables

> Retrieves all custom variables for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables":{"get":{"tags":["custom-variables"],"summary":"Get custom variables","description":"Retrieves all custom variables for the specified store.","operationId":"CustomVariables_GetCustomVariablesForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve custom variables for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Create custom variable

> Creates a new custom variable for the specified store.\
> Custom variables allow customers to provide additional input when purchasing products.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertCustomVariableRequestDto":{"required":["identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string for programmatic reference.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name shown to customers."},"description":{"type":["null","string"],"description":"Description explaining the purpose of this custom variable."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern for validating customer input.\nOnly applies to text and number types. Ignored for dropdown types."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionRequestDto"},"description":"Predefined options for dropdown-type custom variables.\nRequired for dropdown types, ignored for text and number types.\nWhen updating, this completely replaces all existing options."}},"additionalProperties":false,"description":"Unified request model for creating or updating custom variables.\nContains all the configurable properties of a custom variable."},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionRequestDto":{"required":["is_default","name","price","price_type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"The value the command variable will be replaced with."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).\nIf fixed, the value is in cents, if a percentage, in permille.","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default.\nOnly one option per custom variable should be marked as default."}},"additionalProperties":false,"description":"Request model for defining custom variable options.\nUsed within UpsertCustomVariableRequestDto for dropdown-type variables."},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables":{"post":{"tags":["custom-variables"],"summary":"Create custom variable","description":"Creates a new custom variable for the specified store.\nCustom variables allow customers to provide additional input when purchasing products.","operationId":"CustomVariables_CreateCustomVariableForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to create the custom variable in.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"description":"The custom variable data to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVariableDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get custom variable

> Retrieves a specific custom variable by ID from the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables/{customVariableId}":{"get":{"tags":["custom-variables"],"summary":"Get custom variable","description":"Retrieves a specific custom variable by ID from the specified store.","operationId":"CustomVariables_GetCustomVariableByIdForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the custom variable belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customVariableId","in":"path","description":"The ID of the custom variable to retrieve.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVariableDto"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Delete custom variable

> Deletes a custom variable from the specified store.\
> This will also delete all associated options and cannot be undone.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables/{customVariableId}":{"delete":{"tags":["custom-variables"],"summary":"Delete custom variable","description":"Deletes a custom variable from the specified store.\nThis will also delete all associated options and cannot be undone.","operationId":"CustomVariables_DeleteCustomVariableForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the custom variable belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customVariableId","in":"path","description":"The ID of the custom variable to delete.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update custom variable

> Performs a partial update of a custom variable using field mask.\
> Only the fields specified in the request will be updated.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertCustomVariableRequestDto":{"required":["identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string for programmatic reference.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name shown to customers."},"description":{"type":["null","string"],"description":"Description explaining the purpose of this custom variable."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern for validating customer input.\nOnly applies to text and number types. Ignored for dropdown types."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionRequestDto"},"description":"Predefined options for dropdown-type custom variables.\nRequired for dropdown types, ignored for text and number types.\nWhen updating, this completely replaces all existing options."}},"additionalProperties":false,"description":"Unified request model for creating or updating custom variables.\nContains all the configurable properties of a custom variable."},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionRequestDto":{"required":["is_default","name","price","price_type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"The value the command variable will be replaced with."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).\nIf fixed, the value is in cents, if a percentage, in permille.","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default.\nOnly one option per custom variable should be marked as default."}},"additionalProperties":false,"description":"Request model for defining custom variable options.\nUsed within UpsertCustomVariableRequestDto for dropdown-type variables."},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables/{customVariableId}":{"patch":{"tags":["custom-variables"],"summary":"Update custom variable","description":"Performs a partial update of a custom variable using field mask.\nOnly the fields specified in the request will be updated.","operationId":"CustomVariables_UpdateCustomVariableForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the custom variable belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customVariableId","in":"path","description":"The ID of the custom variable to update.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"description":"The custom variable data to update with field mask.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVariableDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Customers

## Get customers

> Retrieves all customers for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"customers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers":{"get":{"tags":["customers"],"summary":"Get customers","description":"Retrieves all customers for the specified store.","operationId":"Customers_GetCustomers","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve customers for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"customer_id","in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Create customer

> Creates a new customer based on the fields passed.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"customers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertCustomerRequestDto":{"type":"object","properties":{"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID for the customer."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The Xbox XUID (Xbox User ID) for the customer."},"name":{"type":["null","string"],"description":"The name of the customer."},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional customer information stored as key-value pairs."}},"additionalProperties":false},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers":{"post":{"tags":["customers"],"summary":"Create customer","description":"Creates a new customer based on the fields passed.","operationId":"Customers_CreateCustomer","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to create the customer for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get customer by ID

> Retrieves a customer by the ID for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"customers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}":{"get":{"tags":["customers"],"summary":"Get customer by ID","description":"Retrieves a customer by the ID for the specified store.","operationId":"Customers_GetCustomerById","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve the customer for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","description":"The ID of the customer.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update customer

> Updates an existing customer based on the fields passed.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"customers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertCustomerRequestDto":{"type":"object","properties":{"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID for the customer."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The Xbox XUID (Xbox User ID) for the customer."},"name":{"type":["null","string"],"description":"The name of the customer."},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional customer information stored as key-value pairs."}},"additionalProperties":false},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}":{"patch":{"tags":["customers"],"summary":"Update customer","description":"Updates an existing customer based on the fields passed.","operationId":"Customers_UpdateCustomer","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to update the customer for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Create customer token

> Generates a customer token that can be used by the Storefront (Headless) API.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"customers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerTokenResponseDto":{"required":["token"],"type":"object","properties":{"token":{"type":"string","description":"The generated Customer token."}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/tokens":{"post":{"tags":["customers"],"summary":"Create customer token","description":"Generates a customer token that can be used by the Storefront (Headless) API.","operationId":"Customers_CreateCustomerToken","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to generate the customer token for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","description":"The ID of the customer to generate the customer token for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerTokenResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Invalidate customer tokens

> Invalidates all generated customer tokens.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"customers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/tokens":{"delete":{"tags":["customers"],"summary":"Invalidate customer tokens","description":"Invalidates all generated customer tokens.","operationId":"Customers_InvalidateCustomerTokens","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to invalidate the customer tokens for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","description":"The ID of the customer to invalidate the customer tokens for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Lookup customer

> Looks up a customer by an external platform ID.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"customers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/lookup":{"get":{"tags":["customers"],"summary":"Lookup customer","description":"Looks up a customer by an external platform ID.","operationId":"Customers_LookupCustomer","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve the customer for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"id","in":"query","description":"Looks up customer by PayNow Customer ID.","schema":{"type":"string"}},{"name":"steam_id","in":"query","description":"Looks up customer by Steam ID 64.","schema":{"$ref":"#/components/schemas/SteamId"}},{"name":"minecraft_uuid","in":"query","description":"Looks up customer by a Minecraft UUID.","schema":{"type":"string"}},{"name":"xbox_xuid","in":"query","description":"Looks up customer by an Xbox XUID.","schema":{"type":"string"}},{"name":"minecraft_java_name","in":"query","description":"Looks up customer by Minecraft Java name.","schema":{"type":"string"}},{"name":"minecraft_bedrock_name","in":"query","description":"Looks up customer by Minecraft Bedrock name.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Looks up customer by a PayNow Customer Name.\nName has to be explicitly set in the Customer entity - profile names won't be matched.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Bulk create customers

> Creates up to 200 customers at once.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"customers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertCustomerRequestDto":{"type":"object","properties":{"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID for the customer."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The Xbox XUID (Xbox User ID) for the customer."},"name":{"type":["null","string"],"description":"The name of the customer."},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional customer information stored as key-value pairs."}},"additionalProperties":false},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/bulk":{"post":{"tags":["customers"],"summary":"Bulk create customers","description":"Creates up to 200 customers at once.","operationId":"Customers_BulkCreateCustomers","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to create the customers for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpsertCustomerRequestDto"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Data Migrations

## GET /v1/stores/{storeId}/data-migrations

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"data-migrations"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DataMigrationTaskDto":{"required":["id","platform","started_at","started_by","store_id","token","total_entities_migrated"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"platform":{"type":"string","description":"Platform from which data is being migrated (e.g., \"tebex\")."},"token":{"type":"string","description":"Masked authentication token used for accessing the source platform API."},"error":{"type":["null","string"],"description":"Error message if the migration encountered any errors, otherwise null."},"started_at":{"type":"string","description":"Timestamp when the migration was initiated.","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Timestamp when the migration failed, or null if it didn't fail.","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Timestamp when the migration was successfully completed, or null if not completed.","format":"date-time"},"total_entities_to_migrate":{"type":["null","integer"],"description":"Total number of entities that need to be migrated, or null if unknown.","format":"int64"},"total_entities_migrated":{"type":"integer","description":"Number of entities that have been successfully migrated.","format":"int32"},"started_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/data-migrations":{"get":{"tags":["data-migrations"],"operationId":"DataMigrations_GetDataMigrations","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataMigrationTaskDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/data-migrations/tebex

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"data-migrations"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StartDataMigrationFromTebexRequestDto":{"required":["headless_token","plugin_token"],"type":"object","properties":{"headless_token":{"type":"string","description":"The public-facing Headless API token."},"plugin_token":{"type":"string","description":"An API token associated to a Tebex game server."}},"additionalProperties":false},"DataMigrationTaskDto":{"required":["id","platform","started_at","started_by","store_id","token","total_entities_migrated"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"platform":{"type":"string","description":"Platform from which data is being migrated (e.g., \"tebex\")."},"token":{"type":"string","description":"Masked authentication token used for accessing the source platform API."},"error":{"type":["null","string"],"description":"Error message if the migration encountered any errors, otherwise null."},"started_at":{"type":"string","description":"Timestamp when the migration was initiated.","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Timestamp when the migration failed, or null if it didn't fail.","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Timestamp when the migration was successfully completed, or null if not completed.","format":"date-time"},"total_entities_to_migrate":{"type":["null","integer"],"description":"Total number of entities that need to be migrated, or null if unknown.","format":"int64"},"total_entities_migrated":{"type":"integer","description":"Number of entities that have been successfully migrated.","format":"int32"},"started_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/data-migrations/tebex":{"post":{"tags":["data-migrations"],"operationId":"DataMigrations_StartDataMigrationFromTebex","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDataMigrationFromTebexRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/StartDataMigrationFromTebexRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/StartDataMigrationFromTebexRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataMigrationTaskDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Delivery

## Get delivery items associated with an order

> Retrieves all delivery items associated with a specific order.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DeliveryItemDto":{"required":["added_at","command_attempts","custom_variables","customer","customer_id","expirable","gift","id","product","skip_commands","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"order_customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_customer":{"$ref":"#/components/schemas/CustomerDto"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"},"revoked_by":{"$ref":"#/components/schemas/ActorDto"},"command_attempts":{"type":"array","items":{"$ref":"#/components/schemas/CommandAttemptDto"},"description":"The command execution attempts for this delivery item"},"skip_commands":{"type":"boolean","description":"Indicates whether command execution should be skipped for this item"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variables associated with the delivery item"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/orders/{orderId}/delivery/items":{"get":{"tags":["delivery"],"summary":"Get delivery items associated with an order","description":"Retrieves all delivery items associated with a specific order.","operationId":"OrdersDelivery_GetOrderDeliveryItems","parameters":[{"name":"storeId","in":"path","description":"The ID of the store.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"orderId","in":"path","description":"The ID of the order to retrieve delivery items from.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"activeOnly","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get all delivery items

> Retrieves all delivery items associated with this store (paginated)

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DeliveryItemDto":{"required":["added_at","command_attempts","custom_variables","customer","customer_id","expirable","gift","id","product","skip_commands","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"order_customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_customer":{"$ref":"#/components/schemas/CustomerDto"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"},"revoked_by":{"$ref":"#/components/schemas/ActorDto"},"command_attempts":{"type":"array","items":{"$ref":"#/components/schemas/CommandAttemptDto"},"description":"The command execution attempts for this delivery item"},"skip_commands":{"type":"boolean","description":"Indicates whether command execution should be skipped for this item"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variables associated with the delivery item"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/delivery/items":{"get":{"tags":["delivery"],"summary":"Get all delivery items","description":"Retrieves all delivery items associated with this store (paginated)","operationId":"Delivery_GetStoreDeliveryItems","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}},{"name":"activeOnly","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Assign delivery items in bulk

> Allows you to assign multiple delivery items for multiple customers in bulk

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DeliveryItemAssignmentBulkDto":{"required":["customer_id"],"type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":["null","integer"],"description":"Quantity of products to assign.","format":"int32"},"override_expires_at":{"type":["null","string"],"description":"Override expiry date for the delivery item.","format":"date-time"},"skip_commands":{"type":["null","boolean"],"description":"Skip command execution when assigning the item."},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Custom variables for the assignment."}},"additionalProperties":false},"DeliveryItemDto":{"required":["added_at","command_attempts","custom_variables","customer","customer_id","expirable","gift","id","product","skip_commands","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"order_customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_customer":{"$ref":"#/components/schemas/CustomerDto"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"},"revoked_by":{"$ref":"#/components/schemas/ActorDto"},"command_attempts":{"type":"array","items":{"$ref":"#/components/schemas/CommandAttemptDto"},"description":"The command execution attempts for this delivery item"},"skip_commands":{"type":"boolean","description":"Indicates whether command execution should be skipped for this item"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variables associated with the delivery item"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/delivery/items":{"post":{"tags":["delivery"],"summary":"Assign delivery items in bulk","description":"Allows you to assign multiple delivery items for multiple customers in bulk","operationId":"Delivery_AssignDeliveryItemsBulk","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemAssignmentBulkDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemAssignmentBulkDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemAssignmentBulkDto"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/delivery/commands/unqueue

> Unqueue commands by Attempt IDs

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UnqueueCommandsRequestDto":{"required":["attempt_ids"],"type":"object","properties":{"attempt_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}}},"additionalProperties":false},"UnqueueCommandsResponseDto":{"required":["unqueued_count"],"type":"object","properties":{"unqueued_count":{"type":"integer","format":"int64"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/delivery/commands/unqueue":{"post":{"tags":["delivery"],"summary":"Unqueue commands by Attempt IDs","operationId":"Delivery_UnqueueDeliveryCommandAttemptByAttemptIDs","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnqueueCommandsRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UnqueueCommandsRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UnqueueCommandsRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnqueueCommandsResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get delivery items associated with a customer

> Retrieves delivery items associated with a customer

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DeliveryItemDto":{"required":["added_at","command_attempts","custom_variables","customer","customer_id","expirable","gift","id","product","skip_commands","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"order_customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_customer":{"$ref":"#/components/schemas/CustomerDto"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"},"revoked_by":{"$ref":"#/components/schemas/ActorDto"},"command_attempts":{"type":"array","items":{"$ref":"#/components/schemas/CommandAttemptDto"},"description":"The command execution attempts for this delivery item"},"skip_commands":{"type":"boolean","description":"Indicates whether command execution should be skipped for this item"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variables associated with the delivery item"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/delivery/items":{"get":{"tags":["delivery"],"summary":"Get delivery items associated with a customer","description":"Retrieves delivery items associated with a customer","operationId":"CustomersDelivery_GetCustomerDeliveryItems","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}},{"name":"activeOnly","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Assign a delivery item to a customer

> Allows you to assign a delivery item to a customer

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DeliveryItemAssignmentDto":{"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":["null","integer"],"description":"Quantity of products to assign.","format":"int32"},"override_expires_at":{"type":["null","string"],"description":"Override expiry date for the delivery item.","format":"date-time"},"skip_commands":{"type":["null","boolean"],"description":"Skip command execution when assigning the item."},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Custom variables for the assignment."}},"additionalProperties":false},"DeliveryItemDto":{"required":["added_at","command_attempts","custom_variables","customer","customer_id","expirable","gift","id","product","skip_commands","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"order_customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_customer":{"$ref":"#/components/schemas/CustomerDto"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"},"revoked_by":{"$ref":"#/components/schemas/ActorDto"},"command_attempts":{"type":"array","items":{"$ref":"#/components/schemas/CommandAttemptDto"},"description":"The command execution attempts for this delivery item"},"skip_commands":{"type":"boolean","description":"Indicates whether command execution should be skipped for this item"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variables associated with the delivery item"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/delivery/items":{"post":{"tags":["delivery"],"summary":"Assign a delivery item to a customer","description":"Allows you to assign a delivery item to a customer","operationId":"CustomersDelivery_AssignDeliveryItem","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryItemAssignmentDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/DeliveryItemAssignmentDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/DeliveryItemAssignmentDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Revoke a delivery item from a customer

> Allows you to revoke a delivery item associated with a customer

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/delivery/items/{deliveryItemId}":{"delete":{"tags":["delivery"],"summary":"Revoke a delivery item from a customer","description":"Allows you to revoke a delivery item associated with a customer","operationId":"CustomersDelivery_RevokeDeliveryItem","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"deliveryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get command attempts associated with a customer

> Retrieves command attempts associated with a customer

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/delivery/commands":{"get":{"tags":["delivery"],"summary":"Get command attempts associated with a customer","description":"Retrieves command attempts associated with a customer","operationId":"CustomersDelivery_GetCommandAttemptsForCustomer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommandAttemptDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/gameservers/{gameServerId}/delivery/items

> Returns delivery items in which an associated command attempt is for the gameserver

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DeliveryItemDto":{"required":["added_at","command_attempts","custom_variables","customer","customer_id","expirable","gift","id","product","skip_commands","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"order_customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_customer":{"$ref":"#/components/schemas/CustomerDto"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"},"revoked_by":{"$ref":"#/components/schemas/ActorDto"},"command_attempts":{"type":"array","items":{"$ref":"#/components/schemas/CommandAttemptDto"},"description":"The command execution attempts for this delivery item"},"skip_commands":{"type":"boolean","description":"Indicates whether command execution should be skipped for this item"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variables associated with the delivery item"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/delivery/items":{"get":{"tags":["delivery"],"summary":"Returns delivery items in which an associated command attempt is for the gameserver","operationId":"GameServersDelivery_GetGameServerDeliveryItems","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}},{"name":"activeOnly","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryItemDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/gameservers/{gameServerId}/delivery/commands/resend

> Resend commands for a given Gameserver

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"delivery"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ResendCommandsForGameServerRequestDto":{"type":"object","properties":{"starts_at":{"type":["null","string"],"format":"date-time"},"ends_at":{"type":["null","string"],"format":"date-time"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ResendCommandsForGameServerResponseDto":{"required":["enqueued_commands_count"],"type":"object","properties":{"enqueued_commands_count":{"type":"integer","format":"int32"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/delivery/commands/resend":{"post":{"tags":["delivery"],"summary":"Resend commands for a given Gameserver","operationId":"GameServersDelivery_ResendDeliveryCommandsForGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCommandsForGameServerRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/ResendCommandsForGameServerRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ResendCommandsForGameServerRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCommandsForGameServerResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Discord

## GET /v1/stores/{storeId}/product\_versions/{productVersionId}/discord\_actions

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordActionDto":{"required":["action_type","discord_server_id","execution_stage","id","product_id","product_version_id","revocation_stages","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]}},"additionalProperties":false},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions":{"get":{"tags":["discord"],"operationId":"ProductsDiscord_GetActions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productVersionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PUT /v1/stores/{storeId}/product\_versions/{productVersionId}/discord\_actions

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SetDiscordActionDto":{"required":["action_type","discord_server_id","execution_stage"],"type":"object","properties":{"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"revocation_stages":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]}},"additionalProperties":false},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionDto":{"required":["action_type","discord_server_id","execution_stage","id","product_id","product_version_id","revocation_stages","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions":{"put":{"tags":["discord"],"operationId":"ProductsDiscord_CreateAction","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productVersionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SetDiscordActionDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SetDiscordActionDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SetDiscordActionDto"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordActionDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/orders/{orderId}/discord

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordProfileDto":{"required":["avatar_hash","discord_id","username"],"type":"object","properties":{"discord_id":{"$ref":"#/components/schemas/FlakeId"},"username":{"type":"string"},"avatar_hash":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/orders/{orderId}/discord":{"get":{"tags":["discord"],"operationId":"OrdersDiscord_GetLinkedDiscordAccounts","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"orderId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DiscordProfileDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/orders/{orderId}/discord/queued

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"QueuedDiscordActionDto":{"required":["action_type","delivery_item_id","discord_server_id","enqueued_at","execution_stage","executions","id","product_id","product_version_id","revocation_stages","status","store_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"status":{"$ref":"#/components/schemas/QueuedDiscordActionStatus"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"delivery_item_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"discord_user_id":{"$ref":"#/components/schemas/FlakeId"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"enqueued_at":{"type":"string","format":"date-time"},"finalised_at":{"type":["null","string"],"format":"date-time"},"executions":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionDto"}}},"additionalProperties":false},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionStatus":{"enum":["active","complete","errored","canceled"],"type":"string"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionExecutionDto":{"required":["executed_at","execution_status","id","queue_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"queue_id":{"type":"integer","format":"int64"},"executed_at":{"type":"string","format":"date-time"},"execution_status":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionStatus"},"message":{"type":["null","string"]},"trace_id":{"type":["null","string"]}},"additionalProperties":false},"QueuedDiscordActionExecutionStatus":{"enum":["success","failure"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/orders/{orderId}/discord/queued":{"get":{"tags":["discord"],"operationId":"OrdersDiscord_GetDiscordActionExecutionHistory","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"orderId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/inventory/{inventoryItemId}/discord/queued

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"QueuedDiscordActionDto":{"required":["action_type","delivery_item_id","discord_server_id","enqueued_at","execution_stage","executions","id","product_id","product_version_id","revocation_stages","status","store_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"status":{"$ref":"#/components/schemas/QueuedDiscordActionStatus"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"delivery_item_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"discord_user_id":{"$ref":"#/components/schemas/FlakeId"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"enqueued_at":{"type":"string","format":"date-time"},"finalised_at":{"type":["null","string"],"format":"date-time"},"executions":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionDto"}}},"additionalProperties":false},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionStatus":{"enum":["active","complete","errored","canceled"],"type":"string"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionExecutionDto":{"required":["executed_at","execution_status","id","queue_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"queue_id":{"type":"integer","format":"int64"},"executed_at":{"type":"string","format":"date-time"},"execution_status":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionStatus"},"message":{"type":["null","string"]},"trace_id":{"type":["null","string"]}},"additionalProperties":false},"QueuedDiscordActionExecutionStatus":{"enum":["success","failure"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/queued":{"get":{"tags":["discord"],"operationId":"DiscordInventoryItem_GetQueuedDiscordActionForDeliveryItem","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"inventoryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordProfileDto":{"required":["avatar_hash","discord_id","username"],"type":"object","properties":{"discord_id":{"$ref":"#/components/schemas/FlakeId"},"username":{"type":"string"},"avatar_hash":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link":{"get":{"tags":["discord"],"operationId":"DiscordInventoryItem_GetUserToDeliveryItemLinks","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"inventoryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordProfileDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PUT /v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link":{"put":{"tags":["discord"],"operationId":"DiscordInventoryItem_SetUserToDeliveryItemLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"inventoryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"discordUserId","in":"query","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link":{"delete":{"tags":["discord"],"operationId":"DiscordInventoryItem_DeleteUserToDeliveryItemLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"inventoryItemId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/discord/links

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerLinkDto":{"required":["created_at","store_id","token"],"type":"object","properties":{"token":{"type":"string"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"server_id":{"$ref":"#/components/schemas/FlakeId"},"server_name":{"type":["null","string"]},"server_icon_url":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"linked_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/links":{"get":{"tags":["discord"],"operationId":"DiscordServers_GetDiscordServerLinks","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerLinkDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/discord/links

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerLinkDto":{"required":["created_at","store_id","token"],"type":"object","properties":{"token":{"type":"string"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"server_id":{"$ref":"#/components/schemas/FlakeId"},"server_name":{"type":["null","string"]},"server_icon_url":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"linked_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/links":{"post":{"tags":["discord"],"operationId":"DiscordServers_CreateDiscordServerLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordServerLinkDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/discord/links/{token}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerLinkDto":{"required":["created_at","store_id","token"],"type":"object","properties":{"token":{"type":"string"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"server_id":{"$ref":"#/components/schemas/FlakeId"},"server_name":{"type":["null","string"]},"server_icon_url":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"linked_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/links/{token}":{"delete":{"tags":["discord"],"operationId":"DiscordServers_DeleteDiscordServerLinks","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerLinkDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/discord/{discordServerId}/roles

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerRoleDto":{"required":["id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/{discordServerId}/roles":{"get":{"tags":["discord"],"operationId":"DiscordServers_GetDiscordServerRoles","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"discordServerId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerRoleDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/discord/{discordServerId}/discord/text\_channels

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"discord"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordServerChannelDto":{"required":["category","id","name"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/discord/{discordServerId}/discord/text_channels":{"get":{"tags":["discord"],"operationId":"DiscordServers_GetDiscordServerTextChannels","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"discordServerId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerChannelDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Downloadable Files

## GET /v1/stores/{storeId}/products/{productId}/downloadable-files

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"downloadable-files"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductDownloadableFileDto":{"required":["created_at","created_by","id","is_uploaded","product_id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"is_uploaded":{"type":"boolean"},"file_name":{"type":["null","string"]},"file_content_type":{"type":["null","string"]},"file_size":{"type":["null","integer"],"format":"int64"},"file_hash":{"type":["null","string"]},"description":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/downloadable-files":{"get":{"tags":["downloadable-files"],"operationId":"ProductsDownloadableFile_GetDownloadableFiles","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDownloadableFileDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/products/{productId}/downloadable-files

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"downloadable-files"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StartDownloadableFileUploadRequestDto":{"required":["file_content_type","file_name"],"type":"object","properties":{"file_name":{"type":"string"},"file_content_type":{"type":"string"},"description":{"type":["null","string"]}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/downloadable-files":{"post":{"tags":["downloadable-files"],"operationId":"ProductsDownloadableFile_StartDownloadableFileUpload","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDownloadableFileUploadRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/StartDownloadableFileUploadRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/StartDownloadableFileUploadRequestDto"}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}/finish

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"downloadable-files"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}/finish":{"post":{"tags":["downloadable-files"],"operationId":"ProductsDownloadableFile_FinishDownloadableFileUpload","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"downloadableFileId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}/download-url

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"downloadable-files"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateDownloadableFileDownloadUrlResponseDto":{"required":["download_signed_url"],"type":"object","properties":{"download_signed_url":{"type":"string"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}/download-url":{"get":{"tags":["downloadable-files"],"operationId":"ProductsDownloadableFile_CreateDownloadUrl","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"downloadableFileId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDownloadableFileDownloadUrlResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"downloadable-files"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}":{"delete":{"tags":["downloadable-files"],"operationId":"ProductsDownloadableFile_DeleteDownloadableFile","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"downloadableFileId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Game Servers

## GET /v1/stores/{storeId}/gameservers/{gameServerId}/console

> Get the associated console for a game server.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerConsoleDto":{"required":["assigned_runner_id","connection_status","created_at","created_by","enabled","game_server_id","host","port","secure","store_id","type"],"type":"object","properties":{"game_server_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"assigned_runner_id":{"type":"string"},"connection_status":{"$ref":"#/components/schemas/GameServerConsoleConnectionStatusDto"},"last_heartbeat_at":{"type":["null","string"],"format":"date-time"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":["null","string"]},"secure":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"},"GameServerConsoleConnectionStatusDto":{"enum":["unknown","disconnected","connecting","connected","backoff"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console":{"get":{"tags":["game-servers"],"summary":"Get the associated console for a game server.","operationId":"GameServersConsole_GetGameServerConsole","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerConsoleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/gameservers/{gameServerId}/console

> Create a console for a game server.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateGameServerConsoleDto":{"required":["type","enabled","host","port","secure"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":"string"},"secure":{"type":"boolean"}}},"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"},"GameServerConsoleDto":{"required":["assigned_runner_id","connection_status","created_at","created_by","enabled","game_server_id","host","port","secure","store_id","type"],"type":"object","properties":{"game_server_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"assigned_runner_id":{"type":"string"},"connection_status":{"$ref":"#/components/schemas/GameServerConsoleConnectionStatusDto"},"last_heartbeat_at":{"type":["null","string"],"format":"date-time"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":["null","string"]},"secure":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"GameServerConsoleConnectionStatusDto":{"enum":["unknown","disconnected","connecting","connected","backoff"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console":{"post":{"tags":["game-servers"],"summary":"Create a console for a game server.","operationId":"GameServersConsole_CreateGameServerConsole","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGameServerConsoleDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateGameServerConsoleDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateGameServerConsoleDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerConsoleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/gameservers/{gameServerId}/console

> Delete an associated game server console.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console":{"delete":{"tags":["game-servers"],"summary":"Delete an associated game server console.","operationId":"GameServersConsole_DeleteGameServerConsole","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/gameservers/{gameServerId}/console

> Update a console for a game server.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateGameServerConsoleDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":"string"},"secure":{"type":"boolean"}}},"GameServerConsoleDto":{"required":["assigned_runner_id","connection_status","created_at","created_by","enabled","game_server_id","host","port","secure","store_id","type"],"type":"object","properties":{"game_server_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"assigned_runner_id":{"type":"string"},"connection_status":{"$ref":"#/components/schemas/GameServerConsoleConnectionStatusDto"},"last_heartbeat_at":{"type":["null","string"],"format":"date-time"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":["null","string"]},"secure":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"},"GameServerConsoleConnectionStatusDto":{"enum":["unknown","disconnected","connecting","connected","backoff"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console":{"patch":{"tags":["game-servers"],"summary":"Update a console for a game server.","operationId":"GameServersConsole_UpdateGameServerConsole","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerConsoleDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerConsoleDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerConsoleDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerConsoleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/gameservers/{gameServerId}/console/messages

> Get console messages for a game server.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerConsoleMessageDto":{"required":["message","time","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/GameServerConsoleMessageTypeDto"},"message":{"type":"string"},"time":{"type":"string","format":"date-time"}},"additionalProperties":false},"GameServerConsoleMessageTypeDto":{"enum":["unknown","output","command","response","system"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console/messages":{"get":{"tags":["game-servers"],"summary":"Get console messages for a game server.","operationId":"GameServersConsole_GetGameServerConsoleMessages","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameServerConsoleMessageDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/gameservers

> Get Game Servers for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers":{"get":{"tags":["game-servers"],"summary":"Get Game Servers for a store","operationId":"GameServers_GetGameServers","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameServerDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/gameservers

> Create a new Game Server for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateGameServerDto":{"required":["name","enabled"],"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"}}},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers":{"post":{"tags":["game-servers"],"summary":"Create a new Game Server for a store","operationId":"GameServers_CreateGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGameServerDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateGameServerDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateGameServerDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/gameservers/{gameServerId}

> Get a Game Server by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}":{"get":{"tags":["game-servers"],"summary":"Get a Game Server by ID for a store","operationId":"GameServers_GetGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameServerDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/gameservers/{gameServerId}

> Delete a Game Server by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}":{"delete":{"tags":["game-servers"],"summary":"Delete a Game Server by ID for a store","operationId":"GameServers_DeleteGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/gameservers/{gameServerId}

> Update a Game Server By ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateGameServerDto":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"}}},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}":{"patch":{"tags":["game-servers"],"summary":"Update a Game Server By ID for a store","operationId":"GameServers_UpdateGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/gameservers/{gameServerId}/reset-token

> Reset the API Key Token for a Game Server for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/reset-token":{"post":{"tags":["game-servers"],"summary":"Reset the API Key Token for a Game Server for a store","operationId":"GameServers_ResetGameServerToken","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Giftcards

## GET /v1/stores/{storeId}/giftcards

> Get Gift Cards for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"giftcards"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GiftCardDto":{"required":["balance","code","enabled","id","starting_balance","store_id","usable_at"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the gift card is currently enabled and can be used."},"code":{"type":"string","description":"The unique code that customers use to redeem the gift card."},"note":{"type":["null","string"],"description":"Optional note or description associated with the gift card."},"balance":{"type":"integer","description":"The current balance remaining on the gift card in cents.","format":"int64"},"starting_balance":{"type":"integer","description":"The original balance when the gift card was first created in cents.","format":"int64"},"usable_at":{"type":"string","description":"The date and time when the gift card becomes usable.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the gift card expires, if applicable.","format":"date-time"},"created_at":{"type":["null","string"],"description":"The date and time when the gift card was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the gift card was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"canceled_at":{"type":["null","string"],"description":"The date and time when the gift card was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a gift card in the PayNow system."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/giftcards":{"get":{"tags":["giftcards"],"summary":"Get Gift Cards for a store","operationId":"GiftCards_GetGiftCards","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}},{"name":"code","in":"query","description":"A gift card code to filter by.","schema":{"type":"string"}},{"name":"include_canceled","in":"query","description":"Should canceled gift cards be included in the response?","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/giftcards

> Create a Gift Card for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"giftcards"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateGiftCardDto":{"required":["enabled","code","balance","usable_at"],"type":"object","properties":{"enabled":{"type":"boolean"},"code":{"type":"string"},"note":{"type":"string"},"balance":{"type":"integer","format":"int64"},"usable_at":{"type":"string","format":"date-time"},"expires_at":{"type":["null","string"],"format":"date-time"}}},"GiftCardDto":{"required":["balance","code","enabled","id","starting_balance","store_id","usable_at"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the gift card is currently enabled and can be used."},"code":{"type":"string","description":"The unique code that customers use to redeem the gift card."},"note":{"type":["null","string"],"description":"Optional note or description associated with the gift card."},"balance":{"type":"integer","description":"The current balance remaining on the gift card in cents.","format":"int64"},"starting_balance":{"type":"integer","description":"The original balance when the gift card was first created in cents.","format":"int64"},"usable_at":{"type":"string","description":"The date and time when the gift card becomes usable.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the gift card expires, if applicable.","format":"date-time"},"created_at":{"type":["null","string"],"description":"The date and time when the gift card was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the gift card was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"canceled_at":{"type":["null","string"],"description":"The date and time when the gift card was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a gift card in the PayNow system."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/giftcards":{"post":{"tags":["giftcards"],"summary":"Create a Gift Card for a store","operationId":"GiftCards_CreateGiftCard","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGiftCardDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateGiftCardDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateGiftCardDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/giftcards/{giftCardId}

> Get a Gift Card By ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"giftcards"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GiftCardDto":{"required":["balance","code","enabled","id","starting_balance","store_id","usable_at"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the gift card is currently enabled and can be used."},"code":{"type":"string","description":"The unique code that customers use to redeem the gift card."},"note":{"type":["null","string"],"description":"Optional note or description associated with the gift card."},"balance":{"type":"integer","description":"The current balance remaining on the gift card in cents.","format":"int64"},"starting_balance":{"type":"integer","description":"The original balance when the gift card was first created in cents.","format":"int64"},"usable_at":{"type":"string","description":"The date and time when the gift card becomes usable.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the gift card expires, if applicable.","format":"date-time"},"created_at":{"type":["null","string"],"description":"The date and time when the gift card was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the gift card was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"canceled_at":{"type":["null","string"],"description":"The date and time when the gift card was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a gift card in the PayNow system."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/giftcards/{giftCardId}":{"get":{"tags":["giftcards"],"summary":"Get a Gift Card By ID for a store","operationId":"GiftCards_GetGiftCard","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"giftCardId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/giftcards/{giftCardId}

> Delete a Gift Card By ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"giftcards"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GiftCardDto":{"required":["balance","code","enabled","id","starting_balance","store_id","usable_at"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the gift card is currently enabled and can be used."},"code":{"type":"string","description":"The unique code that customers use to redeem the gift card."},"note":{"type":["null","string"],"description":"Optional note or description associated with the gift card."},"balance":{"type":"integer","description":"The current balance remaining on the gift card in cents.","format":"int64"},"starting_balance":{"type":"integer","description":"The original balance when the gift card was first created in cents.","format":"int64"},"usable_at":{"type":"string","description":"The date and time when the gift card becomes usable.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the gift card expires, if applicable.","format":"date-time"},"created_at":{"type":["null","string"],"description":"The date and time when the gift card was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the gift card was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"canceled_at":{"type":["null","string"],"description":"The date and time when the gift card was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a gift card in the PayNow system."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/giftcards/{giftCardId}":{"delete":{"tags":["giftcards"],"summary":"Delete a Gift Card By ID for a store","operationId":"GiftCards_DeleteGiftCard","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"giftCardId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/giftcards/{giftCardId}

> Update a Gift Card By ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"giftcards"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateGiftCardDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"code":{"type":"string"},"note":{"type":"string"},"balance":{"type":"integer","format":"int64"},"usable_at":{"type":"string","format":"date-time"},"expires_at":{"type":["null","string"],"format":"date-time"}}},"GiftCardDto":{"required":["balance","code","enabled","id","starting_balance","store_id","usable_at"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the gift card is currently enabled and can be used."},"code":{"type":"string","description":"The unique code that customers use to redeem the gift card."},"note":{"type":["null","string"],"description":"Optional note or description associated with the gift card."},"balance":{"type":"integer","description":"The current balance remaining on the gift card in cents.","format":"int64"},"starting_balance":{"type":"integer","description":"The original balance when the gift card was first created in cents.","format":"int64"},"usable_at":{"type":"string","description":"The date and time when the gift card becomes usable.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the gift card expires, if applicable.","format":"date-time"},"created_at":{"type":["null","string"],"description":"The date and time when the gift card was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the gift card was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"canceled_at":{"type":["null","string"],"description":"The date and time when the gift card was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a gift card in the PayNow system."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/giftcards/{giftCardId}":{"patch":{"tags":["giftcards"],"summary":"Update a Gift Card By ID for a store","operationId":"GiftCards_UpdateGiftCard","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"giftCardId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGiftCardDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateGiftCardDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateGiftCardDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Global Commands

## Get global commands

> Retrieves all global commands for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"global-commands"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GlobalCommandDto":{"required":["content","created_at","created_by","execution_rule","id","online_only","override_execute_on_gameserver_ids","stage","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"The actual command content to be executed."},"online_only":{"type":"boolean","description":"Indicates whether the command should only be executed when the player is online."},"override_execute_on_gameserver_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"List of specific game server IDs where this command should be executed, overriding default behavior."},"execution_rule":{"$ref":"#/components/schemas/ProductCommandExecutionRuleDto"},"created_at":{"type":"string","description":"Timestamp when the command was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"Optional timestamp indicating when the command was last updated.\nNull if the command has never been updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a global command in the system.\nGlobal commands are instructions that can be executed across a store's environment."},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductCommandExecutionRuleDto":{"enum":["invalid","once_per_item","once_per_order"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/global-commands":{"get":{"tags":["global-commands"],"summary":"Get global commands","description":"Retrieves all global commands for the specified store.","operationId":"GlobalCommands_GetGlobalCommands","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve this data for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GlobalCommandDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Create global command

> Creates a global command for a store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"global-commands"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertGlobalCommandDto":{"required":["content","execution_rule","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"The command content to be executed."},"online_only":{"type":"boolean","description":"Indicates whether the command should only be executed when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"List of specific game server IDs where this command should be executed."},"execution_rule":{"$ref":"#/components/schemas/ProductCommandExecutionRuleDto"}},"additionalProperties":false,"description":"Data transfer object used for creating new global commands or updating existing ones.\nSupports partial updates following PATCH semantics."},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductCommandExecutionRuleDto":{"enum":["invalid","once_per_item","once_per_order"],"type":"string"},"GlobalCommandDto":{"required":["content","created_at","created_by","execution_rule","id","online_only","override_execute_on_gameserver_ids","stage","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"The actual command content to be executed."},"online_only":{"type":"boolean","description":"Indicates whether the command should only be executed when the player is online."},"override_execute_on_gameserver_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"List of specific game server IDs where this command should be executed, overriding default behavior."},"execution_rule":{"$ref":"#/components/schemas/ProductCommandExecutionRuleDto"},"created_at":{"type":"string","description":"Timestamp when the command was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"Optional timestamp indicating when the command was last updated.\nNull if the command has never been updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a global command in the system.\nGlobal commands are instructions that can be executed across a store's environment."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/global-commands":{"post":{"tags":["global-commands"],"summary":"Create global command","description":"Creates a global command for a store.","operationId":"GlobalCommands_CreateGlobalCommand","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to create this data for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalCommandDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalCommandDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalCommandDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalCommandDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Delete global command

> Deletes a global command for a store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"global-commands"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/global-commands/{globalCommandId}":{"delete":{"tags":["global-commands"],"summary":"Delete global command","description":"Deletes a global command for a store.","operationId":"GlobalCommands_DeleteGlobalCommand","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to delete this data for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"globalCommandId","in":"path","description":"The ID of the command to delete.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update global command

> Updates a global command for a store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"global-commands"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertGlobalCommandDto":{"required":["content","execution_rule","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"The command content to be executed."},"online_only":{"type":"boolean","description":"Indicates whether the command should only be executed when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"List of specific game server IDs where this command should be executed."},"execution_rule":{"$ref":"#/components/schemas/ProductCommandExecutionRuleDto"}},"additionalProperties":false,"description":"Data transfer object used for creating new global commands or updating existing ones.\nSupports partial updates following PATCH semantics."},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductCommandExecutionRuleDto":{"enum":["invalid","once_per_item","once_per_order"],"type":"string"},"GlobalCommandDto":{"required":["content","created_at","created_by","execution_rule","id","online_only","override_execute_on_gameserver_ids","stage","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"The actual command content to be executed."},"online_only":{"type":"boolean","description":"Indicates whether the command should only be executed when the player is online."},"override_execute_on_gameserver_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"List of specific game server IDs where this command should be executed, overriding default behavior."},"execution_rule":{"$ref":"#/components/schemas/ProductCommandExecutionRuleDto"},"created_at":{"type":"string","description":"Timestamp when the command was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"Optional timestamp indicating when the command was last updated.\nNull if the command has never been updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a global command in the system.\nGlobal commands are instructions that can be executed across a store's environment."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/global-commands/{globalCommandId}":{"patch":{"tags":["global-commands"],"summary":"Update global command","description":"Updates a global command for a store.","operationId":"GlobalCommands_UpdateGlobalCommand","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to update this data for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"globalCommandId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalCommandDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalCommandDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalCommandDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalCommandDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Invoices

## Get invoices

> Retrieves all invoices for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"invoices"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"InvoiceTypeDto":{"enum":["invalid","invoice","credit_note"],"type":"string"},"InvoiceDto":{"required":["created_at","currency","customer_id","discount_amount","giftcard_usage_amount","id","issued_at","number","order_id","reference","status","store_id","subtotal_amount","tax_amount","total_amount","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"number":{"type":"integer","description":"Sequential number of the invoice within its store","format":"int64"},"reference":{"type":"string","description":"Human readable reference of the invoice"},"type":{"$ref":"#/components/schemas/InvoiceTypeDto"},"status":{"$ref":"#/components/schemas/InvoiceStatusDto"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"refund_id":{"$ref":"#/components/schemas/FlakeId"},"parent_invoice_id":{"$ref":"#/components/schemas/FlakeId"},"currency":{"type":"string","description":"Three-letter currency code of the invoice"},"discount_amount":{"type":"integer","description":"Total discount in smallest currency unit (e.g., cents)","format":"int64"},"subtotal_amount":{"type":"integer","description":"Total before tax in smallest currency unit","format":"int64"},"tax_amount":{"type":"integer","description":"Total tax in smallest currency unit","format":"int64"},"giftcard_usage_amount":{"type":"integer","description":"Amount paid using gift cards in smallest currency unit","format":"int64"},"total_amount":{"type":"integer","description":"Total of the invoice in smallest currency unit","format":"int64"},"file_key":{"type":["null","string"],"description":"Optional storage key of the generated invoice document"},"file_size":{"type":["null","integer"],"description":"Optional size of the generated invoice document in bytes","format":"int64"},"created_at":{"type":"string","description":"Date and time when the invoice was created","format":"date-time"},"issued_at":{"type":"string","description":"Date and time when the invoice was issued","format":"date-time"}},"additionalProperties":false},"InvoiceStatusDto":{"enum":["invalid","pending","generated","failed"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/invoices":{"get":{"tags":["invoices"],"summary":"Get invoices","description":"Retrieves all invoices for the specified store.","operationId":"StoreInvoices_ListInvoices","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve invoices for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"type","in":"query","schema":{"$ref":"#/components/schemas/InvoiceTypeDto"}},{"name":"customer_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"order_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"reference","in":"query","schema":{"type":"string"}},{"name":"billing_email","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Download invoice

> Retrieves a temporary download URL for the invoice PDF.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"invoices"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"InvoiceDownloadUrlResponseDto":{"required":["download_url"],"type":"object","properties":{"download_url":{"type":"string","description":"Temporary URL the invoice document can be downloaded from"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/invoices/{invoiceId}/download":{"get":{"tags":["invoices"],"summary":"Download invoice","description":"Retrieves a temporary download URL for the invoice PDF.","operationId":"StoreInvoices_DownloadInvoice","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the invoice belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"invoiceId","in":"path","description":"The ID of the invoice to download.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDownloadUrlResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Marketing

## GET /v1/stores/{storeId}/marketing/abandoned-checkouts/configuration

> Gets the abandoned checkout behaviour for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"marketing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"AbandonedCheckoutStoreConfigurationDto":{"required":["commands","coupon_configuration","enabled","invalid","minimum_order_value","store_id","trigger_after","updated_at","updated_by"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"invalid":{"type":"boolean","description":"A value indicating whether the abandoned checkout configuration for the store is invalid."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationCommandDto"},"description":"The commands you want to execute when the email is sent."},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":"string","description":"The date and time when the configuration was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents the store-level configuration for abandoned checkout settings."},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"},"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"AbandonedCheckoutStoreConfigurationCommandDto":{"required":["command","id","online_only","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level abandoned checkout configuration."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/marketing/abandoned-checkouts/configuration":{"get":{"tags":["marketing"],"summary":"Gets the abandoned checkout behaviour for a store","operationId":"StoreAbandonedCheckouts_GetStoreAbandonedCheckoutConfigurationOptions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PUT /v1/stores/{storeId}/marketing/abandoned-checkouts/configuration

> Sets the abandoned checkout behaviour for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"marketing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"AbandonedCheckoutStoreConfigurationUpdateDto":{"required":["commands","coupon_configuration","enabled","minimum_order_value","trigger_after"],"type":"object","properties":{"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationUpdateCommandDto"}},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"}},"additionalProperties":false,"description":"Used for updating the store-level configuration for abandoned checkout settings."},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"},"AbandonedCheckoutStoreConfigurationUpdateCommandDto":{"required":["command","online_only"],"type":"object","properties":{"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level abandoned checkout configuration."},"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"AbandonedCheckoutStoreConfigurationDto":{"required":["commands","coupon_configuration","enabled","invalid","minimum_order_value","store_id","trigger_after","updated_at","updated_by"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"invalid":{"type":"boolean","description":"A value indicating whether the abandoned checkout configuration for the store is invalid."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationCommandDto"},"description":"The commands you want to execute when the email is sent."},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":"string","description":"The date and time when the configuration was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents the store-level configuration for abandoned checkout settings."},"AbandonedCheckoutStoreConfigurationCommandDto":{"required":["command","id","online_only","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level abandoned checkout configuration."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/marketing/abandoned-checkouts/configuration":{"put":{"tags":["marketing"],"summary":"Sets the abandoned checkout behaviour for a store","operationId":"StoreAbandonedCheckouts_SetStoreAbandonedCheckoutConfigurationOptions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationUpdateDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationUpdateDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationUpdateDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationDto"}}}},"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/marketing/purchase-follow-ups/configuration

> Gets the purchase follow up behaviour for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"marketing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PurchaseFollowUpStoreConfigurationDto":{"required":["commands","coupon_configuration","enabled","invalid","minimum_order_value","store_id","trigger_after","updated_at","updated_by"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"invalid":{"type":"boolean","description":"A value indicating whether the abandoned checkout configuration for the store is invalid."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationCommandDto"},"description":"The commands you want to execute when the email is sent."},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":"string","description":"The date and time when the configuration was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents the store-level configuration for abandoned checkout settings."},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"},"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"PurchaseFollowUpStoreConfigurationCommandDto":{"required":["command","id","online_only","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level purchase follow uo configuration."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/marketing/purchase-follow-ups/configuration":{"get":{"tags":["marketing"],"summary":"Gets the purchase follow up behaviour for a store","operationId":"StorePurchaseFollowUps_GetStorePurchaseFollowUpConfigurationOptions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PUT /v1/stores/{storeId}/marketing/purchase-follow-ups/configuration

> Sets the purchase follow up behaviour for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"marketing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PurchaseFollowUpStoreConfigurationUpdateDto":{"required":["commands","coupon_configuration","enabled","minimum_order_value","trigger_after"],"type":"object","properties":{"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationUpdateCommandDto"}},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"}},"additionalProperties":false,"description":"Used for updating the store-level configuration for abandoned checkout settings."},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"},"PurchaseFollowUpStoreConfigurationUpdateCommandDto":{"required":["command","online_only"],"type":"object","properties":{"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level purchase follow uo configuration."},"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"PurchaseFollowUpStoreConfigurationDto":{"required":["commands","coupon_configuration","enabled","invalid","minimum_order_value","store_id","trigger_after","updated_at","updated_by"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"invalid":{"type":"boolean","description":"A value indicating whether the abandoned checkout configuration for the store is invalid."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationCommandDto"},"description":"The commands you want to execute when the email is sent."},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":"string","description":"The date and time when the configuration was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents the store-level configuration for abandoned checkout settings."},"PurchaseFollowUpStoreConfigurationCommandDto":{"required":["command","id","online_only","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level purchase follow uo configuration."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/marketing/purchase-follow-ups/configuration":{"put":{"tags":["marketing"],"summary":"Sets the purchase follow up behaviour for a store","operationId":"StorePurchaseFollowUps_SetStorePurchaseFollowUpConfigurationOptions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationUpdateDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationUpdateDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationUpdateDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationDto"}}}},"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Navlinks

## GET /v1/stores/{storeId}/navlinks

> Get all NavLinks for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"navlinks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"NavLinkDto":{"required":["name","node_id","tag_id","tag_slug"],"type":"object","properties":{"node_id":{"type":"string"},"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":["null","string"]},"tag_slug":{"type":"string"},"name":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/navlinks":{"get":{"tags":["navlinks"],"summary":"Get all NavLinks for a store","operationId":"NavLinks_GetNavLinks","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NavLinkDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/navlinks

> Create a new NavLink for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"navlinks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateNavLinkDto":{"required":["tag_id"],"type":"object","properties":{"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}}},"NavLinkDto":{"required":["name","node_id","tag_id","tag_slug"],"type":"object","properties":{"node_id":{"type":"string"},"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":["null","string"]},"tag_slug":{"type":"string"},"name":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/navlinks":{"post":{"tags":["navlinks"],"summary":"Create a new NavLink for a store","operationId":"NavLinks_CreateNavLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNavLinkDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateNavLinkDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateNavLinkDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavLinkDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/navlinks/{navLinkId}

> Get a NavLink by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"navlinks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"NavLinkDto":{"required":["name","node_id","tag_id","tag_slug"],"type":"object","properties":{"node_id":{"type":"string"},"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":["null","string"]},"tag_slug":{"type":"string"},"name":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/navlinks/{navLinkId}":{"get":{"tags":["navlinks"],"summary":"Get a NavLink by ID for a store","operationId":"NavLinks_GetNavLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"navLinkId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavLinkDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/navlinks/{navLinkId}

> Delete a NavLink for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"navlinks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/navlinks/{navLinkId}":{"delete":{"tags":["navlinks"],"summary":"Delete a NavLink for a store","operationId":"NavLinks_DeleteNavLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"navLinkId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/navlinks/{navLinkId}

> Update a NavLink By ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"navlinks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateNavLinkDto":{"type":"object","properties":{"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}}},"NavLinkDto":{"required":["name","node_id","tag_id","tag_slug"],"type":"object","properties":{"node_id":{"type":"string"},"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":["null","string"]},"tag_slug":{"type":"string"},"name":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/navlinks/{navLinkId}":{"patch":{"tags":["navlinks"],"summary":"Update a NavLink By ID for a store","operationId":"NavLinks_UpdateNavLink","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"navLinkId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNavLinkDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateNavLinkDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateNavLinkDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavLinkDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/navlinks/sort-orders

> Update the sort orders of NavLinks for a Store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"navlinks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateNavLinkOrderChangeDto":{"required":["node_id","order"],"type":"object","properties":{"node_id":{"$ref":"#/components/schemas/FlakeId"},"order":{"type":"integer","format":"int32"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/navlinks/sort-orders":{"patch":{"tags":["navlinks"],"summary":"Update the sort orders of NavLinks for a Store","operationId":"NavLinks_UpdateNavLinkOrder","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpdateNavLinkOrderChangeDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpdateNavLinkOrderChangeDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpdateNavLinkOrderChangeDto"}}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Orders

## Get orders

> Retrieves all orders for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"orders"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"OrderStatus":{"enum":["created","completed","canceled","refunded","chargeback"],"type":"string"},"OrderDto":{"required":["applied_coupons","applied_giftcards","billing_country","billing_cycle_sequence","billing_email","billing_name","currency","customer","customer_id","customer_ip","discount_amount","discount_amount_str","giftcard_usage_amount","giftcard_usage_amount_str","id","is_subscription","lines","presentment_currency","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_jurisdictions","total_amount","total_amount_str","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The PayNow order ID identifier starting with pn-."},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"type":{"$ref":"#/components/schemas/OrderType"},"status":{"$ref":"#/components/schemas/OrderStatus"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_token":{"type":["null","string"],"description":"The checkout token for this order"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"is_subscription":{"type":"boolean","description":"Signifies if the order is a subscription order","readOnly":true},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"applied_coupons":{"type":"array","items":{"$ref":"#/components/schemas/OrderCouponUsageDto"},"description":"Applied coupons to this order"},"giftcard_id":{"$ref":"#/components/schemas/FlakeId"},"applied_giftcards":{"type":"array","items":{"$ref":"#/components/schemas/OrderGiftCardUsageDto"},"description":"Applied gift cards to this order"},"affiliate_id":{"$ref":"#/components/schemas/FlakeId"},"billing_name":{"type":"string","description":"The billing name for this order"},"billing_email":{"type":"string","description":"The billing email for this order"},"billing_country":{"type":"string","description":"The billing country for this order"},"billing_tax_id":{"type":["null","string"],"description":"The tax identification number used for this order (for B2B transactions)"},"billing_cycle_sequence":{"type":"integer","description":"The billing cycle sequence (current renewal count) if this is a subscription order","format":"int32"},"customer_ip":{"type":"string","description":"The IP address (IPv4 or IPv6) of the customer at time of order"},"currency":{"type":"string","description":"The currency code used for this order"},"discount_amount":{"type":"integer","description":"The total discount amount applied to this order in smallest currency unit","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order in smallest currency unit","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order in smallest currency unit","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order in smallest currency unit","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card value used for this order in smallest currency unit","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"presentment_currency":{"type":"string","description":"The presentment currency code used for this order (currency shown to customer)"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount in smallest currency unit","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount in smallest currency unit","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount in smallest currency unit","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount in smallest currency unit","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount in smallest currency unit","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"created_at":{"type":["null","string"],"description":"The date and time when this order was created","format":"date-time"},"completed_at":{"type":["null","string"],"description":"The date and time when this order was completed, if applicable","format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineDto"},"description":"The line items in this order"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"A list of all tax jurisdictions that were involved in the taxation of this order."},"last_payment_error":{"$ref":"#/components/schemas/LastPaymentErrorDto"}},"additionalProperties":false,"description":"Represents a customer order"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"OrderType":{"enum":["one_time","subscription_initial","subscription_renewal","subscription_proration","mixed"],"type":"string","description":"Defines the type of items contained in an order"},"OrderCouponUsageDto":{"required":["coupon_id","coupon_version_id","usage_amount"],"type":"object","properties":{"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"coupon_version_id":{"$ref":"#/components/schemas/FlakeId"},"usage_amount":{"type":"integer","format":"int64"}},"additionalProperties":false},"OrderGiftCardUsageDto":{"required":["giftcard_id","usage_amount"],"type":"object","properties":{"giftcard_id":{"$ref":"#/components/schemas/FlakeId"},"usage_amount":{"type":"integer","format":"int64"}},"additionalProperties":false},"OrderLineDto":{"required":["discount_amount","discount_amount_str","gift","giftcard_usage_amount","giftcard_usage_amount_str","id","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","price","price_str","product_id","product_name","product_version_id","quantity","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product in this order line"},"product_image_url":{"type":["null","string"],"description":"The URL of the product image"},"description":{"type":["null","string"],"description":"Customer-presentable description of the order line."},"created_giftcard_id":{"type":["null","string"],"description":"The Gift Card ID of that product in this order line"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_change_line_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_interval_value":{"type":["null","integer"],"description":"The interval value for subscription products","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"gift":{"type":"boolean","description":"Indicates whether this order line is a gift"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/CustomerDto"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"price":{"type":"integer","description":"The unit price of the product in the smallest currency unit (e.g., cents)","format":"int32"},"price_str":{"type":"string","description":"The unit price of the product formatted as a string"},"quantity":{"type":"integer","description":"The quantity of the product in this order line","format":"int32"},"discount_amount":{"type":"integer","description":"The discount amount (from sales, coupons, and affiliate links) applied to this order line","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card used for this order line","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order line","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order line","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order line","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount for this order line","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount for this order line","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount for this order line","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount for this order line","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount for this order line","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price, or added on top"},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/OrderLinePayoutSplitDto"},"description":"The payout splits for this order line"},"pricing_region_id":{"type":["null","string"],"description":"The regional pricing region ID for this order line, null if no regional pricing set"},"custom_variables":{"type":["null","object"],"additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Key-value pair of selected custom variables for this order."}},"additionalProperties":false,"description":"Represents an order line item in a customer's order"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"OrderLinePayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage in basis points.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage in basis points.\nOnly used by platforms.","format":"int64"}},"additionalProperties":false,"description":"Represents an order line-level payout split."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"LastPaymentErrorDto":{"required":["decline_code","message"],"type":"object","properties":{"decline_code":{"$ref":"#/components/schemas/PaymentDeclineCode"},"message":{"type":"string","description":"Human-readable decline reason message."}},"additionalProperties":false,"description":"The last payment decline object."},"PaymentDeclineCode":{"enum":["unknown","generic_decline","call_issuer","authentication_required","currency_not_supported","duplicate_transaction","expired_card","fraudulent","incorrect_number","incorrect_cvc","incorrect_pin","incorrect_zip","insufficient_funds","invalid_account","invalid_amount","invalid_expiry_month","invalid_expiry_year","issuer_not_available","lost_card","merchant_blacklist","new_account_information_available","no_action_taken","pickup_card","pin_try_exceeded","restricted_card","stolen_card","testmode_decline","try_again_later","security_violation","card_velocity_exceeded","do_not_honor","processing_error","card_not_supported","transaction_not_allowed","authorization_revoked","store_blocked"],"type":"string","description":"A payment decline reason code."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/orders":{"get":{"tags":["orders"],"summary":"Get orders","description":"Retrieves all orders for the specified store.","operationId":"Orders_GetOrders","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve orders for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}},{"name":"status","in":"query","description":"List of order statuses to filter by","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderStatus"}}},{"name":"order_id","in":"query","description":"Order ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customer_id","in":"query","description":"Customer ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"billing_email","in":"query","description":"Billing Email","schema":{"type":"string"}},{"name":"customer_ip","in":"query","description":"Customer IP","schema":{"type":"string"}},{"name":"subscription_id","in":"query","description":"Subscription ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"checkout_id","in":"query","description":"Checkout ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"is_subscription","in":"query","description":"Flag indicating if the order is a subscription","schema":{"type":"boolean"}},{"name":"affiliate_id","in":"query","description":"Affiliate ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"coupon_id","in":"query","description":"Coupon ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"giftcard_id","in":"query","description":"Gift card ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"product_id","in":"query","description":"Product ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"sale_id","in":"query","description":"Sale ID","schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get order by ID

> Retrieves an order by the ID for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"orders"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"OrderDto":{"required":["applied_coupons","applied_giftcards","billing_country","billing_cycle_sequence","billing_email","billing_name","currency","customer","customer_id","customer_ip","discount_amount","discount_amount_str","giftcard_usage_amount","giftcard_usage_amount_str","id","is_subscription","lines","presentment_currency","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_jurisdictions","total_amount","total_amount_str","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The PayNow order ID identifier starting with pn-."},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"type":{"$ref":"#/components/schemas/OrderType"},"status":{"$ref":"#/components/schemas/OrderStatus"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_token":{"type":["null","string"],"description":"The checkout token for this order"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"is_subscription":{"type":"boolean","description":"Signifies if the order is a subscription order","readOnly":true},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"applied_coupons":{"type":"array","items":{"$ref":"#/components/schemas/OrderCouponUsageDto"},"description":"Applied coupons to this order"},"giftcard_id":{"$ref":"#/components/schemas/FlakeId"},"applied_giftcards":{"type":"array","items":{"$ref":"#/components/schemas/OrderGiftCardUsageDto"},"description":"Applied gift cards to this order"},"affiliate_id":{"$ref":"#/components/schemas/FlakeId"},"billing_name":{"type":"string","description":"The billing name for this order"},"billing_email":{"type":"string","description":"The billing email for this order"},"billing_country":{"type":"string","description":"The billing country for this order"},"billing_tax_id":{"type":["null","string"],"description":"The tax identification number used for this order (for B2B transactions)"},"billing_cycle_sequence":{"type":"integer","description":"The billing cycle sequence (current renewal count) if this is a subscription order","format":"int32"},"customer_ip":{"type":"string","description":"The IP address (IPv4 or IPv6) of the customer at time of order"},"currency":{"type":"string","description":"The currency code used for this order"},"discount_amount":{"type":"integer","description":"The total discount amount applied to this order in smallest currency unit","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order in smallest currency unit","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order in smallest currency unit","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order in smallest currency unit","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card value used for this order in smallest currency unit","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"presentment_currency":{"type":"string","description":"The presentment currency code used for this order (currency shown to customer)"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount in smallest currency unit","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount in smallest currency unit","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount in smallest currency unit","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount in smallest currency unit","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount in smallest currency unit","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"created_at":{"type":["null","string"],"description":"The date and time when this order was created","format":"date-time"},"completed_at":{"type":["null","string"],"description":"The date and time when this order was completed, if applicable","format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineDto"},"description":"The line items in this order"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"A list of all tax jurisdictions that were involved in the taxation of this order."},"last_payment_error":{"$ref":"#/components/schemas/LastPaymentErrorDto"}},"additionalProperties":false,"description":"Represents a customer order"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"OrderType":{"enum":["one_time","subscription_initial","subscription_renewal","subscription_proration","mixed"],"type":"string","description":"Defines the type of items contained in an order"},"OrderStatus":{"enum":["created","completed","canceled","refunded","chargeback"],"type":"string"},"OrderCouponUsageDto":{"required":["coupon_id","coupon_version_id","usage_amount"],"type":"object","properties":{"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"coupon_version_id":{"$ref":"#/components/schemas/FlakeId"},"usage_amount":{"type":"integer","format":"int64"}},"additionalProperties":false},"OrderGiftCardUsageDto":{"required":["giftcard_id","usage_amount"],"type":"object","properties":{"giftcard_id":{"$ref":"#/components/schemas/FlakeId"},"usage_amount":{"type":"integer","format":"int64"}},"additionalProperties":false},"OrderLineDto":{"required":["discount_amount","discount_amount_str","gift","giftcard_usage_amount","giftcard_usage_amount_str","id","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","price","price_str","product_id","product_name","product_version_id","quantity","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product in this order line"},"product_image_url":{"type":["null","string"],"description":"The URL of the product image"},"description":{"type":["null","string"],"description":"Customer-presentable description of the order line."},"created_giftcard_id":{"type":["null","string"],"description":"The Gift Card ID of that product in this order line"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_change_line_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_interval_value":{"type":["null","integer"],"description":"The interval value for subscription products","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"gift":{"type":"boolean","description":"Indicates whether this order line is a gift"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/CustomerDto"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"price":{"type":"integer","description":"The unit price of the product in the smallest currency unit (e.g., cents)","format":"int32"},"price_str":{"type":"string","description":"The unit price of the product formatted as a string"},"quantity":{"type":"integer","description":"The quantity of the product in this order line","format":"int32"},"discount_amount":{"type":"integer","description":"The discount amount (from sales, coupons, and affiliate links) applied to this order line","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card used for this order line","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order line","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order line","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order line","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount for this order line","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount for this order line","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount for this order line","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount for this order line","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount for this order line","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price, or added on top"},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/OrderLinePayoutSplitDto"},"description":"The payout splits for this order line"},"pricing_region_id":{"type":["null","string"],"description":"The regional pricing region ID for this order line, null if no regional pricing set"},"custom_variables":{"type":["null","object"],"additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Key-value pair of selected custom variables for this order."}},"additionalProperties":false,"description":"Represents an order line item in a customer's order"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"OrderLinePayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage in basis points.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage in basis points.\nOnly used by platforms.","format":"int64"}},"additionalProperties":false,"description":"Represents an order line-level payout split."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"LastPaymentErrorDto":{"required":["decline_code","message"],"type":"object","properties":{"decline_code":{"$ref":"#/components/schemas/PaymentDeclineCode"},"message":{"type":"string","description":"Human-readable decline reason message."}},"additionalProperties":false,"description":"The last payment decline object."},"PaymentDeclineCode":{"enum":["unknown","generic_decline","call_issuer","authentication_required","currency_not_supported","duplicate_transaction","expired_card","fraudulent","incorrect_number","incorrect_cvc","incorrect_pin","incorrect_zip","insufficient_funds","invalid_account","invalid_amount","invalid_expiry_month","invalid_expiry_year","issuer_not_available","lost_card","merchant_blacklist","new_account_information_available","no_action_taken","pickup_card","pin_try_exceeded","restricted_card","stolen_card","testmode_decline","try_again_later","security_violation","card_velocity_exceeded","do_not_honor","processing_error","card_not_supported","transaction_not_allowed","authorization_revoked","store_blocked"],"type":"string","description":"A payment decline reason code."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/orders/{orderId}":{"get":{"tags":["orders"],"summary":"Get order by ID","description":"Retrieves an order by the ID for the specified store.","operationId":"Orders_GetOrderById","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve the order for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"orderId","in":"path","description":"The ID of the order.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Refund order by ID

> Creates a refund for an order by the ID for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"orders"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateRefundRequestDto":{"type":"object","properties":{"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"refund_from_connected_user_balance":{"type":["null","boolean"],"description":"Determines if the refund should be taken from the connected user's balance.\nOnly relevant for connected platforms."}},"additionalProperties":false},"RefundDto":{"required":["amount","amount_str","created_at","currency","customer_id","gateway_fee_amount","gateway_fee_amount_str","id","payment_id","platform_fee_amount","platform_fee_amount_str","refund_from_connected_user_balance","status","store_id","store_net_amount","store_net_amount_str","store_refund_amount","store_refund_amount_str","tax_amount","tax_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"payment_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/RefundStatus"},"failure_reason":{"type":["null","string"],"description":"Reason for failure if the refund has failed"},"currency":{"type":"string","description":"Three-letter currency code of the refund"},"amount":{"type":"integer","description":"Amount of the refund in smallest currency unit (e.g., cents)","format":"int64"},"amount_str":{"type":"string","description":"String representation of the refund amount, formatted for display"},"gateway_fee_amount":{"type":"integer","description":"Amount of payment processor fees in smallest currency unit","format":"int64"},"gateway_fee_amount_str":{"type":"string","description":"String representation of gateway fee amount, formatted for display"},"tax_amount":{"type":"integer","description":"Amount of tax being refunded in smallest currency unit","format":"int64"},"tax_amount_str":{"type":"string","description":"String representation of tax amount, formatted for display"},"platform_fee_amount":{"type":"integer","description":"Amount of platform fees in smallest currency unit","format":"int64"},"platform_fee_amount_str":{"type":"string","description":"String representation of platform fee amount, formatted for display"},"store_net_amount":{"type":"integer","description":"Net amount for the store after fees in smallest currency unit","format":"int64"},"store_net_amount_str":{"type":"string","description":"String representation of store net amount, formatted for display"},"store_refund_amount":{"type":"integer","description":"Amount of the refund to be paid by the store in smallest currency unit","format":"int64"},"store_refund_amount_str":{"type":"string","description":"String representation of store refund amount, formatted for display"},"presentment_currency":{"type":["null","string"],"description":"Optional currency code used for presentment to the customer if different from the base currency"},"presentment_amount":{"type":["null","integer"],"description":"Optional amount in presentment currency in smallest currency unit","format":"int64"},"fx_rate":{"type":["null","string"],"description":"Exchange rate used while refunding. Only present for payments made in non-settlement currency."},"refund_from_connected_user_balance":{"type":"boolean","description":"Indicates whether the refund should be taken from the connected user's balance.\nOnly relevant for platforms."},"created_at":{"type":"string","description":"Date and time when the refund was created","format":"date-time"},"approved_at":{"type":["null","string"],"description":"Optional date and time when the refund was approved","format":"date-time"},"pending_at":{"type":["null","string"],"description":"Optional date and time when the refund entered pending status","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Optional date and time when the refund was completed","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Optional date and time when the refund was canceled","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Optional date and time when the refund failed","format":"date-time"}},"additionalProperties":false},"RefundStatus":{"enum":["created","approved","processing","completed","canceled","failed"],"type":"string","description":"Represents the current status of a refund in the system"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/orders/{orderId}/refund":{"post":{"tags":["orders"],"summary":"Refund order by ID","description":"Creates a refund for an order by the ID for the specified store.","operationId":"Orders_RefundOrder","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to refund the order for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"orderId","in":"path","description":"The ID of the order.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateRefundRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateRefundRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Payment Method Types

## Get store payment method types

> Retrieves all payment method types associated with a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"payment-method-types"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PaymentMethodTypeDto":{"required":["approval_required","b2b_supported","b2c_supported","category","confirmation","country_currency_mapping","enabled","fee_overrides","gateways","id","kyc_required","name","refunds_supported","revenue_usage","subscriptions_supported","supported_countries","supported_currencies","supported_settlement_currencies"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"logo_url":{"type":["null","string"]},"checkout_logo_url_light":{"type":["null","string"]},"checkout_logo_url_dark":{"type":["null","string"]},"category":{"type":"string"},"confirmation":{"type":"string"},"enabled":{"type":"boolean"},"refunds_supported":{"type":"boolean"},"subscriptions_supported":{"type":"boolean"},"kyc_required":{"type":"boolean"},"supported_currencies":{"type":"array","items":{"type":"string"}},"supported_settlement_currencies":{"type":"array","items":{"type":"string"}},"supported_countries":{"type":"array","items":{"type":"string"}},"gateways":{"type":"array","items":{"$ref":"#/components/schemas/PaymentGatewayDto"}},"fee_overrides":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodTypeFeeOverrideDto"}},"country_currency_mapping":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodTypeCountryCurrencyMappingDto"}},"revenue_usage":{"type":"integer","format":"int64"},"monthly_revenue_limit":{"type":["null","integer"],"format":"int64"},"default_monthly_revenue_limit":{"type":["null","integer"],"format":"int64"},"settlement_time":{"type":["null","string"]},"min_transaction_amount":{"type":["null","integer"],"format":"int64"},"max_transaction_amount":{"type":["null","integer"],"format":"int64"},"b2c_supported":{"type":"boolean"},"b2b_supported":{"type":"boolean"},"approval_required":{"type":"boolean"},"approval_status":{"$ref":"#/components/schemas/PaymentMethodTypeApprovalStatusDto"},"approval_decline_reason":{"type":["null","string"]},"approval_requested_at":{"type":["null","string"],"format":"date-time"},"approval_decided_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PaymentGatewayDto":{"enum":["invalid","stripe","paypal","forumpay","steamskins","nuvei","pagseguro","tazapay","paysafe","checkoutcom"],"type":"string"},"PaymentMethodTypeFeeOverrideDto":{"required":["countries","fee_cents","fee_percentage"],"type":"object","properties":{"fee_percentage":{"type":"integer","format":"int32"},"fee_cents":{"type":"integer","format":"int32"},"countries":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"PaymentMethodTypeCountryCurrencyMappingDto":{"required":["country","currencies"],"type":"object","properties":{"country":{"type":"string"},"currencies":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"PaymentMethodTypeApprovalStatusDto":{"enum":["invalid","pending","approved","rejected"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/payment-method-types":{"get":{"tags":["payment-method-types"],"summary":"Get store payment method types","description":"Retrieves all payment method types associated with a store","operationId":"StorePaymentMethodTypes_GetStorePaymentMethodTypes","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodTypeDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Toggle a store payment method type

> Enables or disabled a payment method type for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"payment-method-types"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ToggleStorePaymentMethodTypeRequestDto":{"required":["enabled"],"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/payment-method-types/{paymentMethodTypeId}/toggle":{"patch":{"tags":["payment-method-types"],"summary":"Toggle a store payment method type","description":"Enables or disabled a payment method type for a store","operationId":"StorePaymentMethodTypes_ToggleStorePaymentMethodType","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"paymentMethodTypeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleStorePaymentMethodTypeRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/ToggleStorePaymentMethodTypeRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ToggleStorePaymentMethodTypeRequestDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Request approval for a store payment method type

> Requests approval to use a payment method type that requires manual review

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"payment-method-types"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/payment-method-types/{paymentMethodTypeId}/request-approval":{"post":{"tags":["payment-method-types"],"summary":"Request approval for a store payment method type","description":"Requests approval to use a payment method type that requires manual review","operationId":"StorePaymentMethodTypes_RequestStorePaymentMethodTypeApproval","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"paymentMethodTypeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Payment Settings

## Get store payment settings

> Retrieves payment settings for a store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"payment-settings"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorePaymentSettingsDto":{"required":["adaptive_currency_enabled","block_prepaid_cards","chargeback_coverage","force_3d_secure","max_checkout_amount","promo_code_stacking_behavior","show_adaptive_currency_on_storefront","show_all_payment_methods_for_subscriptions","store_tax_inclusive_pricing"],"type":"object","properties":{"show_all_payment_methods_for_subscriptions":{"type":"boolean","description":"Whether to show all available payment methods for subscription purchases."},"store_tax_inclusive_pricing":{"type":"boolean","description":"Whether store pricing is tax-inclusive."},"block_prepaid_cards":{"$ref":"#/components/schemas/PrepaidCardsBlockingTypeDto"},"promo_code_stacking_behavior":{"$ref":"#/components/schemas/StorePromoCodeStackingBehaviorDto"},"adaptive_currency_enabled":{"type":"boolean","description":"Whether the 'Adaptive Currency' feature is enabled."},"show_adaptive_currency_on_storefront":{"type":"boolean","description":"Whether the displayed currency on the storefront should be the Adaptive Currency by default."},"max_checkout_amount":{"type":"integer","description":"Maximum checkout amount allowed in cents.","format":"int64"},"force_3d_secure":{"type":"boolean","description":"Whether to force 3D Secure authentication for all transactions."},"chargeback_coverage":{"$ref":"#/components/schemas/ChargebackCoverageTypeDto"},"chargeback_coverage_max_amount":{"type":["null","integer"],"description":"Maximum per-transaction chargeback coverage amount in cents.","format":"int64"}},"additionalProperties":false,"description":"Store payment configuration settings."},"PrepaidCardsBlockingTypeDto":{"enum":["unspecified","none","trials","all_recurring"],"type":"string","description":"Defines when prepaid cards should be blocked from use."},"StorePromoCodeStackingBehaviorDto":{"enum":["invalid","disabled","enabled","gift_cards_only"],"type":"string","description":"Defines the behavior of promo code stacking."},"ChargebackCoverageTypeDto":{"enum":["unspecified","none","fraudulent","all"],"type":"string","description":"Defines the type of chargeback coverage provided."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/payment-settings":{"get":{"tags":["payment-settings"],"summary":"Get store payment settings","description":"Retrieves payment settings for a store.","operationId":"PaymentsSettings_GetStorePaymentSettings","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePaymentSettingsDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Updates store payment settings

> Updates payment settings for a store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"payment-settings"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateStorePaymentSettingsDto":{"type":"object","properties":{"show_all_payment_methods_for_subscriptions":{"type":"boolean"},"store_tax_inclusive_pricing":{"type":"boolean"},"block_prepaid_cards":{"$ref":"#/components/schemas/PrepaidCardsBlockingTypeDto"},"promo_code_stacking_behavior":{"$ref":"#/components/schemas/StorePromoCodeStackingBehaviorDto"},"adaptive_currency_enabled":{"type":"boolean"},"show_adaptive_currency_on_storefront":{"type":"boolean"}}},"PrepaidCardsBlockingTypeDto":{"enum":["unspecified","none","trials","all_recurring"],"type":"string","description":"Defines when prepaid cards should be blocked from use."},"StorePromoCodeStackingBehaviorDto":{"enum":["invalid","disabled","enabled","gift_cards_only"],"type":"string","description":"Defines the behavior of promo code stacking."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/payment-settings":{"patch":{"tags":["payment-settings"],"summary":"Updates store payment settings","description":"Updates payment settings for a store.","operationId":"PaymentsSettings_UpdateStorePaymentSettings","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStorePaymentSettingsDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateStorePaymentSettingsDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateStorePaymentSettingsDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Payments

## Get payments

> Retrieves all payments for the specified store using the filter specified.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"payments"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PaymentStatusDto":{"enum":["unknown","created","pending","completed","canceled","failed","refunded","chargeback","refund_failed","refund_processing"],"type":"string","description":"Represents payment status"},"PaymentDto":{"required":["amount","chargeback_status","created_at","currency","customer","customer_id","gateway","gateway_entity_identifier","gateway_fee_amount","gateway_id","id","method","order_id","platform_fee_amount","platform_fee_rate","presentment_amount","presentment_currency","status","store_id","store_net_amount","tax_amount"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"refunds":{"type":["null","array"],"items":{"$ref":"#/components/schemas/RefundDto"},"description":"The list of refunds associated with this payment"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"gateway_id":{"type":"string","description":"The gateway payment identifier"},"method":{"$ref":"#/components/schemas/PaymentMethodDto"},"method_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/PaymentStatusDto"},"currency":{"type":"string","description":"The currency code used for this payment in the store's currency"},"amount":{"type":"integer","description":"The total payment amount in smallest currency unit","format":"int32"},"gateway_fee_amount":{"type":"integer","description":"The gateway fee amount in smallest currency unit","format":"int32"},"tax_amount":{"type":"integer","description":"The tax amount in smallest currency unit","format":"int32"},"platform_fee_amount":{"type":"integer","description":"The platform fee amount in smallest currency unit","format":"int32"},"store_net_amount":{"type":"integer","description":"The net amount going to the store in smallest currency unit","format":"int32"},"presentment_currency":{"type":"string","description":"The currency code used for presentment to the customer"},"presentment_amount":{"type":"integer","description":"The amount presented to the customer in smallest currency unit","format":"int32"},"fx_rate":{"type":["null","number"],"description":"The foreign exchange rate used for currency conversion","format":"double"},"platform_fee_rate":{"type":"integer","description":"The platform fee rate applied to this payment (in basis points)","format":"int32"},"chargeback_status":{"$ref":"#/components/schemas/PaymentChargebackStatusDto"},"chargeback_status_updated_at":{"type":["null","string"],"description":"The date and time when the chargeback status was last updated","format":"date-time"},"payout_split_rules":{"type":["null","array"],"items":{"$ref":"#/components/schemas/PaymentPayoutSplitRuleDto"},"description":"The payout split rules for multi-party payments"},"payout_split_results":{"type":["null","array"],"items":{"$ref":"#/components/schemas/PaymentPayoutSplitResultDto"},"description":"The payout split results for multi-party payments"},"created_at":{"type":"string","description":"The date and time when this payment was created","format":"date-time"},"pending_at":{"type":["null","string"],"description":"The date and time when this payment entered pending status","format":"date-time"},"completed_at":{"type":["null","string"],"description":"The date and time when this payment was completed","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"The date and time when this payment was canceled","format":"date-time"},"failed_at":{"type":["null","string"],"description":"The date and time when this payment failed","format":"date-time"},"refunded_at":{"type":["null","string"],"description":"The date and time when this payment was last refunded","format":"date-time"},"chargeback_at":{"type":["null","string"],"description":"The date and time when a chargeback was initiated on this payment","format":"date-time"},"last_payment_error":{"$ref":"#/components/schemas/LastPaymentErrorDto"}},"additionalProperties":false,"description":"Represents a payment transaction"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"RefundDto":{"required":["amount","amount_str","created_at","currency","customer_id","gateway_fee_amount","gateway_fee_amount_str","id","payment_id","platform_fee_amount","platform_fee_amount_str","refund_from_connected_user_balance","status","store_id","store_net_amount","store_net_amount_str","store_refund_amount","store_refund_amount_str","tax_amount","tax_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"payment_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/RefundStatus"},"failure_reason":{"type":["null","string"],"description":"Reason for failure if the refund has failed"},"currency":{"type":"string","description":"Three-letter currency code of the refund"},"amount":{"type":"integer","description":"Amount of the refund in smallest currency unit (e.g., cents)","format":"int64"},"amount_str":{"type":"string","description":"String representation of the refund amount, formatted for display"},"gateway_fee_amount":{"type":"integer","description":"Amount of payment processor fees in smallest currency unit","format":"int64"},"gateway_fee_amount_str":{"type":"string","description":"String representation of gateway fee amount, formatted for display"},"tax_amount":{"type":"integer","description":"Amount of tax being refunded in smallest currency unit","format":"int64"},"tax_amount_str":{"type":"string","description":"String representation of tax amount, formatted for display"},"platform_fee_amount":{"type":"integer","description":"Amount of platform fees in smallest currency unit","format":"int64"},"platform_fee_amount_str":{"type":"string","description":"String representation of platform fee amount, formatted for display"},"store_net_amount":{"type":"integer","description":"Net amount for the store after fees in smallest currency unit","format":"int64"},"store_net_amount_str":{"type":"string","description":"String representation of store net amount, formatted for display"},"store_refund_amount":{"type":"integer","description":"Amount of the refund to be paid by the store in smallest currency unit","format":"int64"},"store_refund_amount_str":{"type":"string","description":"String representation of store refund amount, formatted for display"},"presentment_currency":{"type":["null","string"],"description":"Optional currency code used for presentment to the customer if different from the base currency"},"presentment_amount":{"type":["null","integer"],"description":"Optional amount in presentment currency in smallest currency unit","format":"int64"},"fx_rate":{"type":["null","string"],"description":"Exchange rate used while refunding. Only present for payments made in non-settlement currency."},"refund_from_connected_user_balance":{"type":"boolean","description":"Indicates whether the refund should be taken from the connected user's balance.\nOnly relevant for platforms."},"created_at":{"type":"string","description":"Date and time when the refund was created","format":"date-time"},"approved_at":{"type":["null","string"],"description":"Optional date and time when the refund was approved","format":"date-time"},"pending_at":{"type":["null","string"],"description":"Optional date and time when the refund entered pending status","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Optional date and time when the refund was completed","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Optional date and time when the refund was canceled","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Optional date and time when the refund failed","format":"date-time"}},"additionalProperties":false},"RefundStatus":{"enum":["created","approved","processing","completed","canceled","failed"],"type":"string","description":"Represents the current status of a refund in the system"},"PaymentMethodDto":{"required":["created_at","customer_id","gateway","gateway_customer_id","gateway_entity_identifier","gateway_id","gateway_type","id","method_details","method_type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_id":{"type":"string","description":"The gateway's identifier for this payment method"},"gateway_customer_id":{"type":"string","description":"The gateway's customer identifier"},"gateway_type":{"type":"string","description":"The gateway-specific type identifier"},"method_type":{"type":"string","description":"The payment method type"},"method_details":{"$ref":"#/components/schemas/PaymentMethodDetailsDto"},"created_at":{"type":"string","description":"The date and time when this payment method was created","format":"date-time"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"updated_at":{"type":["null","string"],"description":"The date and time when this payment method was last updated","format":"date-time"}},"additionalProperties":false,"description":"Represents a stored payment method"},"PaymentMethodDetailsDto":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/CardDetailsDto"},"cashapp":{"$ref":"#/components/schemas/CashAppDetailsDto"},"paypal":{"$ref":"#/components/schemas/PayPalDetailsDto"},"link":{"$ref":"#/components/schemas/LinkDetailsDto"},"crypto":{"$ref":"#/components/schemas/CryptoDetailsDto"},"steamskins":{"$ref":"#/components/schemas/SteamSkinsDetailsDto"},"ideal":{"$ref":"#/components/schemas/IdealDetailsDto"},"p24":{"$ref":"#/components/schemas/P24DetailsDto"},"bancontact":{"$ref":"#/components/schemas/BancontactDetailsDto"},"klarna":{"$ref":"#/components/schemas/KlarnaDetailsDto"},"alipay":{"$ref":"#/components/schemas/AlipayDetailsDto"},"pay_by_bank":{"$ref":"#/components/schemas/PayByBankDetailsDto"},"pix":{"$ref":"#/components/schemas/PixDetailsDto"},"paysafecard":{"$ref":"#/components/schemas/PaysafeCardDetailsDto"}},"additionalProperties":false,"description":"Contains detailed information about a payment method.\nDISCLAIMER: These fields are not guaranteed to be backwards compatible and may change or be removed without notice."},"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"},"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"},"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"},"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"},"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"},"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false},"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"},"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"},"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"},"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"},"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"},"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"},"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"},"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"},"PaymentChargebackStatusDto":{"enum":["none","pending","won","lost"],"type":"string","description":"Represents chargeback status of a payment"},"PaymentPayoutSplitRuleDto":{"required":["line_amount_tax","line_amount_total","line_id","splits"],"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/FlakeId"},"line_amount_total":{"type":"integer","description":"The total amount of the line item in smallest currency unit","format":"int32"},"line_amount_tax":{"type":"integer","description":"The tax amount of the line item in smallest currency unit","format":"int32"},"splits":{"type":"array","items":{"$ref":"#/components/schemas/PaymentPayoutSplitRuleSplitDto"},"description":"The list of splits defining how the payout should be divided"}},"additionalProperties":false,"description":"Represents payout split rules for a payment line"},"PaymentPayoutSplitRuleSplitDto":{"required":["platform_fee_percentage","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)","format":"int32"},"platform_fee_percentage":{"type":"integer","description":"The platform fee percentage applied to this split (in basis points)","format":"int32"}},"additionalProperties":false,"description":"Represents a single split configuration within a payout split rule"},"PaymentPayoutSplitResultDto":{"required":["connected_platform_fee_amount","gateway_fee_amount","gross_amount","line_id","net_amount","platform_fee_amount","tax_amount","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"gross_amount":{"type":"integer","description":"The gross amount before fees in smallest currency unit","format":"int32"},"tax_amount":{"type":"integer","description":"The tax amount in smallest currency unit","format":"int32"},"gateway_fee_amount":{"type":"integer","description":"The gateway fee amount in smallest currency unit","format":"int32"},"platform_fee_amount":{"type":"integer","description":"The platform fee amount in smallest currency unit","format":"int32"},"connected_platform_fee_amount":{"type":"integer","description":"The connected platform fee amount in smallest currency unit","format":"int32"},"net_amount":{"type":"integer","description":"The net amount after all fees in smallest currency unit","format":"int32"},"line_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents payout split results for multi-party payments"},"LastPaymentErrorDto":{"required":["decline_code","message"],"type":"object","properties":{"decline_code":{"$ref":"#/components/schemas/PaymentDeclineCode"},"message":{"type":"string","description":"Human-readable decline reason message."}},"additionalProperties":false,"description":"The last payment decline object."},"PaymentDeclineCode":{"enum":["unknown","generic_decline","call_issuer","authentication_required","currency_not_supported","duplicate_transaction","expired_card","fraudulent","incorrect_number","incorrect_cvc","incorrect_pin","incorrect_zip","insufficient_funds","invalid_account","invalid_amount","invalid_expiry_month","invalid_expiry_year","issuer_not_available","lost_card","merchant_blacklist","new_account_information_available","no_action_taken","pickup_card","pin_try_exceeded","restricted_card","stolen_card","testmode_decline","try_again_later","security_violation","card_velocity_exceeded","do_not_honor","processing_error","card_not_supported","transaction_not_allowed","authorization_revoked","store_blocked"],"type":"string","description":"A payment decline reason code."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/payments":{"get":{"tags":["payments"],"summary":"Get payments","description":"Retrieves all payments for the specified store using the filter specified.","operationId":"Payments_GetPayments","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}},{"name":"status","in":"query","description":"Filter by payment statuses","schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentStatusDto"}}},{"name":"order_id","in":"query","description":"Filter by order ID","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customer_id","in":"query","description":"Filter by customer ID","schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get payment by ID

> Retrieves a payment by an ID.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"payments"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PaymentDto":{"required":["amount","chargeback_status","created_at","currency","customer","customer_id","gateway","gateway_entity_identifier","gateway_fee_amount","gateway_id","id","method","order_id","platform_fee_amount","platform_fee_rate","presentment_amount","presentment_currency","status","store_id","store_net_amount","tax_amount"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"refunds":{"type":["null","array"],"items":{"$ref":"#/components/schemas/RefundDto"},"description":"The list of refunds associated with this payment"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"gateway_id":{"type":"string","description":"The gateway payment identifier"},"method":{"$ref":"#/components/schemas/PaymentMethodDto"},"method_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/PaymentStatusDto"},"currency":{"type":"string","description":"The currency code used for this payment in the store's currency"},"amount":{"type":"integer","description":"The total payment amount in smallest currency unit","format":"int32"},"gateway_fee_amount":{"type":"integer","description":"The gateway fee amount in smallest currency unit","format":"int32"},"tax_amount":{"type":"integer","description":"The tax amount in smallest currency unit","format":"int32"},"platform_fee_amount":{"type":"integer","description":"The platform fee amount in smallest currency unit","format":"int32"},"store_net_amount":{"type":"integer","description":"The net amount going to the store in smallest currency unit","format":"int32"},"presentment_currency":{"type":"string","description":"The currency code used for presentment to the customer"},"presentment_amount":{"type":"integer","description":"The amount presented to the customer in smallest currency unit","format":"int32"},"fx_rate":{"type":["null","number"],"description":"The foreign exchange rate used for currency conversion","format":"double"},"platform_fee_rate":{"type":"integer","description":"The platform fee rate applied to this payment (in basis points)","format":"int32"},"chargeback_status":{"$ref":"#/components/schemas/PaymentChargebackStatusDto"},"chargeback_status_updated_at":{"type":["null","string"],"description":"The date and time when the chargeback status was last updated","format":"date-time"},"payout_split_rules":{"type":["null","array"],"items":{"$ref":"#/components/schemas/PaymentPayoutSplitRuleDto"},"description":"The payout split rules for multi-party payments"},"payout_split_results":{"type":["null","array"],"items":{"$ref":"#/components/schemas/PaymentPayoutSplitResultDto"},"description":"The payout split results for multi-party payments"},"created_at":{"type":"string","description":"The date and time when this payment was created","format":"date-time"},"pending_at":{"type":["null","string"],"description":"The date and time when this payment entered pending status","format":"date-time"},"completed_at":{"type":["null","string"],"description":"The date and time when this payment was completed","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"The date and time when this payment was canceled","format":"date-time"},"failed_at":{"type":["null","string"],"description":"The date and time when this payment failed","format":"date-time"},"refunded_at":{"type":["null","string"],"description":"The date and time when this payment was last refunded","format":"date-time"},"chargeback_at":{"type":["null","string"],"description":"The date and time when a chargeback was initiated on this payment","format":"date-time"},"last_payment_error":{"$ref":"#/components/schemas/LastPaymentErrorDto"}},"additionalProperties":false,"description":"Represents a payment transaction"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"RefundDto":{"required":["amount","amount_str","created_at","currency","customer_id","gateway_fee_amount","gateway_fee_amount_str","id","payment_id","platform_fee_amount","platform_fee_amount_str","refund_from_connected_user_balance","status","store_id","store_net_amount","store_net_amount_str","store_refund_amount","store_refund_amount_str","tax_amount","tax_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"payment_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/RefundStatus"},"failure_reason":{"type":["null","string"],"description":"Reason for failure if the refund has failed"},"currency":{"type":"string","description":"Three-letter currency code of the refund"},"amount":{"type":"integer","description":"Amount of the refund in smallest currency unit (e.g., cents)","format":"int64"},"amount_str":{"type":"string","description":"String representation of the refund amount, formatted for display"},"gateway_fee_amount":{"type":"integer","description":"Amount of payment processor fees in smallest currency unit","format":"int64"},"gateway_fee_amount_str":{"type":"string","description":"String representation of gateway fee amount, formatted for display"},"tax_amount":{"type":"integer","description":"Amount of tax being refunded in smallest currency unit","format":"int64"},"tax_amount_str":{"type":"string","description":"String representation of tax amount, formatted for display"},"platform_fee_amount":{"type":"integer","description":"Amount of platform fees in smallest currency unit","format":"int64"},"platform_fee_amount_str":{"type":"string","description":"String representation of platform fee amount, formatted for display"},"store_net_amount":{"type":"integer","description":"Net amount for the store after fees in smallest currency unit","format":"int64"},"store_net_amount_str":{"type":"string","description":"String representation of store net amount, formatted for display"},"store_refund_amount":{"type":"integer","description":"Amount of the refund to be paid by the store in smallest currency unit","format":"int64"},"store_refund_amount_str":{"type":"string","description":"String representation of store refund amount, formatted for display"},"presentment_currency":{"type":["null","string"],"description":"Optional currency code used for presentment to the customer if different from the base currency"},"presentment_amount":{"type":["null","integer"],"description":"Optional amount in presentment currency in smallest currency unit","format":"int64"},"fx_rate":{"type":["null","string"],"description":"Exchange rate used while refunding. Only present for payments made in non-settlement currency."},"refund_from_connected_user_balance":{"type":"boolean","description":"Indicates whether the refund should be taken from the connected user's balance.\nOnly relevant for platforms."},"created_at":{"type":"string","description":"Date and time when the refund was created","format":"date-time"},"approved_at":{"type":["null","string"],"description":"Optional date and time when the refund was approved","format":"date-time"},"pending_at":{"type":["null","string"],"description":"Optional date and time when the refund entered pending status","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Optional date and time when the refund was completed","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Optional date and time when the refund was canceled","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Optional date and time when the refund failed","format":"date-time"}},"additionalProperties":false},"RefundStatus":{"enum":["created","approved","processing","completed","canceled","failed"],"type":"string","description":"Represents the current status of a refund in the system"},"PaymentMethodDto":{"required":["created_at","customer_id","gateway","gateway_customer_id","gateway_entity_identifier","gateway_id","gateway_type","id","method_details","method_type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_id":{"type":"string","description":"The gateway's identifier for this payment method"},"gateway_customer_id":{"type":"string","description":"The gateway's customer identifier"},"gateway_type":{"type":"string","description":"The gateway-specific type identifier"},"method_type":{"type":"string","description":"The payment method type"},"method_details":{"$ref":"#/components/schemas/PaymentMethodDetailsDto"},"created_at":{"type":"string","description":"The date and time when this payment method was created","format":"date-time"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"updated_at":{"type":["null","string"],"description":"The date and time when this payment method was last updated","format":"date-time"}},"additionalProperties":false,"description":"Represents a stored payment method"},"PaymentMethodDetailsDto":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/CardDetailsDto"},"cashapp":{"$ref":"#/components/schemas/CashAppDetailsDto"},"paypal":{"$ref":"#/components/schemas/PayPalDetailsDto"},"link":{"$ref":"#/components/schemas/LinkDetailsDto"},"crypto":{"$ref":"#/components/schemas/CryptoDetailsDto"},"steamskins":{"$ref":"#/components/schemas/SteamSkinsDetailsDto"},"ideal":{"$ref":"#/components/schemas/IdealDetailsDto"},"p24":{"$ref":"#/components/schemas/P24DetailsDto"},"bancontact":{"$ref":"#/components/schemas/BancontactDetailsDto"},"klarna":{"$ref":"#/components/schemas/KlarnaDetailsDto"},"alipay":{"$ref":"#/components/schemas/AlipayDetailsDto"},"pay_by_bank":{"$ref":"#/components/schemas/PayByBankDetailsDto"},"pix":{"$ref":"#/components/schemas/PixDetailsDto"},"paysafecard":{"$ref":"#/components/schemas/PaysafeCardDetailsDto"}},"additionalProperties":false,"description":"Contains detailed information about a payment method.\nDISCLAIMER: These fields are not guaranteed to be backwards compatible and may change or be removed without notice."},"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"},"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"},"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"},"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"},"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"},"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false},"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"},"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"},"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"},"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"},"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"},"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"},"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"},"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"},"PaymentStatusDto":{"enum":["unknown","created","pending","completed","canceled","failed","refunded","chargeback","refund_failed","refund_processing"],"type":"string","description":"Represents payment status"},"PaymentChargebackStatusDto":{"enum":["none","pending","won","lost"],"type":"string","description":"Represents chargeback status of a payment"},"PaymentPayoutSplitRuleDto":{"required":["line_amount_tax","line_amount_total","line_id","splits"],"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/FlakeId"},"line_amount_total":{"type":"integer","description":"The total amount of the line item in smallest currency unit","format":"int32"},"line_amount_tax":{"type":"integer","description":"The tax amount of the line item in smallest currency unit","format":"int32"},"splits":{"type":"array","items":{"$ref":"#/components/schemas/PaymentPayoutSplitRuleSplitDto"},"description":"The list of splits defining how the payout should be divided"}},"additionalProperties":false,"description":"Represents payout split rules for a payment line"},"PaymentPayoutSplitRuleSplitDto":{"required":["platform_fee_percentage","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)","format":"int32"},"platform_fee_percentage":{"type":"integer","description":"The platform fee percentage applied to this split (in basis points)","format":"int32"}},"additionalProperties":false,"description":"Represents a single split configuration within a payout split rule"},"PaymentPayoutSplitResultDto":{"required":["connected_platform_fee_amount","gateway_fee_amount","gross_amount","line_id","net_amount","platform_fee_amount","tax_amount","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"gross_amount":{"type":"integer","description":"The gross amount before fees in smallest currency unit","format":"int32"},"tax_amount":{"type":"integer","description":"The tax amount in smallest currency unit","format":"int32"},"gateway_fee_amount":{"type":"integer","description":"The gateway fee amount in smallest currency unit","format":"int32"},"platform_fee_amount":{"type":"integer","description":"The platform fee amount in smallest currency unit","format":"int32"},"connected_platform_fee_amount":{"type":"integer","description":"The connected platform fee amount in smallest currency unit","format":"int32"},"net_amount":{"type":"integer","description":"The net amount after all fees in smallest currency unit","format":"int32"},"line_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents payout split results for multi-party payments"},"LastPaymentErrorDto":{"required":["decline_code","message"],"type":"object","properties":{"decline_code":{"$ref":"#/components/schemas/PaymentDeclineCode"},"message":{"type":"string","description":"Human-readable decline reason message."}},"additionalProperties":false,"description":"The last payment decline object."},"PaymentDeclineCode":{"enum":["unknown","generic_decline","call_issuer","authentication_required","currency_not_supported","duplicate_transaction","expired_card","fraudulent","incorrect_number","incorrect_cvc","incorrect_pin","incorrect_zip","insufficient_funds","invalid_account","invalid_amount","invalid_expiry_month","invalid_expiry_year","issuer_not_available","lost_card","merchant_blacklist","new_account_information_available","no_action_taken","pickup_card","pin_try_exceeded","restricted_card","stolen_card","testmode_decline","try_again_later","security_violation","card_velocity_exceeded","do_not_honor","processing_error","card_not_supported","transaction_not_allowed","authorization_revoked","store_blocked"],"type":"string","description":"A payment decline reason code."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/payments/{paymentId}":{"get":{"tags":["payments"],"summary":"Get payment by ID","description":"Retrieves a payment by an ID.","operationId":"Payments_GetPaymentById","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"paymentId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Product Dependent Migrations

## GET /v1/stores/{storeId}/products/{productId}/dependent-migrations

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"product-dependent-migrations"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductDependentMigrationDto":{"required":["created_at","created_by","id","migration_targets","product_id","send_all_commands_to_new_servers","send_new_commands_to_all_servers","status","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"migration_targets":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetDto"}},"status":{"$ref":"#/components/schemas/ProductDependentMigrationStatusDto"},"send_new_commands_to_all_servers":{"type":"boolean"},"send_all_commands_to_new_servers":{"type":"boolean"},"completed_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ProductDependentMigrationTargetDto":{"required":["type","versions"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetVersionDto"}}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"},"ProductDependentMigrationTargetVersionDto":{"required":["migrated","new_product_version_id","old_product_version_created_at","old_product_version_id","total_entities_migrated"],"type":"object","properties":{"old_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"old_product_version_created_at":{"type":"string","format":"date-time"},"new_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"total_entities_migrated":{"type":"integer","format":"int32"},"migrated":{"type":"boolean"}},"additionalProperties":false},"ProductDependentMigrationStatusDto":{"enum":["invalid","created","completed"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/dependent-migrations":{"get":{"tags":["product-dependent-migrations"],"operationId":"ProductsDependentMigrations_GetProductDependentMigrations","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/products/{productId}/dependent-migrations

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"product-dependent-migrations"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateProductDependentMigrationRequestDto":{"required":["send_all_commands_to_new_servers","send_new_commands_to_all_servers","target_types"],"type":"object","properties":{"send_new_commands_to_all_servers":{"type":"boolean"},"send_all_commands_to_new_servers":{"type":"boolean"},"target_types":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"}}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"},"ProductDependentMigrationDto":{"required":["created_at","created_by","id","migration_targets","product_id","send_all_commands_to_new_servers","send_new_commands_to_all_servers","status","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"migration_targets":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetDto"}},"status":{"$ref":"#/components/schemas/ProductDependentMigrationStatusDto"},"send_new_commands_to_all_servers":{"type":"boolean"},"send_all_commands_to_new_servers":{"type":"boolean"},"completed_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ProductDependentMigrationTargetDto":{"required":["type","versions"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetVersionDto"}}},"additionalProperties":false},"ProductDependentMigrationTargetVersionDto":{"required":["migrated","new_product_version_id","old_product_version_created_at","old_product_version_id","total_entities_migrated"],"type":"object","properties":{"old_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"old_product_version_created_at":{"type":"string","format":"date-time"},"new_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"total_entities_migrated":{"type":"integer","format":"int32"},"migrated":{"type":"boolean"}},"additionalProperties":false},"ProductDependentMigrationStatusDto":{"enum":["invalid","created","completed"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/dependent-migrations":{"post":{"tags":["product-dependent-migrations"],"operationId":"ProductsDependentMigrations_CreateProductDependentMigration","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDependentMigrationRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateProductDependentMigrationRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateProductDependentMigrationRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDependentMigrationDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/products/{productId}/dependent-migrations/estimate

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"product-dependent-migrations"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductDependentMigrationEstimateVersionDto":{"required":["product_version_created_at","product_version_id","target_counts"],"type":"object","properties":{"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_created_at":{"type":"string","format":"date-time"},"target_counts":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationEstimateTargetCountDto"}}},"additionalProperties":false},"ProductDependentMigrationEstimateTargetCountDto":{"required":["total_entities","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"},"total_entities":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/dependent-migrations/estimate":{"get":{"tags":["product-dependent-migrations"],"operationId":"ProductsDependentMigrations_GetProductDependentMigrationEstimate","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationEstimateVersionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/product-dependent-migrations/{productDependentMigrationId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"product-dependent-migrations"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductDependentMigrationDto":{"required":["created_at","created_by","id","migration_targets","product_id","send_all_commands_to_new_servers","send_new_commands_to_all_servers","status","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"migration_targets":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetDto"}},"status":{"$ref":"#/components/schemas/ProductDependentMigrationStatusDto"},"send_new_commands_to_all_servers":{"type":"boolean"},"send_all_commands_to_new_servers":{"type":"boolean"},"completed_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ProductDependentMigrationTargetDto":{"required":["type","versions"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetVersionDto"}}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"},"ProductDependentMigrationTargetVersionDto":{"required":["migrated","new_product_version_id","old_product_version_created_at","old_product_version_id","total_entities_migrated"],"type":"object","properties":{"old_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"old_product_version_created_at":{"type":"string","format":"date-time"},"new_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"total_entities_migrated":{"type":"integer","format":"int32"},"migrated":{"type":"boolean"}},"additionalProperties":false},"ProductDependentMigrationStatusDto":{"enum":["invalid","created","completed"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/product-dependent-migrations/{productDependentMigrationId}":{"get":{"tags":["product-dependent-migrations"],"operationId":"ProductsDependentMigrations_GetProductDependentMigrationById","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productDependentMigrationId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDependentMigrationDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Products

## Get products

> Retrieves all products for the specified store.\
> DO NOT USE THIS ROUTE FOR DISPLAYING PRODUCTS ON YOUR STOREFRONT, use the storefront API instead!

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"products"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductDto":{"required":["allow_one_time_purchase","allow_subscription","commands","custom_variable_ids","customer_stock_limit","description","gameservers","id","name","payout_splits","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","required_product_ids","single_game_server_only","slug","sort_order","stock_available","store_id","store_stock_limit","subscription_interval_scale","subscription_interval_value","tags","trial","upselling","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/ProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/ProductUpsellConfigurationDto"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"stock_available":{"$ref":"#/components/schemas/ProductStockAvailableDto"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDto"},"description":"The game servers associated with the product."},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":"array","items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductTrialConfigurationDto":{"required":["allow_repeat_trials","enabled","new_customer_order_lookback_scale","new_customer_order_lookback_value","new_customers_only","period_scale","period_value","repeat_trial_cooldown_scale","repeat_trial_cooldown_value","revoke_immediately_when_canceled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if trials should be enabled for the product."},"period_value":{"type":"integer","description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":"boolean","description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":"boolean","description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":"integer","description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":"boolean","description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":"integer","description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trial is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"ProductUpsellConfigurationDto":{"required":["enabled","recommendations"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if upselling should be enabled for the product.\nIf disabled, the product will never be recommended regardless of the global config."},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/ProductUpsellRecommendationDto"},"description":"Upselling recommendation for the product."}},"additionalProperties":false},"ProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockAvailableDto":{"required":["customer_available","store_available"],"type":"object","properties":{"store_available":{"type":"integer","description":"Indicates how many stock is left store-wide.","format":"int32"},"customer_available":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"ProductGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether this game server is enabled."}},"additionalProperties":false},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products":{"get":{"tags":["products"],"summary":"Get products","description":"Retrieves all products for the specified store.\nDO NOT USE THIS ROUTE FOR DISPLAYING PRODUCTS ON YOUR STOREFRONT, use the storefront API instead!","operationId":"Products_GetProducts","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve products for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"product_id","in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}}},{"name":"slug","in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Create product

> Creates a new product in the specified store.\
> Creating dynamic products while creating a checkout session via this endpoint without prior approval is prohibited and will result in store deactivation per our User Agreement.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"products"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertProductRequestDto":{"type":"object","properties":{"slug":{"type":["null","string"],"description":"The unique URL-safe identifier (slug) for the product."},"name":{"type":["null","string"],"description":"The display name of the product."},"description":{"type":["null","string"],"description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"price":{"type":["null","integer"],"description":"The price of the product in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":["null","boolean"],"description":"Indicates whether the customer is prompted to select a game server before purchasing."},"allow_one_time_purchase":{"type":["null","boolean"],"description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":["null","boolean"],"description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":["null","integer"],"description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/UpsertProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/UpsertProductUpsellConfigurationDto"},"remove_after_enabled":{"type":["null","boolean"],"description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":["null","integer"],"description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The tag IDs associated with the product."},"gameservers":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The gameserver IDs associated with the product."},"commands":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution.\nRequires special approval."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.\nSet to `null` to keep enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.\nSet to `null` to keep enabled.","format":"date-time"},"required_product_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"UpsertProductTrialConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"],"description":"Indicates if trials should be enabled for the product."},"period_value":{"type":["null","integer"],"description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":["null","boolean"],"description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":["null","boolean"],"description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":["null","integer"],"description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":["null","boolean"],"description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":["null","integer"],"description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trials is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"UpsertProductUpsellConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"]},"recommendations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/UpsertProductUpsellRecommendationDto"}}},"additionalProperties":false},"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."},"ProductDto":{"required":["allow_one_time_purchase","allow_subscription","commands","custom_variable_ids","customer_stock_limit","description","gameservers","id","name","payout_splits","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","required_product_ids","single_game_server_only","slug","sort_order","stock_available","store_id","store_stock_limit","subscription_interval_scale","subscription_interval_value","tags","trial","upselling","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/ProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/ProductUpsellConfigurationDto"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"stock_available":{"$ref":"#/components/schemas/ProductStockAvailableDto"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDto"},"description":"The game servers associated with the product."},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":"array","items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProductTrialConfigurationDto":{"required":["allow_repeat_trials","enabled","new_customer_order_lookback_scale","new_customer_order_lookback_value","new_customers_only","period_scale","period_value","repeat_trial_cooldown_scale","repeat_trial_cooldown_value","revoke_immediately_when_canceled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if trials should be enabled for the product."},"period_value":{"type":"integer","description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":"boolean","description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":"boolean","description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":"integer","description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":"boolean","description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":"integer","description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trial is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"ProductUpsellConfigurationDto":{"required":["enabled","recommendations"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if upselling should be enabled for the product.\nIf disabled, the product will never be recommended regardless of the global config."},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/ProductUpsellRecommendationDto"},"description":"Upselling recommendation for the product."}},"additionalProperties":false},"ProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"ProductStockAvailableDto":{"required":["customer_available","store_available"],"type":"object","properties":{"store_available":{"type":"integer","description":"Indicates how many stock is left store-wide.","format":"int32"},"customer_available":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"ProductGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether this game server is enabled."}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products":{"post":{"tags":["products"],"summary":"Create product","description":"Creates a new product in the specified store.\nCreating dynamic products while creating a checkout session via this endpoint without prior approval is prohibited and will result in store deactivation per our User Agreement.","operationId":"Products_CreateProduct","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to create the product in.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertProductRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertProductRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertProductRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get product

> Retrieves a specific product by ID from the specified store.\
> DO NOT USE THIS ROUTE FOR DISPLAYING PRODUCTS ON YOUR STOREFRONT, use the storefront API instead.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"products"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductDto":{"required":["allow_one_time_purchase","allow_subscription","commands","custom_variable_ids","customer_stock_limit","description","gameservers","id","name","payout_splits","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","required_product_ids","single_game_server_only","slug","sort_order","stock_available","store_id","store_stock_limit","subscription_interval_scale","subscription_interval_value","tags","trial","upselling","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/ProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/ProductUpsellConfigurationDto"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"stock_available":{"$ref":"#/components/schemas/ProductStockAvailableDto"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDto"},"description":"The game servers associated with the product."},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":"array","items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductTrialConfigurationDto":{"required":["allow_repeat_trials","enabled","new_customer_order_lookback_scale","new_customer_order_lookback_value","new_customers_only","period_scale","period_value","repeat_trial_cooldown_scale","repeat_trial_cooldown_value","revoke_immediately_when_canceled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if trials should be enabled for the product."},"period_value":{"type":"integer","description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":"boolean","description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":"boolean","description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":"integer","description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":"boolean","description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":"integer","description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trial is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"ProductUpsellConfigurationDto":{"required":["enabled","recommendations"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if upselling should be enabled for the product.\nIf disabled, the product will never be recommended regardless of the global config."},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/ProductUpsellRecommendationDto"},"description":"Upselling recommendation for the product."}},"additionalProperties":false},"ProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockAvailableDto":{"required":["customer_available","store_available"],"type":"object","properties":{"store_available":{"type":"integer","description":"Indicates how many stock is left store-wide.","format":"int32"},"customer_available":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"ProductGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether this game server is enabled."}},"additionalProperties":false},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}":{"get":{"tags":["products"],"summary":"Get product","description":"Retrieves a specific product by ID from the specified store.\nDO NOT USE THIS ROUTE FOR DISPLAYING PRODUCTS ON YOUR STOREFRONT, use the storefront API instead.","operationId":"Products_GetProduct","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the product belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","description":"The ID of the product to retrieve.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Delete product

> Deletes a product from the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"products"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}":{"delete":{"tags":["products"],"summary":"Delete product","description":"Deletes a product from the specified store.","operationId":"Products_DeleteProduct","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the product belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","description":"The ID of the product to delete.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update product

> Updates an existing product in the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"products"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertProductRequestDto":{"type":"object","properties":{"slug":{"type":["null","string"],"description":"The unique URL-safe identifier (slug) for the product."},"name":{"type":["null","string"],"description":"The display name of the product."},"description":{"type":["null","string"],"description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"price":{"type":["null","integer"],"description":"The price of the product in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":["null","boolean"],"description":"Indicates whether the customer is prompted to select a game server before purchasing."},"allow_one_time_purchase":{"type":["null","boolean"],"description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":["null","boolean"],"description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":["null","integer"],"description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/UpsertProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/UpsertProductUpsellConfigurationDto"},"remove_after_enabled":{"type":["null","boolean"],"description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":["null","integer"],"description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The tag IDs associated with the product."},"gameservers":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The gameserver IDs associated with the product."},"commands":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution.\nRequires special approval."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.\nSet to `null` to keep enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.\nSet to `null` to keep enabled.","format":"date-time"},"required_product_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"UpsertProductTrialConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"],"description":"Indicates if trials should be enabled for the product."},"period_value":{"type":["null","integer"],"description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":["null","boolean"],"description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":["null","boolean"],"description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":["null","integer"],"description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":["null","boolean"],"description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":["null","integer"],"description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trials is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"UpsertProductUpsellConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"]},"recommendations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/UpsertProductUpsellRecommendationDto"}}},"additionalProperties":false},"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."},"ProductDto":{"required":["allow_one_time_purchase","allow_subscription","commands","custom_variable_ids","customer_stock_limit","description","gameservers","id","name","payout_splits","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","required_product_ids","single_game_server_only","slug","sort_order","stock_available","store_id","store_stock_limit","subscription_interval_scale","subscription_interval_value","tags","trial","upselling","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/ProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/ProductUpsellConfigurationDto"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"stock_available":{"$ref":"#/components/schemas/ProductStockAvailableDto"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDto"},"description":"The game servers associated with the product."},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":"array","items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProductTrialConfigurationDto":{"required":["allow_repeat_trials","enabled","new_customer_order_lookback_scale","new_customer_order_lookback_value","new_customers_only","period_scale","period_value","repeat_trial_cooldown_scale","repeat_trial_cooldown_value","revoke_immediately_when_canceled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if trials should be enabled for the product."},"period_value":{"type":"integer","description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":"boolean","description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":"boolean","description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":"integer","description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":"boolean","description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":"integer","description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trial is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"ProductUpsellConfigurationDto":{"required":["enabled","recommendations"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if upselling should be enabled for the product.\nIf disabled, the product will never be recommended regardless of the global config."},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/ProductUpsellRecommendationDto"},"description":"Upselling recommendation for the product."}},"additionalProperties":false},"ProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"ProductStockAvailableDto":{"required":["customer_available","store_available"],"type":"object","properties":{"store_available":{"type":"integer","description":"Indicates how many stock is left store-wide.","format":"int32"},"customer_available":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"ProductGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether this game server is enabled."}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}":{"patch":{"tags":["products"],"summary":"Update product","description":"Updates an existing product in the specified store.","operationId":"Products_UpdateProduct","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the product belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","description":"The ID of the product to update.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertProductRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertProductRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertProductRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update product sort order

> Updates the sort order of products in the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"products"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateProductSortOrderRequestDto":{"required":["product_ids"],"type":"object","properties":{"product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"An array of product IDs in the order that they should be sorted."}},"additionalProperties":false},"ProductDto":{"required":["allow_one_time_purchase","allow_subscription","commands","custom_variable_ids","customer_stock_limit","description","gameservers","id","name","payout_splits","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","required_product_ids","single_game_server_only","slug","sort_order","stock_available","store_id","store_stock_limit","subscription_interval_scale","subscription_interval_value","tags","trial","upselling","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/ProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/ProductUpsellConfigurationDto"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"stock_available":{"$ref":"#/components/schemas/ProductStockAvailableDto"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDto"},"description":"The game servers associated with the product."},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":"array","items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductTrialConfigurationDto":{"required":["allow_repeat_trials","enabled","new_customer_order_lookback_scale","new_customer_order_lookback_value","new_customers_only","period_scale","period_value","repeat_trial_cooldown_scale","repeat_trial_cooldown_value","revoke_immediately_when_canceled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if trials should be enabled for the product."},"period_value":{"type":"integer","description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":"boolean","description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":"boolean","description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":"integer","description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":"boolean","description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":"integer","description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trial is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"ProductUpsellConfigurationDto":{"required":["enabled","recommendations"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if upselling should be enabled for the product.\nIf disabled, the product will never be recommended regardless of the global config."},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/ProductUpsellRecommendationDto"},"description":"Upselling recommendation for the product."}},"additionalProperties":false},"ProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockAvailableDto":{"required":["customer_available","store_available"],"type":"object","properties":{"store_available":{"type":"integer","description":"Indicates how many stock is left store-wide.","format":"int32"},"customer_available":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"ProductGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether this game server is enabled."}},"additionalProperties":false},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/sort-order":{"post":{"tags":["products"],"summary":"Update product sort order","description":"Updates the sort order of products in the specified store.","operationId":"Products_UpdateProductSortOrder","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to update product sort order in.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductSortOrderRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateProductSortOrderRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateProductSortOrderRequestDto"}}}},"responses":{"204":{"description":"No Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Regional Pricing

## GET /v1/stores/{storeId}/products/{productId}/pricing/regions

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"regional-pricing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductPricingRegionDto":{"required":["blended_vat_rate","country_codes","enabled","group_id","id","local_currency","local_currency_fx_rate","name"],"type":"object","properties":{"id":{"type":"string"},"group_id":{"type":"string"},"local_currency":{"type":"string"},"local_currency_fx_rate":{"type":"number","format":"double"},"blended_vat_rate":{"type":"number","format":"double"},"name":{"type":"string"},"country_codes":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"price":{"type":["null","integer"],"format":"int64"},"default_price_multiplier":{"type":["null","integer"],"format":"int64"},"currency":{"type":["null","string"]},"tax_inclusive":{"type":["null","boolean"]},"updated_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/pricing/regions":{"get":{"tags":["regional-pricing"],"operationId":"ProductsPricing_GetProductPricingRegions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductPricingRegionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/products/{productId}/pricing/regions/{regionId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"regional-pricing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductPricingRegionOverrideDto":{"type":"object","properties":{"price":{"type":["null","integer"],"format":"int64"},"enabled":{"type":["null","boolean"]},"currency":{"type":["null","string"]},"tax_inclusive":{"type":["null","boolean"]}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/{productId}/pricing/regions/{regionId}":{"patch":{"tags":["regional-pricing"],"operationId":"ProductsPricing_SetProductPricingRegionOverride","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"productId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"regionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPricingRegionOverrideDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProductPricingRegionOverrideDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ProductPricingRegionOverrideDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/products/pricing/regions

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"regional-pricing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductPricingRegionDto":{"required":["blended_vat_rate","country_codes","enabled","group_id","id","local_currency","local_currency_fx_rate","name"],"type":"object","properties":{"id":{"type":"string"},"group_id":{"type":"string"},"local_currency":{"type":"string"},"local_currency_fx_rate":{"type":"number","format":"double"},"blended_vat_rate":{"type":"number","format":"double"},"name":{"type":"string"},"country_codes":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"price":{"type":["null","integer"],"format":"int64"},"default_price_multiplier":{"type":["null","integer"],"format":"int64"},"currency":{"type":["null","string"]},"tax_inclusive":{"type":["null","boolean"]},"updated_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/pricing/regions":{"get":{"tags":["regional-pricing"],"operationId":"ProductsPricing_GetStorePricingRegions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductPricingRegionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/products/pricing/regions/{regionId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"regional-pricing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StorePricingRegionOverrideDto":{"type":"object","properties":{"default_price_multiplier":{"type":["null","integer"],"format":"int64"},"enabled":{"type":["null","boolean"]},"currency":{"type":["null","string"]},"tax_inclusive":{"type":["null","boolean"]}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/pricing/regions/{regionId}":{"patch":{"tags":["regional-pricing"],"operationId":"ProductsPricing_SetStorePricingRegionOverride","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"regionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePricingRegionOverrideDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/StorePricingRegionOverrideDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/StorePricingRegionOverrideDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/products/pricing/region-groups

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"regional-pricing"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductPricingRegionGroupDto":{"required":["description","id","name","recommended_base_price_multiplier"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"recommended_base_price_multiplier":{"type":"integer","format":"int64"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/products/pricing/region-groups":{"get":{"tags":["regional-pricing"],"operationId":"ProductsPricing_GetStorePricingRegionGroups","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductPricingRegionGroupDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Sales

## GET /v1/stores/{storeId}/sales

> Get sales associated with a store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"sales"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SaleDto":{"required":["apply_to_product_ids","apply_to_tag_ids","begins_at","created_at","created_by","discount_amount","discount_type","duration","duration_in_intervals","enabled","id","minimum_order_value","name","store_id","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the sale is enabled."},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount value. For percent discounts, this represents the percentage \nmultiplied by 10 (e.g., 250 = 25%). For amount discounts, this represents \nthe value in the smallest currency unit (e.g., cents).","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","description":"The number of subscription intervals the coupon is valid for, used if the duration is repeating.","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the sale applies to."},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the sale applies to."},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the sale, in the smallest currency unit (e.g., cents).","format":"int32"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the sale was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the sale was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a Sale, including configuration and audit information."},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SaleDurationDto":{"enum":["unspecified","once","forever","repeating"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/sales":{"get":{"tags":["sales"],"summary":"Get sales associated with a store.","operationId":"Sales_GetSales","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SaleDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/sales

> Create a sale by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"sales"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateSaleDto":{"required":["enabled","name","discount_type","discount_amount","duration","duration_in_intervals","apply_to_product_ids","apply_to_tag_ids","minimum_order_value","begins_at"],"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"minimum_order_value":{"type":"integer","format":"int32"},"begins_at":{"type":"string","format":"date-time"},"ends_at":{"type":["null","string"],"format":"date-time"}}},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SaleDurationDto":{"enum":["unspecified","once","forever","repeating"],"type":"string"},"SaleDto":{"required":["apply_to_product_ids","apply_to_tag_ids","begins_at","created_at","created_by","discount_amount","discount_type","duration","duration_in_intervals","enabled","id","minimum_order_value","name","store_id","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the sale is enabled."},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount value. For percent discounts, this represents the percentage \nmultiplied by 10 (e.g., 250 = 25%). For amount discounts, this represents \nthe value in the smallest currency unit (e.g., cents).","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","description":"The number of subscription intervals the coupon is valid for, used if the duration is repeating.","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the sale applies to."},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the sale applies to."},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the sale, in the smallest currency unit (e.g., cents).","format":"int32"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the sale was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the sale was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a Sale, including configuration and audit information."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/sales":{"post":{"tags":["sales"],"summary":"Create a sale by ID for a store","operationId":"Sales_CreateSale","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSaleDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateSaleDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateSaleDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/sales/{saleId}

> Get a sale by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"sales"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SaleDto":{"required":["apply_to_product_ids","apply_to_tag_ids","begins_at","created_at","created_by","discount_amount","discount_type","duration","duration_in_intervals","enabled","id","minimum_order_value","name","store_id","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the sale is enabled."},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount value. For percent discounts, this represents the percentage \nmultiplied by 10 (e.g., 250 = 25%). For amount discounts, this represents \nthe value in the smallest currency unit (e.g., cents).","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","description":"The number of subscription intervals the coupon is valid for, used if the duration is repeating.","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the sale applies to."},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the sale applies to."},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the sale, in the smallest currency unit (e.g., cents).","format":"int32"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the sale was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the sale was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a Sale, including configuration and audit information."},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SaleDurationDto":{"enum":["unspecified","once","forever","repeating"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/sales/{saleId}":{"get":{"tags":["sales"],"summary":"Get a sale by ID for a store","operationId":"Sales_GetSale","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"saleId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/sales/{saleId}

> Delete a sale by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"sales"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/sales/{saleId}":{"delete":{"tags":["sales"],"summary":"Delete a sale by ID for a store","operationId":"Sales_DeleteSaleById","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"saleId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/sales/{saleId}

> Update a sale by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"sales"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateSaleDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"minimum_order_value":{"type":"integer","format":"int32"},"begins_at":{"type":"string","format":"date-time"},"ends_at":{"type":["null","string"],"format":"date-time"}}},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SaleDurationDto":{"enum":["unspecified","once","forever","repeating"],"type":"string"},"SaleDto":{"required":["apply_to_product_ids","apply_to_tag_ids","begins_at","created_at","created_by","discount_amount","discount_type","duration","duration_in_intervals","enabled","id","minimum_order_value","name","store_id","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the sale is enabled."},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount value. For percent discounts, this represents the percentage \nmultiplied by 10 (e.g., 250 = 25%). For amount discounts, this represents \nthe value in the smallest currency unit (e.g., cents).","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","description":"The number of subscription intervals the coupon is valid for, used if the duration is repeating.","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the sale applies to."},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the sale applies to."},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the sale, in the smallest currency unit (e.g., cents).","format":"int32"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the sale was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the sale was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a Sale, including configuration and audit information."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/sales/{saleId}":{"patch":{"tags":["sales"],"summary":"Update a sale by ID for a store","operationId":"Sales_UpdateSale","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"saleId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSaleDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateSaleDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateSaleDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Store

## Get stores

> Retrieves all stores accessible to the authenticated user or API key.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"store"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"StoreDto":{"required":["currency","description","game","id","live_mode","name","owner_id","platform","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"owner_id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-safe slug used to identify the store (e.g. \"my-rust-server\")."},"name":{"type":"string","description":"The display name of the store."},"platform":{"type":"string","description":"The platform this store is associated with (e.g. \"rust\", \"minecraft\")."},"game":{"type":"string","description":"Alias for 'platform'. Returns the platform identifier as a game name.","readOnly":true},"currency":{"type":"string","description":"The ISO 4217 currency code used by this store for pricing (e.g. \"usd\", \"eur\")"},"description":{"type":"string","description":"A human-readable description of the store shown to customers and PayNow."},"website_url":{"type":["null","string"],"description":"The store's public website URL."},"contact_email":{"type":["null","string"],"description":"General contact email address for the store."},"support_email":{"type":["null","string"],"description":"Dedicated support email address for customer inquiries."},"support_url":{"type":["null","string"],"description":"URL to the store's support portal or help page."},"integration_type":{"type":["null","string"],"description":"The integration type used by the store."},"live_mode":{"type":"boolean","description":"When set to true, the store is processing real transactions in live mode."},"logo_url":{"type":["null","string"],"description":"URL of the store's full-size logo image."},"logo_square_url":{"type":["null","string"],"description":"URL of the store's square/icon logo image."},"minecraft_bedrock_username_prefix":{"type":["null","string"],"description":"Username prefix used to identify Minecraft Bedrock players (e.g. \".\")."},"created_at":{"type":["null","string"],"description":"The UTC timestamp when the store was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The UTC timestamp when the store was last updated.","format":"date-time"},"onboarding_completed_at":{"type":["null","string"],"description":"The UTC timestamp when the store completed onboarding.","format":"date-time"},"platform_store_type_association":{"$ref":"#/components/schemas/PlatformStoreTypeAssociationDetailsDto"}},"additionalProperties":false,"description":"Represents a PayNow store and its associated configuration."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PlatformStoreTypeAssociationDetailsDto":{"required":["disable_billing_plans","display_disclaimers","full_external_management","platform_id","store_platform"],"type":"object","properties":{"platform_id":{"$ref":"#/components/schemas/FlakeId"},"associated_platform":{"$ref":"#/components/schemas/PublicPlatformDto"},"store_platform":{"type":"string","description":"The store platform identifier string (e.g. \"rust\", \"minecraft\")."},"paynow_platform_fee_percentage_override":{"type":["null","integer"],"description":"Overrides the default PayNow platform fee percentage for this association.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_fee_percentage":{"type":["null","integer"],"description":"The fee percentage charged by the connected platform.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_wallet_id":{"$ref":"#/components/schemas/FlakeId"},"disable_billing_plans":{"type":"boolean","description":"When true, billing plans are disabled for this platform/store type combination."},"display_disclaimers":{"type":"boolean","description":"When true, legal or compliance disclaimers should be displayed to the end user."},"full_external_management":{"type":"boolean","description":"Whether the management hides some PayNow UI"}},"additionalProperties":false},"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores":{"get":{"tags":["store"],"summary":"Get stores","description":"Retrieves all stores accessible to the authenticated user or API key.","operationId":"Store_GetStores","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoreDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get a store

> Retrieves a single store by its ID.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"store"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreDto":{"required":["currency","description","game","id","live_mode","name","owner_id","platform","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"owner_id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-safe slug used to identify the store (e.g. \"my-rust-server\")."},"name":{"type":"string","description":"The display name of the store."},"platform":{"type":"string","description":"The platform this store is associated with (e.g. \"rust\", \"minecraft\")."},"game":{"type":"string","description":"Alias for 'platform'. Returns the platform identifier as a game name.","readOnly":true},"currency":{"type":"string","description":"The ISO 4217 currency code used by this store for pricing (e.g. \"usd\", \"eur\")"},"description":{"type":"string","description":"A human-readable description of the store shown to customers and PayNow."},"website_url":{"type":["null","string"],"description":"The store's public website URL."},"contact_email":{"type":["null","string"],"description":"General contact email address for the store."},"support_email":{"type":["null","string"],"description":"Dedicated support email address for customer inquiries."},"support_url":{"type":["null","string"],"description":"URL to the store's support portal or help page."},"integration_type":{"type":["null","string"],"description":"The integration type used by the store."},"live_mode":{"type":"boolean","description":"When set to true, the store is processing real transactions in live mode."},"logo_url":{"type":["null","string"],"description":"URL of the store's full-size logo image."},"logo_square_url":{"type":["null","string"],"description":"URL of the store's square/icon logo image."},"minecraft_bedrock_username_prefix":{"type":["null","string"],"description":"Username prefix used to identify Minecraft Bedrock players (e.g. \".\")."},"created_at":{"type":["null","string"],"description":"The UTC timestamp when the store was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The UTC timestamp when the store was last updated.","format":"date-time"},"onboarding_completed_at":{"type":["null","string"],"description":"The UTC timestamp when the store completed onboarding.","format":"date-time"},"platform_store_type_association":{"$ref":"#/components/schemas/PlatformStoreTypeAssociationDetailsDto"}},"additionalProperties":false,"description":"Represents a PayNow store and its associated configuration."},"PlatformStoreTypeAssociationDetailsDto":{"required":["disable_billing_plans","display_disclaimers","full_external_management","platform_id","store_platform"],"type":"object","properties":{"platform_id":{"$ref":"#/components/schemas/FlakeId"},"associated_platform":{"$ref":"#/components/schemas/PublicPlatformDto"},"store_platform":{"type":"string","description":"The store platform identifier string (e.g. \"rust\", \"minecraft\")."},"paynow_platform_fee_percentage_override":{"type":["null","integer"],"description":"Overrides the default PayNow platform fee percentage for this association.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_fee_percentage":{"type":["null","integer"],"description":"The fee percentage charged by the connected platform.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_wallet_id":{"$ref":"#/components/schemas/FlakeId"},"disable_billing_plans":{"type":"boolean","description":"When true, billing plans are disabled for this platform/store type combination."},"display_disclaimers":{"type":"boolean","description":"When true, legal or compliance disclaimers should be displayed to the end user."},"full_external_management":{"type":"boolean","description":"Whether the management hides some PayNow UI"}},"additionalProperties":false},"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}":{"get":{"tags":["store"],"summary":"Get a store","description":"Retrieves a single store by its ID.","operationId":"Store_GetStore","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update a store

> Partially updates a store's configuration using the provided fields.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"store"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateStoreDto":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string"},"game":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"contact_email":{"type":"string"},"support_email":{"type":"string"},"support_url":{"type":"string"},"integration_type":{"type":"string"},"live_mode":{"type":"boolean"},"minecraft_bedrock_username_prefix":{"type":"string"}}},"StoreDto":{"required":["currency","description","game","id","live_mode","name","owner_id","platform","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"owner_id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-safe slug used to identify the store (e.g. \"my-rust-server\")."},"name":{"type":"string","description":"The display name of the store."},"platform":{"type":"string","description":"The platform this store is associated with (e.g. \"rust\", \"minecraft\")."},"game":{"type":"string","description":"Alias for 'platform'. Returns the platform identifier as a game name.","readOnly":true},"currency":{"type":"string","description":"The ISO 4217 currency code used by this store for pricing (e.g. \"usd\", \"eur\")"},"description":{"type":"string","description":"A human-readable description of the store shown to customers and PayNow."},"website_url":{"type":["null","string"],"description":"The store's public website URL."},"contact_email":{"type":["null","string"],"description":"General contact email address for the store."},"support_email":{"type":["null","string"],"description":"Dedicated support email address for customer inquiries."},"support_url":{"type":["null","string"],"description":"URL to the store's support portal or help page."},"integration_type":{"type":["null","string"],"description":"The integration type used by the store."},"live_mode":{"type":"boolean","description":"When set to true, the store is processing real transactions in live mode."},"logo_url":{"type":["null","string"],"description":"URL of the store's full-size logo image."},"logo_square_url":{"type":["null","string"],"description":"URL of the store's square/icon logo image."},"minecraft_bedrock_username_prefix":{"type":["null","string"],"description":"Username prefix used to identify Minecraft Bedrock players (e.g. \".\")."},"created_at":{"type":["null","string"],"description":"The UTC timestamp when the store was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The UTC timestamp when the store was last updated.","format":"date-time"},"onboarding_completed_at":{"type":["null","string"],"description":"The UTC timestamp when the store completed onboarding.","format":"date-time"},"platform_store_type_association":{"$ref":"#/components/schemas/PlatformStoreTypeAssociationDetailsDto"}},"additionalProperties":false,"description":"Represents a PayNow store and its associated configuration."},"PlatformStoreTypeAssociationDetailsDto":{"required":["disable_billing_plans","display_disclaimers","full_external_management","platform_id","store_platform"],"type":"object","properties":{"platform_id":{"$ref":"#/components/schemas/FlakeId"},"associated_platform":{"$ref":"#/components/schemas/PublicPlatformDto"},"store_platform":{"type":"string","description":"The store platform identifier string (e.g. \"rust\", \"minecraft\")."},"paynow_platform_fee_percentage_override":{"type":["null","integer"],"description":"Overrides the default PayNow platform fee percentage for this association.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_fee_percentage":{"type":["null","integer"],"description":"The fee percentage charged by the connected platform.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_wallet_id":{"$ref":"#/components/schemas/FlakeId"},"disable_billing_plans":{"type":"boolean","description":"When true, billing plans are disabled for this platform/store type combination."},"display_disclaimers":{"type":"boolean","description":"When true, legal or compliance disclaimers should be displayed to the end user."},"full_external_management":{"type":"boolean","description":"Whether the management hides some PayNow UI"}},"additionalProperties":false},"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}":{"patch":{"tags":["store"],"summary":"Update a store","description":"Partially updates a store's configuration using the provided fields.","operationId":"Store_UpdateStore","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateStoreDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## List store members

> Retrieves all members who have access to the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"store"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreMemberDto":{"required":["id","user","user_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"user_id":{"$ref":"#/components/schemas/FlakeId"},"user":{"$ref":"#/components/schemas/StoreMemberUserDto"},"added_at":{"type":["null","string"],"description":"The UTC timestamp when the member was added to the store.","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"role_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents a member of a PayNow store."},"StoreMemberUserDto":{"required":["id","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"},"email":{"type":["null","string"],"description":"The email address associated with the user.\nOnly visible if you are the store owner."},"first_name":{"type":["null","string"],"description":"The first name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"last_name":{"type":["null","string"],"description":"The last name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"nickname":{"type":["null","string"],"description":"The nickname of the user."}},"additionalProperties":false,"description":"Represents identity and profile information for a store member."},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/members":{"get":{"tags":["store"],"summary":"List store members","description":"Retrieves all members who have access to the specified store.","operationId":"Store_GetStoreMembers","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoreMemberDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get store member permissions

> Retrieves the resolved permissions map for a specific member of a store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"store"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/members/{memberId}/permissions":{"get":{"tags":["store"],"summary":"Get store member permissions","description":"Retrieves the resolved permissions map for a specific member of a store.","operationId":"Store_GetStoreMemberPermissions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"memberId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Remove a store member

> Removes the specified member from the store, revoking their access.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"store"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/members/{memberId}":{"delete":{"tags":["store"],"summary":"Remove a store member","description":"Removes the specified member from the store, revoking their access.","operationId":"Store_KickStoreMember","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"memberId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update a store member

> Updates the role assigned to a specific member of the store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"store"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateStoreMemberDto":{"required":["role_id"],"type":"object","properties":{"role_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/members/{memberId}":{"patch":{"tags":["store"],"summary":"Update a store member","description":"Updates the role assigned to a specific member of the store.","operationId":"Store_UpdateStoreMember","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"memberId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreMemberDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreMemberDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateStoreMemberDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Subscriptions

## Get subscriptions

> Retrieves all subscriptions for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionStatusDto":{"enum":["invalid","created","active","canceled"],"type":"string","description":"Represents the current state of a subscription."},"SubscriptionDto":{"required":["cancel_at_period_end","coupon_ids","created_at","currency","customer","discount_amount","discount_amount_str","gift","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","interval_scale","interval_value","lines","next_billing_amount","next_billing_presentment_amount","past_due","pretty_id","price","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","tax_jurisdictions","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the subscription."},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"payment_method_id":{"$ref":"#/components/schemas/FlakeId"},"payment_method":{"$ref":"#/components/schemas/PaymentMethodDto"},"pending_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"status":{"$ref":"#/components/schemas/SubscriptionStatusDto"},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"coupon_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Identifiers of coupons applied to this subscription."},"coupon_repeating_ends_at":{"type":["null","string"],"description":"Date when a repeating coupon ends for this subscription.","format":"date-time","deprecated":true},"affiliate_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"billing_name":{"type":["null","string"],"description":"Name used for billing purposes."},"billing_email":{"type":["null","string"],"description":"Email used for billing purposes."},"billing_country":{"type":["null","string"],"description":"Country code used for billing purposes."},"billing_tax_id":{"type":["null","string"],"description":"The tax identification number used for this order (for B2B transactions)"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"List of tax jurisdictions applicable to this subscription."},"customer_ip":{"type":["null","string"],"description":"IP address of the customer at the time of subscription."},"gift":{"type":"boolean","description":"Indicates whether this subscription is a gift.","readOnly":true,"deprecated":true},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/CustomerDto"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":["null","string"],"description":"Name of the product associated with this subscription.","readOnly":true,"deprecated":true},"product_image_url":{"type":["null","string"],"description":"URL for the product image.","readOnly":true,"deprecated":true},"interval_value":{"type":"integer","description":"Numeric value of the billing interval.","format":"int32"},"interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"currency":{"type":"string","description":"Currency code used for billing this subscription."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself.","readOnly":true,"deprecated":true},"price":{"type":"integer","description":"Base price of the subscription in smallest currency units (e.g., cents).","format":"int64","readOnly":true,"deprecated":true},"price_str":{"type":["null","string"],"description":"Formatted string representation of the price.","readOnly":true,"deprecated":true},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true},"fx_rate":{"type":["null","string"],"description":"The foreign exchange rate applied (if presentment currency differs from settlement currency)."},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription.","readOnly":true,"deprecated":true},"current_period_start":{"type":["null","string"],"description":"Start date of the current billing period.","format":"date-time"},"current_period_end":{"type":["null","string"],"description":"End date of the current billing period.","format":"date-time"},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the current billing cycle.","format":"int32"},"next_attempt_at":{"type":["null","string"],"description":"Date and time when the next payment attempt will occur.","format":"date-time"},"attempt_count":{"type":["null","integer"],"description":"Number of payment attempts made for the current billing cycle.","format":"int32"},"created_at":{"type":"string","description":"Date and time when the subscription was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"Date and time when the subscription was last updated.","format":"date-time"},"active_at":{"type":["null","string"],"description":"Date and time when the subscription became active.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the subscription was canceled.","format":"date-time"},"cancel_reason":{"type":["null","string"],"description":"Reason provided for cancellation."},"cancellation_requested_at":{"type":["null","string"],"description":"Date and time when a subscription cancellation (cancel_at_period_end) was requested.","format":"date-time"},"cancel_at_period_end":{"type":"boolean","description":"Whether the subscription will be canceled at the end of the billing period.","readOnly":true},"past_due":{"type":"boolean","description":"Whether the subscription is past due, and is in a dunning (retrying) state."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionLineDto"},"description":"Line items associated with this subscription."}},"additionalProperties":false,"description":"Data transfer object representing a store subscription."},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"PaymentMethodDto":{"required":["created_at","customer_id","gateway","gateway_customer_id","gateway_entity_identifier","gateway_id","gateway_type","id","method_details","method_type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_id":{"type":"string","description":"The gateway's identifier for this payment method"},"gateway_customer_id":{"type":"string","description":"The gateway's customer identifier"},"gateway_type":{"type":"string","description":"The gateway-specific type identifier"},"method_type":{"type":"string","description":"The payment method type"},"method_details":{"$ref":"#/components/schemas/PaymentMethodDetailsDto"},"created_at":{"type":"string","description":"The date and time when this payment method was created","format":"date-time"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"updated_at":{"type":["null","string"],"description":"The date and time when this payment method was last updated","format":"date-time"}},"additionalProperties":false,"description":"Represents a stored payment method"},"PaymentMethodDetailsDto":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/CardDetailsDto"},"cashapp":{"$ref":"#/components/schemas/CashAppDetailsDto"},"paypal":{"$ref":"#/components/schemas/PayPalDetailsDto"},"link":{"$ref":"#/components/schemas/LinkDetailsDto"},"crypto":{"$ref":"#/components/schemas/CryptoDetailsDto"},"steamskins":{"$ref":"#/components/schemas/SteamSkinsDetailsDto"},"ideal":{"$ref":"#/components/schemas/IdealDetailsDto"},"p24":{"$ref":"#/components/schemas/P24DetailsDto"},"bancontact":{"$ref":"#/components/schemas/BancontactDetailsDto"},"klarna":{"$ref":"#/components/schemas/KlarnaDetailsDto"},"alipay":{"$ref":"#/components/schemas/AlipayDetailsDto"},"pay_by_bank":{"$ref":"#/components/schemas/PayByBankDetailsDto"},"pix":{"$ref":"#/components/schemas/PixDetailsDto"},"paysafecard":{"$ref":"#/components/schemas/PaysafeCardDetailsDto"}},"additionalProperties":false,"description":"Contains detailed information about a payment method.\nDISCLAIMER: These fields are not guaranteed to be backwards compatible and may change or be removed without notice."},"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"},"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"},"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"},"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"},"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"},"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false},"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"},"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"},"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"},"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"},"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"},"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"},"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"},"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"SubscriptionBillingAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Represents a billing amount breakdown for a subscription."},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"SubscriptionLineDto":{"required":["currency","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","price","product_id","product_name","product_version_id","store_id","subscription_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"initial_order_line_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription line."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this subscription line."},"product_image_url":{"type":["null","string"],"description":"URL for the product image."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself."},"currency":{"type":"string","description":"Currency code for this subscription line."},"price":{"type":"integer","description":"Base price of the subscription line in smallest currency units (e.g., cents).","format":"int64"},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true}},"additionalProperties":false,"description":"Represents a line item within a subscription."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/subscriptions":{"get":{"tags":["subscriptions"],"summary":"Get subscriptions","description":"Retrieves all subscriptions for the specified store.","operationId":"Subscriptions_GetSubscriptions","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve subscriptions for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customer_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"subscription_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"billing_email","in":"query","schema":{"type":"string"}},{"name":"payment_method_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"checkout_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"trial_id","in":"query","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"status","in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionStatusDto"}}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get subscription by ID

> Retrieves a subscription for the specified store by the supplied ID.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionDto":{"required":["cancel_at_period_end","coupon_ids","created_at","currency","customer","discount_amount","discount_amount_str","gift","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","interval_scale","interval_value","lines","next_billing_amount","next_billing_presentment_amount","past_due","pretty_id","price","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","tax_jurisdictions","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the subscription."},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"payment_method_id":{"$ref":"#/components/schemas/FlakeId"},"payment_method":{"$ref":"#/components/schemas/PaymentMethodDto"},"pending_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"status":{"$ref":"#/components/schemas/SubscriptionStatusDto"},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"coupon_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Identifiers of coupons applied to this subscription."},"coupon_repeating_ends_at":{"type":["null","string"],"description":"Date when a repeating coupon ends for this subscription.","format":"date-time","deprecated":true},"affiliate_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"billing_name":{"type":["null","string"],"description":"Name used for billing purposes."},"billing_email":{"type":["null","string"],"description":"Email used for billing purposes."},"billing_country":{"type":["null","string"],"description":"Country code used for billing purposes."},"billing_tax_id":{"type":["null","string"],"description":"The tax identification number used for this order (for B2B transactions)"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"List of tax jurisdictions applicable to this subscription."},"customer_ip":{"type":["null","string"],"description":"IP address of the customer at the time of subscription."},"gift":{"type":"boolean","description":"Indicates whether this subscription is a gift.","readOnly":true,"deprecated":true},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/CustomerDto"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":["null","string"],"description":"Name of the product associated with this subscription.","readOnly":true,"deprecated":true},"product_image_url":{"type":["null","string"],"description":"URL for the product image.","readOnly":true,"deprecated":true},"interval_value":{"type":"integer","description":"Numeric value of the billing interval.","format":"int32"},"interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"currency":{"type":"string","description":"Currency code used for billing this subscription."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself.","readOnly":true,"deprecated":true},"price":{"type":"integer","description":"Base price of the subscription in smallest currency units (e.g., cents).","format":"int64","readOnly":true,"deprecated":true},"price_str":{"type":["null","string"],"description":"Formatted string representation of the price.","readOnly":true,"deprecated":true},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true},"fx_rate":{"type":["null","string"],"description":"The foreign exchange rate applied (if presentment currency differs from settlement currency)."},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription.","readOnly":true,"deprecated":true},"current_period_start":{"type":["null","string"],"description":"Start date of the current billing period.","format":"date-time"},"current_period_end":{"type":["null","string"],"description":"End date of the current billing period.","format":"date-time"},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the current billing cycle.","format":"int32"},"next_attempt_at":{"type":["null","string"],"description":"Date and time when the next payment attempt will occur.","format":"date-time"},"attempt_count":{"type":["null","integer"],"description":"Number of payment attempts made for the current billing cycle.","format":"int32"},"created_at":{"type":"string","description":"Date and time when the subscription was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"Date and time when the subscription was last updated.","format":"date-time"},"active_at":{"type":["null","string"],"description":"Date and time when the subscription became active.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the subscription was canceled.","format":"date-time"},"cancel_reason":{"type":["null","string"],"description":"Reason provided for cancellation."},"cancellation_requested_at":{"type":["null","string"],"description":"Date and time when a subscription cancellation (cancel_at_period_end) was requested.","format":"date-time"},"cancel_at_period_end":{"type":"boolean","description":"Whether the subscription will be canceled at the end of the billing period.","readOnly":true},"past_due":{"type":"boolean","description":"Whether the subscription is past due, and is in a dunning (retrying) state."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionLineDto"},"description":"Line items associated with this subscription."}},"additionalProperties":false,"description":"Data transfer object representing a store subscription."},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"PaymentMethodDto":{"required":["created_at","customer_id","gateway","gateway_customer_id","gateway_entity_identifier","gateway_id","gateway_type","id","method_details","method_type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_id":{"type":"string","description":"The gateway's identifier for this payment method"},"gateway_customer_id":{"type":"string","description":"The gateway's customer identifier"},"gateway_type":{"type":"string","description":"The gateway-specific type identifier"},"method_type":{"type":"string","description":"The payment method type"},"method_details":{"$ref":"#/components/schemas/PaymentMethodDetailsDto"},"created_at":{"type":"string","description":"The date and time when this payment method was created","format":"date-time"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"updated_at":{"type":["null","string"],"description":"The date and time when this payment method was last updated","format":"date-time"}},"additionalProperties":false,"description":"Represents a stored payment method"},"PaymentMethodDetailsDto":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/CardDetailsDto"},"cashapp":{"$ref":"#/components/schemas/CashAppDetailsDto"},"paypal":{"$ref":"#/components/schemas/PayPalDetailsDto"},"link":{"$ref":"#/components/schemas/LinkDetailsDto"},"crypto":{"$ref":"#/components/schemas/CryptoDetailsDto"},"steamskins":{"$ref":"#/components/schemas/SteamSkinsDetailsDto"},"ideal":{"$ref":"#/components/schemas/IdealDetailsDto"},"p24":{"$ref":"#/components/schemas/P24DetailsDto"},"bancontact":{"$ref":"#/components/schemas/BancontactDetailsDto"},"klarna":{"$ref":"#/components/schemas/KlarnaDetailsDto"},"alipay":{"$ref":"#/components/schemas/AlipayDetailsDto"},"pay_by_bank":{"$ref":"#/components/schemas/PayByBankDetailsDto"},"pix":{"$ref":"#/components/schemas/PixDetailsDto"},"paysafecard":{"$ref":"#/components/schemas/PaysafeCardDetailsDto"}},"additionalProperties":false,"description":"Contains detailed information about a payment method.\nDISCLAIMER: These fields are not guaranteed to be backwards compatible and may change or be removed without notice."},"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"},"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"},"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"},"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"},"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"},"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false},"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"},"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"},"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"},"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"},"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"},"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"},"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"},"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"SubscriptionBillingAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Represents a billing amount breakdown for a subscription."},"SubscriptionStatusDto":{"enum":["invalid","created","active","canceled"],"type":"string","description":"Represents the current state of a subscription."},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"SubscriptionLineDto":{"required":["currency","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","price","product_id","product_name","product_version_id","store_id","subscription_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"initial_order_line_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription line."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this subscription line."},"product_image_url":{"type":["null","string"],"description":"URL for the product image."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself."},"currency":{"type":"string","description":"Currency code for this subscription line."},"price":{"type":"integer","description":"Base price of the subscription line in smallest currency units (e.g., cents).","format":"int64"},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true}},"additionalProperties":false,"description":"Represents a line item within a subscription."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/subscriptions/{subscriptionId}":{"get":{"tags":["subscriptions"],"summary":"Get subscription by ID","description":"Retrieves a subscription for the specified store by the supplied ID.","operationId":"Subscriptions_GetSubscriptionById","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve the subscription for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"subscriptionId","in":"path","description":"The ID of the subscription.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Cancel subscription by ID

> Cancels a subscription for the specified store by the supplied ID.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CancelSubscriptionRequestDto":{"type":"object","properties":{"cancel_at_period_end":{"type":["null","boolean"],"description":"Should the subscription be cancelled immediately (false) or on the next billing period (true)?"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/subscriptions/{subscriptionId}/cancel":{"post":{"tags":["subscriptions"],"summary":"Cancel subscription by ID","description":"Cancels a subscription for the specified store by the supplied ID.","operationId":"Subscriptions_CancelSubscription","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to cancel the subscription for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"subscriptionId","in":"path","description":"The ID of the subscription.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"description":"Cancellation details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionRequestDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Stop pending subscription cancellation

> Stops a pending subscription cancellation for the specified store by the supplied ID.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/subscriptions/{subscriptionId}/stop-pending-cancellation":{"post":{"tags":["subscriptions"],"summary":"Stop pending subscription cancellation","description":"Stops a pending subscription cancellation for the specified store by the supplied ID.","operationId":"Subscriptions_StopPendingSubscriptionCancellation","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to uncancel the subscription for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"subscriptionId","in":"path","description":"The ID of the subscription.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update items on a subscription

> Updates the subscription lines, including the pricing, on an active subscription. The subscription must not be within 1 hour of its\
> next renewal, and only one change can be pending at a time.\
> &#x20;           \
> \*\*Access\*\*\
> &#x20;           \
> This endpoint requires the Subscription Updates API feature flag to be enabled on your store. Contact\
> PayNow to request access.\
> &#x20;           \
> \*\*Proration behavior\*\*\
> &#x20;           \
> Controlled by the \`proration\_behavior\` field on the request:\
> &#x20;           \
> \- \`immediate\` - the change is applied as soon as possible.\
> &#x20; Proration is calculated for the remaining period. If the prorated amount is ≥ $0.50 (or equivalent in other currencies), an order is\
> &#x20; initiated against the subscription's payment method; the change is applied once the payment succeeds.\
> &#x20; If the prorated amount is below $0.50, no order is created and the change is\
> &#x20; applied instantly.\
> &#x20; Only one proration order is allowed per billing cycle - a second immediate change in the same\
> &#x20; period will be rejected if a proration was already charged.\
> &#x20; When a payment is triggered, the response will include a \`pending\_payment\` object. The payment result\
> &#x20; is synchronous - check \`pending\_payment.declined\` to determine whether the charge succeeded. If\
> &#x20; declined, \`pending\_payment.decline\_code\` contains the reason.\
> &#x20;           \
> \- \`next\_billing\_period\` - no payment is created. The change is queued and will be applied automatically\
> &#x20; at the start of the next renewal cycle. Ideal for downgrades.\
> &#x20;           \
> \- \`none\` - the change is applied instantly with no proration calculated or charged.\
> &#x20;           \
> \*\*Reverting a pending change\*\*\
> &#x20;           \
> If a \`next\_billing\_period\` change is pending and the new request specifies the same product versions\
> that are already on the subscription (i.e. reverting back to the current state), the pending change\
> is canceled rather than rejected. The canceled change record is returned in the response.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateSubscriptionRequestDto":{"required":["lines","proration_behavior"],"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UpdateSubscriptionLineRequestDto"},"description":"The line items describing the desired state of the subscription after the change."},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"}},"additionalProperties":false},"UpdateSubscriptionLineRequestDto":{"required":["custom_variables"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variable values keyed by variable name."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"UpdateSubscriptionResponseDto":{"required":["subscription_change"],"type":"object","properties":{"subscription_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"pending_payment":{"$ref":"#/components/schemas/CheckoutPaymentInfoDto"}},"additionalProperties":false,"description":"Response returned after a subscription change is initiated."},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"CheckoutPaymentInfoDto":{"required":["declined","status"],"type":"object","properties":{"status":{"type":"string","description":"Status string from the payment provider."},"declined":{"type":"boolean","description":"Indicates whether the payment was declined."},"decline_message":{"type":["null","string"],"description":"The customer readable decline reason, if the payment was declined."},"checkout_url":{"type":["null","string"],"description":"Checkout URL to redirect to for on-session payments."}},"additionalProperties":false,"description":"Payment outcome information returned after a subscription change triggers an immediate charge."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/subscriptions/{subscriptionId}/change":{"post":{"tags":["subscriptions"],"summary":"Update items on a subscription","description":"Updates the subscription lines, including the pricing, on an active subscription. The subscription must not be within 1 hour of its\nnext renewal, and only one change can be pending at a time.\n            \n**Access**\n            \nThis endpoint requires the Subscription Updates API feature flag to be enabled on your store. Contact\nPayNow to request access.\n            \n**Proration behavior**\n            \nControlled by the `proration_behavior` field on the request:\n            \n- `immediate` - the change is applied as soon as possible.\n  Proration is calculated for the remaining period. If the prorated amount is ≥ $0.50 (or equivalent in other currencies), an order is\n  initiated against the subscription's payment method; the change is applied once the payment succeeds.\n  If the prorated amount is below $0.50, no order is created and the change is\n  applied instantly.\n  Only one proration order is allowed per billing cycle - a second immediate change in the same\n  period will be rejected if a proration was already charged.\n  When a payment is triggered, the response will include a `pending_payment` object. The payment result\n  is synchronous - check `pending_payment.declined` to determine whether the charge succeeded. If\n  declined, `pending_payment.decline_code` contains the reason.\n            \n- `next_billing_period` - no payment is created. The change is queued and will be applied automatically\n  at the start of the next renewal cycle. Ideal for downgrades.\n            \n- `none` - the change is applied instantly with no proration calculated or charged.\n            \n**Reverting a pending change**\n            \nIf a `next_billing_period` change is pending and the new request specifies the same product versions\nthat are already on the subscription (i.e. reverting back to the current state), the pending change\nis canceled rather than rejected. The canceled change record is returned in the response.","operationId":"Subscriptions_UpdateSubscription","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"subscriptionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Preview a subscription change

> Simulates a subscription change and returns the pricing breakdown without creating any records or\
> initiating a payment. Accepts the same request body as \`POST change\` — see that endpoint for\
> full parameter documentation. Does not return the \`pending\_payment\` field.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"subscriptions"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateSubscriptionRequestDto":{"required":["lines","proration_behavior"],"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UpdateSubscriptionLineRequestDto"},"description":"The line items describing the desired state of the subscription after the change."},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"}},"additionalProperties":false},"UpdateSubscriptionLineRequestDto":{"required":["custom_variables"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variable values keyed by variable name."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"UpdateSubscriptionResponseDto":{"required":["subscription_change"],"type":"object","properties":{"subscription_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"pending_payment":{"$ref":"#/components/schemas/CheckoutPaymentInfoDto"}},"additionalProperties":false,"description":"Response returned after a subscription change is initiated."},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"CheckoutPaymentInfoDto":{"required":["declined","status"],"type":"object","properties":{"status":{"type":"string","description":"Status string from the payment provider."},"declined":{"type":"boolean","description":"Indicates whether the payment was declined."},"decline_message":{"type":["null","string"],"description":"The customer readable decline reason, if the payment was declined."},"checkout_url":{"type":["null","string"],"description":"Checkout URL to redirect to for on-session payments."}},"additionalProperties":false,"description":"Payment outcome information returned after a subscription change triggers an immediate charge."},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/subscriptions/{subscriptionId}/change/preview":{"post":{"tags":["subscriptions"],"summary":"Preview a subscription change","description":"Simulates a subscription change and returns the pricing breakdown without creating any records or\ninitiating a payment. Accepts the same request body as `POST change` — see that endpoint for\nfull parameter documentation. Does not return the `pending_payment` field.","operationId":"Subscriptions_PreviewSubscriptionChange","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"subscriptionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Tags

## GET /v1/stores/{storeId}/tags

> Get all tags for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tags"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"TagDto":{"required":["created_at","created_by","enabled","id","name","slug","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","description":"When the tag was created","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"name":{"type":"string","description":"The unique name for the tag."},"slug":{"type":"string","description":"The unique slug for the tag."},"description":{"type":["null","string"],"description":"The description of the tag."},"image_url":{"type":["null","string"],"description":"The Image URL associated with the tag."},"enabled":{"type":"boolean","description":"Indicates whether this tag is enabled."},"updated_at":{"type":["null","string"],"description":"When the tag was last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tags":{"get":{"tags":["tags"],"summary":"Get all tags for a store","operationId":"Tags_GetTags","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/tags

> Create a new tag

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tags"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertTagRequestDto":{"type":"object","properties":{"name":{"type":["null","string"]},"slug":{"type":["null","string"]},"description":{"type":["null","string"]},"enabled":{"type":["null","boolean"]}},"additionalProperties":false},"TagDto":{"required":["created_at","created_by","enabled","id","name","slug","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","description":"When the tag was created","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"name":{"type":"string","description":"The unique name for the tag."},"slug":{"type":"string","description":"The unique slug for the tag."},"description":{"type":["null","string"],"description":"The description of the tag."},"image_url":{"type":["null","string"],"description":"The Image URL associated with the tag."},"enabled":{"type":"boolean","description":"Indicates whether this tag is enabled."},"updated_at":{"type":["null","string"],"description":"When the tag was last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tags":{"post":{"tags":["tags"],"summary":"Create a new tag","operationId":"Tags_CreateTag","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertTagRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertTagRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertTagRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/tags/{tagId}

> Get a tag by an ID

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tags"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"TagDto":{"required":["created_at","created_by","enabled","id","name","slug","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","description":"When the tag was created","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"name":{"type":"string","description":"The unique name for the tag."},"slug":{"type":"string","description":"The unique slug for the tag."},"description":{"type":["null","string"],"description":"The description of the tag."},"image_url":{"type":["null","string"],"description":"The Image URL associated with the tag."},"enabled":{"type":"boolean","description":"Indicates whether this tag is enabled."},"updated_at":{"type":["null","string"],"description":"When the tag was last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tags/{tagId}":{"get":{"tags":["tags"],"summary":"Get a tag by an ID","operationId":"Tags_GetTag","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tagId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/tags/{tagId}

> Delete a tag by ID

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tags"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tags/{tagId}":{"delete":{"tags":["tags"],"summary":"Delete a tag by ID","operationId":"Tags_DeleteTag","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tagId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/tags/{tagId}

> Update a tag by ID

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tags"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertTagRequestDto":{"type":"object","properties":{"name":{"type":["null","string"]},"slug":{"type":["null","string"]},"description":{"type":["null","string"]},"enabled":{"type":["null","boolean"]}},"additionalProperties":false},"TagDto":{"required":["created_at","created_by","enabled","id","name","slug","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","description":"When the tag was created","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"name":{"type":"string","description":"The unique name for the tag."},"slug":{"type":"string","description":"The unique slug for the tag."},"description":{"type":["null","string"],"description":"The description of the tag."},"image_url":{"type":["null","string"],"description":"The Image URL associated with the tag."},"enabled":{"type":"boolean","description":"Indicates whether this tag is enabled."},"updated_at":{"type":["null","string"],"description":"When the tag was last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tags/{tagId}":{"patch":{"tags":["tags"],"summary":"Update a tag by ID","operationId":"Tags_UpdateTag","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tagId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertTagRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertTagRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertTagRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get upload URL for tag image

> Gets a pre-signed upload URL for uploading an image to a tag

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tags"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GetTagImageUploadUrlResponseDto":{"required":["id","upload_url"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the direct image upload URL."},"upload_url":{"type":"string","description":"The URL to upload the image to."}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tags/{tagId}/image-upload-url":{"get":{"tags":["tags"],"summary":"Get upload URL for tag image","description":"Gets a pre-signed upload URL for uploading an image to a tag","operationId":"Tags_GetTagImageUploadUrl","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tagId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTagImageUploadUrlResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Finish tag image upload

> Finishes an image upload for a tag

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tags"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"FinishTagImageUploadUrlRequestDto":{"required":["image_id"],"type":"object","properties":{"image_id":{"type":"string","description":"The ID of the uploaded image returned by the server."}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tags/{tagId}/image-upload-finish":{"post":{"tags":["tags"],"summary":"Finish tag image upload","description":"Finishes an image upload for a tag","operationId":"Tags_FinishTagImageUpload","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tagId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinishTagImageUploadUrlRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/FinishTagImageUploadUrlRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/FinishTagImageUploadUrlRequestDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Delete tag image

> Deletes an image for a tag

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tags"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tags/{tagId}/image":{"delete":{"tags":["tags"],"summary":"Delete tag image","description":"Deletes an image for a tag","operationId":"Tags_DeleteTagImage","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tagId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Tier Groups

## GET /v1/stores/{storeId}/tier-groups

> List all tier groups for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tier-groups"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"TierGroupDto":{"required":["created_at","created_by","id","name","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the tier group."},"created_at":{"type":"string","description":"When the tier group was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When was the tier group last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tier-groups":{"get":{"tags":["tier-groups"],"summary":"List all tier groups for a store","operationId":"TierGroups_ListTierGroups","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TierGroupDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/tier-groups

> Create a new tier group

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tier-groups"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateTierGroupRequestDto":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tier group."}},"additionalProperties":false},"TierGroupDto":{"required":["created_at","created_by","id","name","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the tier group."},"created_at":{"type":"string","description":"When the tier group was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When was the tier group last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tier-groups":{"post":{"tags":["tier-groups"],"summary":"Create a new tier group","operationId":"TierGroups_CreateTierGroup","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTierGroupRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateTierGroupRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateTierGroupRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierGroupDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/tier-groups/{tierGroupId}

> Get a tier group by ID

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tier-groups"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"TierGroupDto":{"required":["created_at","created_by","id","name","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the tier group."},"created_at":{"type":"string","description":"When the tier group was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When was the tier group last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tier-groups/{tierGroupId}":{"get":{"tags":["tier-groups"],"summary":"Get a tier group by ID","operationId":"TierGroups_GetTierGroup","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tierGroupId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierGroupDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/tier-groups/{tierGroupId}

> Delete a tier group by ID

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tier-groups"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tier-groups/{tierGroupId}":{"delete":{"tags":["tier-groups"],"summary":"Delete a tier group by ID","operationId":"TierGroups_DeleteTierGroup","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tierGroupId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/tier-groups/{tierGroupId}

> Update a tier group by ID

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"tier-groups"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateTierGroupRequestDto":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tier group."}},"additionalProperties":false},"TierGroupDto":{"required":["created_at","created_by","id","name","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the tier group."},"created_at":{"type":"string","description":"When the tier group was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When was the tier group last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/tier-groups/{tierGroupId}":{"patch":{"tags":["tier-groups"],"summary":"Update a tier group by ID","operationId":"TierGroups_UpdateTierGroup","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"tierGroupId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTierGroupRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateTierGroupRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateTierGroupRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierGroupDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Trials

## GET /v1/stores/{storeId}/trials

> Get trials for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"trials"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"TrialStatusDto":{"enum":["created","active","canceled","completed"],"type":"string"},"TrialDto":{"required":["created_at","customer","customer_id","id","period_scale","period_value","pretty_id","product_id","product_name","product_version_id","status","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The human-readable formatted version of the trial identifier.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product being trialed."},"product_image_url":{"type":["null","string"],"description":"The URL of the product image, if available."},"period_value":{"type":"integer","description":"The duration value of the trial period.","format":"int32"},"period_scale":{"type":"string","description":"The timescale unit for the trial period (e.g., \"days\", \"weeks\", \"months\")."},"starts_at":{"type":["null","string"],"description":"The date and time when the trial period starts, if applicable.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the trial period ends, if applicable.","format":"date-time"},"status":{"$ref":"#/components/schemas/TrialStatusDto"},"created_at":{"type":"string","description":"The date and time when the trial was created.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"The date and time when the trial was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/trials":{"get":{"tags":["trials"],"summary":"Get trials for a store","operationId":"Trials_GetTrials","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"status","in":"query","description":"Filters trials by their status. Multiple statuses can be specified.","schema":{"type":"array","items":{"$ref":"#/components/schemas/TrialStatusDto"}}},{"name":"customer_id","in":"query","description":"Filters trials by the customer identifier.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"subscription_id","in":"query","description":"Filters trials by the associated subscription identifier.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"checkout_id","in":"query","description":"Filters trials by the checkout session identifier that initiated them.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"trial_id","in":"query","description":"Filters to a specific trial by its identifier.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrialDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/trials/{trialId}

> Get a trial by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"trials"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"TrialDto":{"required":["created_at","customer","customer_id","id","period_scale","period_value","pretty_id","product_id","product_name","product_version_id","status","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The human-readable formatted version of the trial identifier.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product being trialed."},"product_image_url":{"type":["null","string"],"description":"The URL of the product image, if available."},"period_value":{"type":"integer","description":"The duration value of the trial period.","format":"int32"},"period_scale":{"type":"string","description":"The timescale unit for the trial period (e.g., \"days\", \"weeks\", \"months\")."},"starts_at":{"type":["null","string"],"description":"The date and time when the trial period starts, if applicable.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the trial period ends, if applicable.","format":"date-time"},"status":{"$ref":"#/components/schemas/TrialStatusDto"},"created_at":{"type":"string","description":"The date and time when the trial was created.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"The date and time when the trial was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"TrialStatusDto":{"enum":["created","active","canceled","completed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/trials/{trialId}":{"get":{"tags":["trials"],"summary":"Get a trial by ID for a store","operationId":"Trials_GetTrial","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"trialId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get trial eligibility overrides for a specific customer

> Retrieves all trial eligibility overrides for the specified customer.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"trials"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"TrialEligibilityOverrideDto":{"required":["created_at","created_by","customer_id","expires_at","id","pretty_id","product_id","product_name","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The human-readable formatted version of the override identifier.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product associated with this override."},"product_image_url":{"type":["null","string"],"description":"The URL of the product image, if available."},"created_at":{"type":"string","description":"The date and time when this override was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":"string","description":"The date and time when this override expires and is no longer valid.","format":"date-time"},"used_at":{"type":["null","string"],"description":"The date and time when this override was used to start a trial, if applicable.","format":"date-time"},"used_on_trial_id":{"$ref":"#/components/schemas/FlakeId"},"note":{"type":["null","string"],"description":"An optional note or comment about this override."},"deleted_at":{"type":["null","string"],"description":"The date and time when this override was deleted, if applicable.","format":"date-time"},"deleted_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/trials/eligibility/overrides":{"get":{"tags":["trials"],"summary":"Get trial eligibility overrides for a specific customer","description":"Retrieves all trial eligibility overrides for the specified customer.","operationId":"CustomersTrialEligibility_GetEligibilityOverridesForCustomer","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve trial eligibility overrides for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","description":"The ID of the customer to retrieve trial eligibility overrides for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrialEligibilityOverrideDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Create trial eligibility override for a customer

> Creates a new trial eligibility override for the specified customer.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"trials"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateTrialEligibilityOverrideDto":{"required":["product_id","expires_at"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"expires_at":{"type":"string","format":"date-time"},"note":{"type":"string"}}},"TrialEligibilityOverrideDto":{"required":["created_at","created_by","customer_id","expires_at","id","pretty_id","product_id","product_name","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The human-readable formatted version of the override identifier.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product associated with this override."},"product_image_url":{"type":["null","string"],"description":"The URL of the product image, if available."},"created_at":{"type":"string","description":"The date and time when this override was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":"string","description":"The date and time when this override expires and is no longer valid.","format":"date-time"},"used_at":{"type":["null","string"],"description":"The date and time when this override was used to start a trial, if applicable.","format":"date-time"},"used_on_trial_id":{"$ref":"#/components/schemas/FlakeId"},"note":{"type":["null","string"],"description":"An optional note or comment about this override."},"deleted_at":{"type":["null","string"],"description":"The date and time when this override was deleted, if applicable.","format":"date-time"},"deleted_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/trials/eligibility/overrides":{"post":{"tags":["trials"],"summary":"Create trial eligibility override for a customer","description":"Creates a new trial eligibility override for the specified customer.","operationId":"CustomersTrialEligibility_CreateEligibilityOverrideForCustomer","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to create the trial eligibility override for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","description":"The ID of the customer to create the trial eligibility override for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"description":"The trial eligibility override data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrialEligibilityOverrideDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateTrialEligibilityOverrideDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateTrialEligibilityOverrideDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialEligibilityOverrideDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Delete trial eligibility override for a customer

> Deletes an existing trial eligibility override.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"trials"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/customers/{customerId}/trials/eligibility/overrides/{trialEligibilityOverrideId}":{"delete":{"tags":["trials"],"summary":"Delete trial eligibility override for a customer","description":"Deletes an existing trial eligibility override.","operationId":"CustomersTrialEligibility_DeleteEligibilityOverrideForCustomer","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to delete the trial eligibility override for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"trialEligibilityOverrideId","in":"path","description":"The ID of the trial eligibility override to delete.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Upsell Settings

## Get store upselling settings

> Retrieves upselling settings for the store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"upsell-settings"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreUpsellSettingsDto":{"required":["automatic_recommendations_discount_amount","automatic_recommendations_discount_type","automatic_recommendations_enabled","checkout_style","enabled","recommendation_overrides","recommendation_overrides_enabled","updated_at","updated_by"],"type":"object","properties":{"enabled":{"type":"boolean"},"automatic_recommendations_enabled":{"type":"boolean"},"automatic_recommendations_discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"automatic_recommendations_discount_amount":{"type":"integer","format":"int64"},"recommendation_overrides_enabled":{"type":"boolean"},"recommendation_overrides":{"type":"array","items":{"$ref":"#/components/schemas/StoreUpsellRecommendationDto"}},"checkout_style":{"$ref":"#/components/schemas/StoreUpsellCheckoutStyleDto"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"StoreUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"StoreUpsellCheckoutStyleDto":{"enum":["unknown","inline","inline_and_prepayment_dialog","dedicated_step"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/upsell-settings":{"get":{"tags":["upsell-settings"],"summary":"Get store upselling settings","description":"Retrieves upselling settings for the store.","operationId":"UpsellSettings_GetStoreUpsellSettings","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreUpsellSettingsDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Updates store upselling settings

> Updates upselling settings for a store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"upsell-settings"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateStoreUpsellSettingsDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"automatic_recommendations_enabled":{"type":"boolean"},"automatic_recommendations_discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"automatic_recommendations_discount_amount":{"type":"integer","format":"int64"},"recommendation_overrides_enabled":{"type":"boolean"},"recommendation_overrides":{"type":"array","items":{"$ref":"#/components/schemas/StoreUpsellRecommendationDto"}},"checkout_style":{"$ref":"#/components/schemas/StoreUpsellCheckoutStyleDto"}}},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"StoreUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"StoreUpsellCheckoutStyleDto":{"enum":["unknown","inline","inline_and_prepayment_dialog","dedicated_step"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/upsell-settings":{"patch":{"tags":["upsell-settings"],"summary":"Updates store upselling settings","description":"Updates upselling settings for a store.","operationId":"UpsellSettings_UpdateStoreUpsellSettings","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreUpsellSettingsDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreUpsellSettingsDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateStoreUpsellSettingsDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Webhooks

## GET /v1/stores/{storeId}/webhooks

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"webhooks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"WebhookSubscriptionDto":{"required":["id","secret","subscribed_to","type","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"url":{"type":"string"},"secret":{"type":"string"},"subscribed_to":{"$ref":"#/components/schemas/WebhookEventType"},"type":{"$ref":"#/components/schemas/WebhookType"},"discord_description_template":{"type":["null","string"]},"discord_title":{"type":["null","string"]},"discord_color":{"type":["null","string"]},"discord_format":{"$ref":"#/components/schemas/WebhookDiscordFormatDto"}},"additionalProperties":false},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"WebhookType":{"enum":["json_v1","discord_v1"],"type":"string"},"WebhookDiscordFormatDto":{"enum":["Invalid","Embed","Text"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/webhooks":{"get":{"tags":["webhooks"],"operationId":"Webhooks_GetSubscriptions","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscriptionDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/webhooks

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"webhooks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateWebhookDto":{"required":["subscribed_to","type","url"],"type":"object","properties":{"url":{"type":"string"},"subscribed_to":{"$ref":"#/components/schemas/WebhookEventType"},"type":{"$ref":"#/components/schemas/WebhookType"},"discord_description_template":{"type":["null","string"]},"discord_title":{"type":["null","string"]},"discord_color":{"type":["null","string"]},"discord_format":{"$ref":"#/components/schemas/WebhookDiscordFormatDto"}},"additionalProperties":false},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"WebhookType":{"enum":["json_v1","discord_v1"],"type":"string"},"WebhookDiscordFormatDto":{"enum":["Invalid","Embed","Text"],"type":"string"},"WebhookSubscriptionDto":{"required":["id","secret","subscribed_to","type","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"url":{"type":"string"},"secret":{"type":"string"},"subscribed_to":{"$ref":"#/components/schemas/WebhookEventType"},"type":{"$ref":"#/components/schemas/WebhookType"},"discord_description_template":{"type":["null","string"]},"discord_title":{"type":["null","string"]},"discord_color":{"type":["null","string"]},"discord_format":{"$ref":"#/components/schemas/WebhookDiscordFormatDto"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/webhooks":{"post":{"tags":["webhooks"],"operationId":"Webhooks_CreateSubscription","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateWebhookDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/webhooks/variables

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"webhooks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"WebhookVariablesDto":{"required":["event_type","variables"],"type":"object","properties":{"event_type":{"$ref":"#/components/schemas/WebhookEventType"},"variables":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/webhooks/variables":{"get":{"tags":["webhooks"],"operationId":"Webhooks_GetVariables","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookVariablesDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/webhooks/{webhookId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"webhooks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/webhooks/{webhookId}":{"delete":{"tags":["webhooks"],"operationId":"Webhooks_DeleteSubscription","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"webhookId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/webhooks/{webhookId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"webhooks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateWebhookDto":{"required":["reset_secret","subscribed_to","url"],"type":"object","properties":{"url":{"type":"string"},"reset_secret":{"type":"boolean"},"subscribed_to":{"$ref":"#/components/schemas/WebhookEventType"},"discord_description_template":{"type":["null","string"]},"discord_title":{"type":["null","string"]},"discord_color":{"type":["null","string"]},"discord_format":{"$ref":"#/components/schemas/WebhookDiscordFormatDto"}},"additionalProperties":false},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"WebhookDiscordFormatDto":{"enum":["Invalid","Embed","Text"],"type":"string"},"WebhookSubscriptionDto":{"required":["id","secret","subscribed_to","type","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"url":{"type":"string"},"secret":{"type":"string"},"subscribed_to":{"$ref":"#/components/schemas/WebhookEventType"},"type":{"$ref":"#/components/schemas/WebhookType"},"discord_description_template":{"type":["null","string"]},"discord_title":{"type":["null","string"]},"discord_color":{"type":["null","string"]},"discord_format":{"$ref":"#/components/schemas/WebhookDiscordFormatDto"}},"additionalProperties":false},"WebhookType":{"enum":["json_v1","discord_v1"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/webhooks/{webhookId}":{"patch":{"tags":["webhooks"],"operationId":"Webhooks_UpdateSubscription","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"webhookId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/webhooks/resend

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"webhooks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ResendWebhookDto":{"required":["webhook_id"],"type":"object","properties":{"webhook_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/webhooks/resend":{"post":{"tags":["webhooks"],"operationId":"Webhooks_Resend","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendWebhookDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/ResendWebhookDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ResendWebhookDto"}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/webhooks/{webhookId}/history

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"webhooks"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"WebhookHistoryDto":{"required":["history","page"],"type":"object","properties":{"page":{"type":"integer","format":"int32"},"history":{"type":"array","items":{"$ref":"#/components/schemas/QueuedWebhookDto"}}},"additionalProperties":false},"QueuedWebhookDto":{"required":["created_at","event","executions","id","payload","state","webhook_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"webhook_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/WebhookState"},"next_retry":{"type":["null","string"],"format":"date-time"},"event":{"$ref":"#/components/schemas/WebhookEventType"},"payload":{},"executions":{"type":"array","items":{"$ref":"#/components/schemas/ExecutedWebhookDto"}}},"additionalProperties":false},"WebhookState":{"enum":["success","pending","failed","all"],"type":"string"},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"ExecutedWebhookDto":{"required":["id","started_at","status_code"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["null","string"],"format":"date-time"},"status_code":{"type":"integer","format":"int32"},"response":{"type":["null","string"]}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/webhooks/{webhookId}/history":{"get":{"tags":["webhooks"],"operationId":"Webhooks_GetHistory","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"webhookId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"state","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookHistoryDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


# Models

## The AbandonedCheckoutStoreConfigurationCommandDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AbandonedCheckoutStoreConfigurationCommandDto":{"required":["command","id","online_only","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level abandoned checkout configuration."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The AbandonedCheckoutStoreConfigurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AbandonedCheckoutStoreConfigurationDto":{"required":["commands","coupon_configuration","enabled","invalid","minimum_order_value","store_id","trigger_after","updated_at","updated_by"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"invalid":{"type":"boolean","description":"A value indicating whether the abandoned checkout configuration for the store is invalid."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationCommandDto"},"description":"The commands you want to execute when the email is sent."},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":"string","description":"The date and time when the configuration was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents the store-level configuration for abandoned checkout settings."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"},"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"AbandonedCheckoutStoreConfigurationCommandDto":{"required":["command","id","online_only","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level abandoned checkout configuration."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The AbandonedCheckoutStoreConfigurationUpdateCommandDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AbandonedCheckoutStoreConfigurationUpdateCommandDto":{"required":["command","online_only"],"type":"object","properties":{"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level abandoned checkout configuration."}}}}
```

## The AbandonedCheckoutStoreConfigurationUpdateDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AbandonedCheckoutStoreConfigurationUpdateDto":{"required":["commands","coupon_configuration","enabled","minimum_order_value","trigger_after"],"type":"object","properties":{"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/AbandonedCheckoutStoreConfigurationUpdateCommandDto"}},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"}},"additionalProperties":false,"description":"Used for updating the store-level configuration for abandoned checkout settings."},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"},"AbandonedCheckoutStoreConfigurationUpdateCommandDto":{"required":["command","online_only"],"type":"object","properties":{"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level abandoned checkout configuration."},"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ActorDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The AddressDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AddressDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country of the address"},"state":{"type":["null","string"],"description":"The state or province of the address"},"city":{"type":["null","string"],"description":"The city of the address"},"postal_code":{"type":["null","string"],"description":"The postal code or zip code of the address"},"line_1":{"type":["null","string"],"description":"The first line of the street address"},"line_2":{"type":["null","string"],"description":"The second line of the street address, if any (apartment, suite, etc.)"}},"additionalProperties":false,"description":"Represents a physical or billing address"}}}}
```

## The AffiliateLinkCommissionAmountStepDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AffiliateLinkCommissionAmountStepDto":{"required":["billing_cycle_sequence","commission_amount"],"type":"object","properties":{"billing_cycle_sequence":{"type":"integer","description":"The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.","format":"int32"},"commission_amount":{"type":"integer","description":"The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).","format":"int64"}},"additionalProperties":false,"description":"Represents the commission for a specific subscription renewal billing cycle.\nA step applies to its exact cycle - see the affiliate link's 'last_commission_amount_step_repeats' for what happens past the last step."}}}}
```

## The AffiliateLinkCommissionTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AffiliateLinkCommissionTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of commission an affiliate earns from referred purchases."}}}}
```

## The AffiliateLinkDiscountTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AffiliateLinkDiscountTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of discount offered to customers referred through an affiliate link."}}}}
```

## The AffiliateLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AffiliateLinkDto":{"required":["apply_for_subscriptions","code","commission_amount","commission_amount_steps","commission_type","created_at","created_by","discount_amount","discount_type","enabled","id","last_commission_amount_step_repeats","referer_type","store_id","tracking_length_days","wallet_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"wallet_id":{"type":"string","description":"The identifier of the wallet that receives the affiliate commission payouts."},"enabled":{"type":"boolean","description":"Indicates whether the affiliate link is enabled."},"code":{"type":"string","description":"The unique code associated with the affiliate link."},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","description":"The number of days a customer's referral is tracked after following the affiliate link.","format":"int32"},"apply_for_subscriptions":{"type":"boolean","description":"Whether the affiliate earns commission on subscription renewals.\nMust be enabled for 'commission_amount_steps' past the first cycle to apply - when disabled, only the initial purchase earns commission."},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount, in the smallest currency unit (e.g., cents) for fixed discounts, or tenths of a percent (e.g., 125 = 12.5%) for percentage discounts.","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","description":"The commission amount, in tenths of a percent (e.g., 125 = 12.5%) for percentage commissions.","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"},"description":"Per-cycle commission overrides. Requires 'apply_for_subscriptions' to be enabled for billing cycles past 1.\nWhen empty, the base commission amount applies to every renewal. When steps are defined, each renewal cycle pays its matching steps amount.\nCycles without a matching step earn no commission, except cycles past the last step when 'last_commission_amount_step_repeats' is true."},"last_commission_amount_step_repeats":{"type":"boolean","description":"Whether the last commission amount steps rate continues to apply to all billing cycles past the last step.\nWhen false, cycles past the last step earn no commission."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the affiliate link was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the affiliate link was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of an affiliate link, including configuration and audit information."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"AffiliateLinkRefererTypeDto":{"enum":["invalid","first_referer","last_referer"],"type":"string","description":"Specifies which affiliate link is credited when a customer follows multiple links before purchasing."},"AffiliateLinkDiscountTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of discount offered to customers referred through an affiliate link."},"AffiliateLinkCommissionTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of commission an affiliate earns from referred purchases."},"AffiliateLinkCommissionAmountStepDto":{"required":["billing_cycle_sequence","commission_amount"],"type":"object","properties":{"billing_cycle_sequence":{"type":"integer","description":"The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.","format":"int32"},"commission_amount":{"type":"integer","description":"The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).","format":"int64"}},"additionalProperties":false,"description":"Represents the commission for a specific subscription renewal billing cycle.\nA step applies to its exact cycle - see the affiliate link's 'last_commission_amount_step_repeats' for what happens past the last step."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The AffiliateLinkRefererTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AffiliateLinkRefererTypeDto":{"enum":["invalid","first_referer","last_referer"],"type":"string","description":"Specifies which affiliate link is credited when a customer follows multiple links before purchasing."}}}}
```

## The AlipayDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"}}}}
```

## The BanDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The BanIdentityDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"}}}}
```

## The BanType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"}}}}
```

## The BancontactDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"}}}}
```

## The CancelSubscriptionRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CancelSubscriptionRequestDto":{"type":"object","properties":{"cancel_at_period_end":{"type":["null","boolean"],"description":"Should the subscription be cancelled immediately (false) or on the next billing period (true)?"}},"additionalProperties":false}}}}
```

## The CardDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"}}}}
```

## The CardWalletDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"}}}}
```

## The CashAppDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"}}}}
```

## The ChargebackCoverageTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ChargebackCoverageTypeDto":{"enum":["unspecified","none","fraudulent","all"],"type":"string","description":"Defines the type of chargeback coverage provided."}}}}
```

## The CheckForBanIDByIdentitiesRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CheckForBanIDByIdentitiesRequestDto":{"required":["identities"],"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"}}}}
```

## The CheckForBanIDByIdentitiesResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CheckForBanIDByIdentitiesResponseDto":{"required":["is_banned"],"type":"object","properties":{"is_banned":{"type":"boolean"},"ban_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CheckoutCustomerDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CheckoutCustomerDetailsDto":{"type":"object","properties":{"billing_name":{"type":["null","string"],"description":"The name the checkout is billed to."},"billing_email":{"type":["null","string"],"description":"The email address the checkout is billed to."},"billing_address":{"$ref":"#/components/schemas/AddressDto"},"billing_tax_id":{"type":["null","string"],"description":"The tax identifier of the customer, such as a VAT number."}},"additionalProperties":false,"description":"The billing details of the customer the checkout belongs to."},"AddressDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country of the address"},"state":{"type":["null","string"],"description":"The state or province of the address"},"city":{"type":["null","string"],"description":"The city of the address"},"postal_code":{"type":["null","string"],"description":"The postal code or zip code of the address"},"line_1":{"type":["null","string"],"description":"The first line of the street address"},"line_2":{"type":["null","string"],"description":"The second line of the street address, if any (apartment, suite, etc.)"}},"additionalProperties":false,"description":"Represents a physical or billing address"}}}}
```

## The CheckoutPaymentInfoDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CheckoutPaymentInfoDto":{"required":["declined","status"],"type":"object","properties":{"status":{"type":"string","description":"Status string from the payment provider."},"declined":{"type":"boolean","description":"Indicates whether the payment was declined."},"decline_message":{"type":["null","string"],"description":"The customer readable decline reason, if the payment was declined."},"checkout_url":{"type":["null","string"],"description":"Checkout URL to redirect to for on-session payments."}},"additionalProperties":false,"description":"Payment outcome information returned after a subscription change triggers an immediate charge."}}}}
```

## The CommandAttemptDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The CouponDiscountTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."}}}}
```

## The CouponDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CouponDto":{"required":["code","created_at","discount_amount","discount_apply_before_sales","discount_apply_individually","discount_type","duration","enabled","id","minimum_order_value","redeem_limit_customer_amount","redeem_limit_customer_enabled","redeem_limit_store_amount","redeem_limit_store_enabled","store_id","usable_on_one_time_purchase","usable_on_subscription","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the coupon is enabled."},"code":{"type":"string","description":"The unique code associated with the coupon."},"note":{"type":["null","string"],"description":"A note or internal description of the coupon."},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"description":"The number of months the coupon is valid for, used if the duration is repeating.","format":"int32","deprecated":true},"duration_in_intervals":{"type":["null","integer"],"description":"The number of subscription renewals the coupon is valid for, used if the duration is repeating.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount amount in the smallest currency unit (e.g., cents).","format":"int64"},"discount_apply_individually":{"type":"boolean","description":"Indicates whether the discount should be applied individually to required tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Indicates whether the discount is applied before existing sales."},"apply_to_products":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the coupon applies to."},"apply_to_tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the coupon applies to."},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to use the coupon.","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean","description":"Indicates whether a global redemption limit is enabled."},"redeem_limit_store_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed across the store.","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean","description":"Indicates whether a per-customer redemption limit is enabled."},"redeem_limit_customer_amount":{"type":"integer","description":"The maximum number of times the coupon can be redeemed per customer.","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean","description":"Indicates whether the coupon can be used for one-time purchases."},"usable_on_subscription":{"type":"boolean","description":"Indicates whether the coupon can be used for subscriptions."},"usable_at":{"type":["null","string"],"description":"The date and time when the coupon becomes valid.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the coupon expires.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the coupon was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the coupon was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a coupon, including configuration and audit information."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The CouponDurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."}}}}
```

## The CouponFilterStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CouponFilterStatusDto":{"enum":["all","active","inactive"],"type":"string","description":"Will filter by coupon status."}}}}
```

## The CouponFilterTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CouponFilterTypeDto":{"enum":["all","manual","generated"],"type":"string","description":"Will filter by coupon creation type."}}}}
```

## The CreateAffiliateLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateAffiliateLinkDto":{"required":["wallet_id","enabled","code","referer_type","tracking_length_days","apply_for_subscriptions","discount_type","discount_amount","commission_type","commission_amount","commission_amount_steps","last_commission_amount_step_repeats"],"type":"object","properties":{"wallet_id":{"type":"string"},"enabled":{"type":"boolean"},"code":{"type":"string"},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","format":"int32"},"apply_for_subscriptions":{"type":"boolean"},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"}},"last_commission_amount_step_repeats":{"type":"boolean"}}},"AffiliateLinkRefererTypeDto":{"enum":["invalid","first_referer","last_referer"],"type":"string","description":"Specifies which affiliate link is credited when a customer follows multiple links before purchasing."},"AffiliateLinkDiscountTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of discount offered to customers referred through an affiliate link."},"AffiliateLinkCommissionTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of commission an affiliate earns from referred purchases."},"AffiliateLinkCommissionAmountStepDto":{"required":["billing_cycle_sequence","commission_amount"],"type":"object","properties":{"billing_cycle_sequence":{"type":"integer","description":"The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.","format":"int32"},"commission_amount":{"type":"integer","description":"The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).","format":"int64"}},"additionalProperties":false,"description":"Represents the commission for a specific subscription renewal billing cycle.\nA step applies to its exact cycle - see the affiliate link's 'last_commission_amount_step_repeats' for what happens past the last step."}}}}
```

## The CreateCheckoutSessionLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateCheckoutSessionLineDto":{"required":["product_id","quantity"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"subscription":{"type":["null","boolean"],"description":"Determines whether this line should create a subscription"},"trial":{"type":["null","boolean"],"description":"Indicates whether the product should be trialed"},"gift_to":{"$ref":"#/components/schemas/CustomerPlatformAccountDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":"integer","description":"The quantity of this product to purchase","format":"int32"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Key-value pair mapping custom variable identifiers to their selected values.\nRequired only when the product includes custom variables."}},"additionalProperties":false,"description":"Represents a line item in a checkout session request"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"}}}}
```

## The CreateCheckoutSessionLineManagementDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateCheckoutSessionLineManagementDto":{"required":["quantity"],"type":"object","properties":{"subscription":{"type":["null","boolean"],"description":"Determines whether this line should create a subscription"},"trial":{"type":["null","boolean"],"description":"Indicates whether the product should be trialed"},"gift_to":{"$ref":"#/components/schemas/CustomerPlatformAccountDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":"integer","description":"The quantity of this product to purchase","format":"int32"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Key-value pair mapping custom variable identifiers to their selected values.\nRequired only when the product includes custom variables."},"product_id":{"$ref":"#/components/schemas/FlakeId"},"inline_product":{"$ref":"#/components/schemas/InlineProductCreateDto"},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/CreateCheckoutSessionLineManagementPayoutSplitDto"},"description":"Optional payout splits for line items (requires approval)"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Optional metadata to associate with the checkout session line.\nDo not store any sensitive information here."}},"additionalProperties":false,"description":"Represents a line item in a checkout session request.\nOpposed to CreateCheckoutSessionLineDto, this is used while creating a checkout session using the Management API,\nand allows for creating inline products and payout splits (subject to special approval)"},"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"InlineProductCreateDto":{"type":"object","properties":{"slug":{"type":["null","string"],"description":"The unique URL-safe identifier (slug) for the product."},"name":{"type":["null","string"],"description":"The display name of the product."},"description":{"type":["null","string"],"description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"price":{"type":["null","integer"],"description":"The price of the product in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":["null","boolean"],"description":"Indicates whether the customer is prompted to select a game server before purchasing."},"allow_one_time_purchase":{"type":["null","boolean"],"description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":["null","boolean"],"description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":["null","integer"],"description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/UpsertProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/UpsertProductUpsellConfigurationDto"},"remove_after_enabled":{"type":["null","boolean"],"description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":["null","integer"],"description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The tag IDs associated with the product."},"gameservers":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The gameserver IDs associated with the product."},"commands":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution.\nRequires special approval."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.\nSet to `null` to keep enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.\nSet to `null` to keep enabled.","format":"date-time"},"required_product_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Optional inline product definition for dynamic products.\nRequires special approval, use `product_id` instead."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"UpsertProductTrialConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"],"description":"Indicates if trials should be enabled for the product."},"period_value":{"type":["null","integer"],"description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":["null","boolean"],"description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":["null","boolean"],"description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":["null","integer"],"description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":["null","boolean"],"description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":["null","integer"],"description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trials is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"UpsertProductUpsellConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"]},"recommendations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/UpsertProductUpsellRecommendationDto"}}},"additionalProperties":false},"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."},"CreateCheckoutSessionLineManagementPayoutSplitDto":{"required":["payout_id"],"type":"object","properties":{"payout_id":{"type":"string","description":"The ID of the user's payout balance."},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)\nNOTE: The last payout split needs to have a null percentage set (so the remaining amount gets properly allocated)","format":"int64"},"platform_fee":{"type":["null","integer"],"description":"The platform fee percentage applied to this split (in basis points)\nOnly applicable to platforms.","format":"int64"}},"additionalProperties":false}}}}
```

## The CreateCheckoutSessionLineManagementPayoutSplitDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateCheckoutSessionLineManagementPayoutSplitDto":{"required":["payout_id"],"type":"object","properties":{"payout_id":{"type":"string","description":"The ID of the user's payout balance."},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)\nNOTE: The last payout split needs to have a null percentage set (so the remaining amount gets properly allocated)","format":"int64"},"platform_fee":{"type":["null","integer"],"description":"The platform fee percentage applied to this split (in basis points)\nOnly applicable to platforms.","format":"int64"}},"additionalProperties":false}}}}
```

## The CreateCheckoutSessionManagementDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateCheckoutSessionManagementDto":{"required":["customer_id","lines"],"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/CreateCheckoutSessionLineManagementDto"},"description":"The line items to include in the checkout"},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"promo_codes":{"type":["null","array"],"items":{"type":"string"},"description":"Optional array of promo codes (coupons, gift cards, affiliates) to apply.\nAn invalid promo code will cause an error."},"affiliate_code":{"type":["null","string"],"description":"Optional affiliate code to track referrals.\nAn invalid affiliate code will NOT cause an error."},"return_url":{"type":["null","string"],"description":"Optional URL to redirect to after successful checkout"},"cancel_url":{"type":["null","string"],"description":"Optional URL to redirect to if checkout is canceled"},"auto_redirect":{"type":["null","boolean"],"description":"Whether to automatically redirect the customer (return_url must be set)"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Optional metadata to associate with the checkout session.\nDo not store any sensitive information here."},"customer_details":{"$ref":"#/components/schemas/CheckoutCustomerDetailsDto"}},"additionalProperties":false,"description":"Request to create a new checkout session from your back-end server using the management API.\n`customer_id` needs to be specified explicitly here instead of using a Customer token."},"CreateCheckoutSessionLineManagementDto":{"required":["quantity"],"type":"object","properties":{"subscription":{"type":["null","boolean"],"description":"Determines whether this line should create a subscription"},"trial":{"type":["null","boolean"],"description":"Indicates whether the product should be trialed"},"gift_to":{"$ref":"#/components/schemas/CustomerPlatformAccountDto"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":"integer","description":"The quantity of this product to purchase","format":"int32"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Key-value pair mapping custom variable identifiers to their selected values.\nRequired only when the product includes custom variables."},"product_id":{"$ref":"#/components/schemas/FlakeId"},"inline_product":{"$ref":"#/components/schemas/InlineProductCreateDto"},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/CreateCheckoutSessionLineManagementPayoutSplitDto"},"description":"Optional payout splits for line items (requires approval)"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Optional metadata to associate with the checkout session line.\nDo not store any sensitive information here."}},"additionalProperties":false,"description":"Represents a line item in a checkout session request.\nOpposed to CreateCheckoutSessionLineDto, this is used while creating a checkout session using the Management API,\nand allows for creating inline products and payout splits (subject to special approval)"},"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"InlineProductCreateDto":{"type":"object","properties":{"slug":{"type":["null","string"],"description":"The unique URL-safe identifier (slug) for the product."},"name":{"type":["null","string"],"description":"The display name of the product."},"description":{"type":["null","string"],"description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"price":{"type":["null","integer"],"description":"The price of the product in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":["null","boolean"],"description":"Indicates whether the customer is prompted to select a game server before purchasing."},"allow_one_time_purchase":{"type":["null","boolean"],"description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":["null","boolean"],"description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":["null","integer"],"description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/UpsertProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/UpsertProductUpsellConfigurationDto"},"remove_after_enabled":{"type":["null","boolean"],"description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":["null","integer"],"description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The tag IDs associated with the product."},"gameservers":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The gameserver IDs associated with the product."},"commands":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution.\nRequires special approval."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.\nSet to `null` to keep enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.\nSet to `null` to keep enabled.","format":"date-time"},"required_product_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Optional inline product definition for dynamic products.\nRequires special approval, use `product_id` instead."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"UpsertProductTrialConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"],"description":"Indicates if trials should be enabled for the product."},"period_value":{"type":["null","integer"],"description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":["null","boolean"],"description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":["null","boolean"],"description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":["null","integer"],"description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":["null","boolean"],"description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":["null","integer"],"description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trials is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"UpsertProductUpsellConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"]},"recommendations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/UpsertProductUpsellRecommendationDto"}}},"additionalProperties":false},"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."},"CreateCheckoutSessionLineManagementPayoutSplitDto":{"required":["payout_id"],"type":"object","properties":{"payout_id":{"type":"string","description":"The ID of the user's payout balance."},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)\nNOTE: The last payout split needs to have a null percentage set (so the remaining amount gets properly allocated)","format":"int64"},"platform_fee":{"type":["null","integer"],"description":"The platform fee percentage applied to this split (in basis points)\nOnly applicable to platforms.","format":"int64"}},"additionalProperties":false},"CheckoutCustomerDetailsDto":{"type":"object","properties":{"billing_name":{"type":["null","string"],"description":"The name the checkout is billed to."},"billing_email":{"type":["null","string"],"description":"The email address the checkout is billed to."},"billing_address":{"$ref":"#/components/schemas/AddressDto"},"billing_tax_id":{"type":["null","string"],"description":"The tax identifier of the customer, such as a VAT number."}},"additionalProperties":false,"description":"The billing details of the customer the checkout belongs to."},"AddressDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country of the address"},"state":{"type":["null","string"],"description":"The state or province of the address"},"city":{"type":["null","string"],"description":"The city of the address"},"postal_code":{"type":["null","string"],"description":"The postal code or zip code of the address"},"line_1":{"type":["null","string"],"description":"The first line of the street address"},"line_2":{"type":["null","string"],"description":"The second line of the street address, if any (apartment, suite, etc.)"}},"additionalProperties":false,"description":"Represents a physical or billing address"}}}}
```

## The CreateCheckoutSessionResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateCheckoutSessionResponseDto":{"required":["id","token","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"token":{"type":"string","description":"The token for the checkout session"},"url":{"type":"string","description":"The URL to redirect the customer to complete checkout"}},"additionalProperties":false,"description":"Response after creating a checkout session"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CreateCouponDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateCouponDto":{"required":["enabled","code","duration","discount_type","discount_amount","discount_apply_individually","discount_apply_before_sales","minimum_order_value","redeem_limit_store_enabled","redeem_limit_store_amount","redeem_limit_customer_enabled","redeem_limit_customer_amount","usable_on_one_time_purchase","usable_on_subscription"],"type":"object","properties":{"enabled":{"type":"boolean"},"code":{"type":"string"},"note":{"type":"string"},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"format":"int32"},"duration_in_intervals":{"type":["null","integer"],"format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"discount_apply_individually":{"type":"boolean"},"discount_apply_before_sales":{"type":"boolean"},"apply_to_products":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"apply_to_tags":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean"},"redeem_limit_store_amount":{"type":"integer","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean"},"redeem_limit_customer_amount":{"type":"integer","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean"},"usable_on_subscription":{"type":"boolean"},"usable_at":{"type":["null","string"],"format":"date-time"},"expires_at":{"type":["null","string"],"format":"date-time"}}},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CreateDownloadableFileDownloadUrlResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateDownloadableFileDownloadUrlResponseDto":{"required":["download_signed_url"],"type":"object","properties":{"download_signed_url":{"type":"string"}},"additionalProperties":false}}}}
```

## The CreateGameServerConsoleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateGameServerConsoleDto":{"required":["type","enabled","host","port","secure"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":"string"},"secure":{"type":"boolean"}}},"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"}}}}
```

## The CreateGameServerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateGameServerDto":{"required":["name","enabled"],"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"}}}}}}
```

## The CreateGiftCardDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateGiftCardDto":{"required":["enabled","code","balance","usable_at"],"type":"object","properties":{"enabled":{"type":"boolean"},"code":{"type":"string"},"note":{"type":"string"},"balance":{"type":"integer","format":"int64"},"usable_at":{"type":"string","format":"date-time"},"expires_at":{"type":["null","string"],"format":"date-time"}}}}}}
```

## The CreateNavLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateNavLinkDto":{"required":["tag_id"],"type":"object","properties":{"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}}},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CreateProductDependentMigrationRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateProductDependentMigrationRequestDto":{"required":["send_all_commands_to_new_servers","send_new_commands_to_all_servers","target_types"],"type":"object","properties":{"send_new_commands_to_all_servers":{"type":"boolean"},"send_all_commands_to_new_servers":{"type":"boolean"},"target_types":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"}}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"}}}}
```

## The CreateRefundRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateRefundRequestDto":{"type":"object","properties":{"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"refund_from_connected_user_balance":{"type":["null","boolean"],"description":"Determines if the refund should be taken from the connected user's balance.\nOnly relevant for connected platforms."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CreateSaleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateSaleDto":{"required":["enabled","name","discount_type","discount_amount","duration","duration_in_intervals","apply_to_product_ids","apply_to_tag_ids","minimum_order_value","begins_at"],"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"minimum_order_value":{"type":"integer","format":"int32"},"begins_at":{"type":"string","format":"date-time"},"ends_at":{"type":["null","string"],"format":"date-time"}}},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SaleDurationDto":{"enum":["unspecified","once","forever","repeating"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CreateStoreDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateStoreDto":{"required":["slug","name","platform","game","currency","description"],"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string"},"game":{"type":"string"},"currency":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"contact_email":{"type":"string"},"support_email":{"type":"string"},"support_url":{"type":"string"},"integration_type":{"type":"string"},"minecraft_bedrock_username_prefix":{"type":"string"}}}}}}
```

## The CreateStorePaymentSettingsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateStorePaymentSettingsDto":{"required":["show_all_payment_methods_for_subscriptions","store_tax_inclusive_pricing","block_prepaid_cards","promo_code_stacking_behavior","adaptive_currency_enabled","show_adaptive_currency_on_storefront"],"type":"object","properties":{"show_all_payment_methods_for_subscriptions":{"type":"boolean"},"store_tax_inclusive_pricing":{"type":"boolean"},"block_prepaid_cards":{"$ref":"#/components/schemas/PrepaidCardsBlockingTypeDto"},"promo_code_stacking_behavior":{"$ref":"#/components/schemas/StorePromoCodeStackingBehaviorDto"},"adaptive_currency_enabled":{"type":"boolean"},"show_adaptive_currency_on_storefront":{"type":"boolean"}}},"PrepaidCardsBlockingTypeDto":{"enum":["unspecified","none","trials","all_recurring"],"type":"string","description":"Defines when prepaid cards should be blocked from use."},"StorePromoCodeStackingBehaviorDto":{"enum":["invalid","disabled","enabled","gift_cards_only"],"type":"string","description":"Defines the behavior of promo code stacking."}}}}
```

## The CreateStoreUpsellSettingsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateStoreUpsellSettingsDto":{"required":["enabled","automatic_recommendations_enabled","automatic_recommendations_discount_type","automatic_recommendations_discount_amount","recommendation_overrides_enabled","recommendation_overrides","checkout_style"],"type":"object","properties":{"enabled":{"type":"boolean"},"automatic_recommendations_enabled":{"type":"boolean"},"automatic_recommendations_discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"automatic_recommendations_discount_amount":{"type":"integer","format":"int64"},"recommendation_overrides_enabled":{"type":"boolean"},"recommendation_overrides":{"type":"array","items":{"$ref":"#/components/schemas/StoreUpsellRecommendationDto"}},"checkout_style":{"$ref":"#/components/schemas/StoreUpsellCheckoutStyleDto"}}},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"StoreUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"StoreUpsellCheckoutStyleDto":{"enum":["unknown","inline","inline_and_prepayment_dialog","dedicated_step"],"type":"string"}}}}
```

## The CreateTierGroupRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateTierGroupRequestDto":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tier group."}},"additionalProperties":false}}}}
```

## The CreateTrialEligibilityOverrideDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateTrialEligibilityOverrideDto":{"required":["product_id","expires_at"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"expires_at":{"type":"string","format":"date-time"},"note":{"type":"string"}}},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CreateWebhookDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CreateWebhookDto":{"required":["subscribed_to","type","url"],"type":"object","properties":{"url":{"type":"string"},"subscribed_to":{"$ref":"#/components/schemas/WebhookEventType"},"type":{"$ref":"#/components/schemas/WebhookType"},"discord_description_template":{"type":["null","string"]},"discord_title":{"type":["null","string"]},"discord_color":{"type":["null","string"]},"discord_format":{"$ref":"#/components/schemas/WebhookDiscordFormatDto"}},"additionalProperties":false},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"WebhookType":{"enum":["json_v1","discord_v1"],"type":"string"},"WebhookDiscordFormatDto":{"enum":["Invalid","Embed","Text"],"type":"string"}}}}
```

## The CryptoDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"}}}}
```

## The CustomVariableDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The CustomVariableLineItemDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CustomVariableOptionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."}}}}
```

## The CustomVariableOptionPriceType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."}}}}
```

## The CustomVariableOptionRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomVariableOptionRequestDto":{"required":["is_default","name","price","price_type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"The value the command variable will be replaced with."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).\nIf fixed, the value is in cents, if a percentage, in permille.","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default.\nOnly one option per custom variable should be marked as default."}},"additionalProperties":false,"description":"Request model for defining custom variable options.\nUsed within UpsertCustomVariableRequestDto for dropdown-type variables."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."}}}}
```

## The CustomVariableType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."}}}}
```

## The CustomerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"}}}}
```

## The CustomerGenericProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."}}}}
```

## The CustomerMinecraftPlatform object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"}}}}
```

## The CustomerMinecraftProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."}}}}
```

## The CustomerPlatformAccountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerPlatformAccountDto":{"required":["id","platform"],"type":"object","properties":{"platform":{"$ref":"#/components/schemas/CustomerProfilePlatform"},"id":{"type":"string","description":"The account ID on the platform"}},"additionalProperties":false,"description":"Represents a customer platform association, used for gifting"},"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"}}}}
```

## The CustomerProfilePlatform object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerProfilePlatform":{"enum":["invalid","steam","minecraft","paynow_name","paynow","minecraft_java_name","minecraft_bedrock_name","xbox_xuid","minecraft_uuid"],"type":"string"}}}}
```

## The CustomerSortFieldDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerSortFieldDto_V2":{"enum":["unspecified","total_spend_gross","total_spend_net","average_spend_gross","average_spend_net","total_active_subscriptions","total_monthly_recurring_revenue","total_payments","total_chargebacks","total_refunds"],"type":"string"}}}}
```

## The CustomerSpendTimeRangeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerSpendTimeRangeDto":{"required":["average_spend_amount_gross","average_spend_amount_net","customer_id","from","to","total_payments","total_spend_amount_gross","total_spend_amount_net"],"type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/FlakeId"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"total_spend_amount_gross":{"type":"integer","format":"int64"},"total_spend_amount_net":{"type":"integer","format":"int64"},"average_spend_amount_gross":{"type":"integer","format":"int64"},"average_spend_amount_net":{"type":"integer","format":"int64"},"total_payments":{"type":"integer","format":"int32"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CustomerStatsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerStatsDto":{"required":["average_spend_amount_gross","average_spend_amount_net","customer_id","total_active_subscriptions","total_chargebacks","total_monthly_recurring_revenue","total_payments","total_refunds","total_spend_amount_gross","total_spend_amount_net"],"type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/FlakeId"},"total_spend_amount_gross":{"type":"integer","format":"int64"},"total_spend_amount_net":{"type":"integer","format":"int64"},"average_spend_amount_gross":{"type":"integer","format":"int64"},"average_spend_amount_net":{"type":"integer","format":"int64"},"total_active_subscriptions":{"type":"integer","format":"int32"},"total_monthly_recurring_revenue":{"type":"integer","format":"int64"},"total_payments":{"type":"integer","format":"int32"},"total_chargebacks":{"type":"integer","format":"int32"},"total_refunds":{"type":"integer","format":"int32"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The CustomerStatsDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerStatsDto_V2":{"required":["average_spend_gross","average_spend_net","customer_id","total_active_subscriptions","total_chargebacks","total_monthly_recurring_revenue","total_payments","total_refunds","total_spend_gross","total_spend_net"],"type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/FlakeId"},"total_spend_gross":{"$ref":"#/components/schemas/MoneyDto_V2"},"total_spend_net":{"$ref":"#/components/schemas/MoneyDto_V2"},"average_spend_gross":{"$ref":"#/components/schemas/MoneyDto_V2"},"average_spend_net":{"$ref":"#/components/schemas/MoneyDto_V2"},"total_active_subscriptions":{"type":"integer","format":"int32"},"total_monthly_recurring_revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"total_payments":{"type":"integer","format":"int32"},"total_chargebacks":{"type":"integer","format":"int32"},"total_refunds":{"type":"integer","format":"int32"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The CustomerSteamProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The CustomerTokenResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"CustomerTokenResponseDto":{"required":["token"],"type":"object","properties":{"token":{"type":"string","description":"The generated Customer token."}},"additionalProperties":false}}}}
```

## The DashboardStatsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DashboardStatsDto":{"required":["average_spend_amount","average_spend_amount_prev","lifetime_sales","lifetime_sales_count","month_sales","month_sales_prev","sales_today","sales_yesterday","store_id"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"sales_today":{"type":"integer","format":"int64"},"sales_yesterday":{"type":"integer","format":"int64"},"month_sales":{"type":"integer","format":"int64"},"month_sales_prev":{"type":"integer","format":"int64"},"average_spend_amount":{"type":"number","format":"double"},"average_spend_amount_prev":{"type":"number","format":"double"},"lifetime_sales":{"type":"integer","format":"int64"},"lifetime_sales_count":{"type":"integer","format":"int64"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DataMigrationTaskDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DataMigrationTaskDto":{"required":["id","platform","started_at","started_by","store_id","token","total_entities_migrated"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"platform":{"type":"string","description":"Platform from which data is being migrated (e.g., \"tebex\")."},"token":{"type":"string","description":"Masked authentication token used for accessing the source platform API."},"error":{"type":["null","string"],"description":"Error message if the migration encountered any errors, otherwise null."},"started_at":{"type":"string","description":"Timestamp when the migration was initiated.","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Timestamp when the migration failed, or null if it didn't fail.","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Timestamp when the migration was successfully completed, or null if not completed.","format":"date-time"},"total_entities_to_migrate":{"type":["null","integer"],"description":"Total number of entities that need to be migrated, or null if unknown.","format":"int64"},"total_entities_migrated":{"type":"integer","description":"Number of entities that have been successfully migrated.","format":"int32"},"started_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The DayOfWeekDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DayOfWeekDto":{"enum":["unspecified","monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"type":"string"}}}}
```

## The DayOrderStatsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DayOrderStatsDto":{"required":["day","total","total_orders"],"type":"object","properties":{"day":{"type":"string","format":"date-time"},"total":{"type":"integer","format":"int64"},"total_orders":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The DeliveryItemAssignmentBulkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DeliveryItemAssignmentBulkDto":{"required":["customer_id"],"type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":["null","integer"],"description":"Quantity of products to assign.","format":"int32"},"override_expires_at":{"type":["null","string"],"description":"Override expiry date for the delivery item.","format":"date-time"},"skip_commands":{"type":["null","boolean"],"description":"Skip command execution when assigning the item."},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Custom variables for the assignment."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DeliveryItemAssignmentDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DeliveryItemAssignmentDto":{"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity":{"type":["null","integer"],"description":"Quantity of products to assign.","format":"int32"},"override_expires_at":{"type":["null","string"],"description":"Override expiry date for the delivery item.","format":"date-time"},"skip_commands":{"type":["null","boolean"],"description":"Skip command execution when assigning the item."},"custom_variables":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Custom variables for the assignment."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DeliveryItemDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DeliveryItemDto":{"required":["added_at","command_attempts","custom_variables","customer","customer_id","expirable","gift","id","product","skip_commands","state","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"order_customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_customer":{"$ref":"#/components/schemas/CustomerDto"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"execute_on_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"quantity_index":{"type":["null","integer"],"description":"The index of the item when multiple quantities were assigned","format":"int32"},"product":{"$ref":"#/components/schemas/DeliveryItemProductDto"},"state":{"$ref":"#/components/schemas/DeliveryItemStateDto"},"added_at":{"type":"string","description":"The date and time when the item was added","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"active_at":{"type":["null","string"],"description":"The date and time when the item became active","format":"date-time"},"expirable":{"type":"boolean","description":"Indicates whether the delivery item can expire"},"expires_at":{"type":["null","string"],"description":"The date and time when the item expires naturally","format":"date-time"},"override_expires_at":{"type":["null","string"],"description":"The override expiry date for the delivery item","format":"date-time"},"removed_at":{"type":["null","string"],"description":"The date and time when the item was removed","format":"date-time"},"revoked_at":{"type":["null","string"],"description":"The date and time when the item was revoked","format":"date-time"},"revoke_reason":{"type":["null","string"],"description":"The reason for revoking the delivery item"},"revoked_by":{"$ref":"#/components/schemas/ActorDto"},"command_attempts":{"type":"array","items":{"$ref":"#/components/schemas/CommandAttemptDto"},"description":"The command execution attempts for this delivery item"},"skip_commands":{"type":"boolean","description":"Indicates whether command execution should be skipped for this item"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variables associated with the delivery item"},"gift":{"type":"boolean","description":"Indicates whether the item was given as a gift"}},"additionalProperties":false,"description":"Represents a delivery item assigned to a customer"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"CommandAttemptDto":{"required":["command","gameserver_id","id","online_only","queued_at","rerun","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"]},"customer_name":{"type":["null","string"]},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"command_stage":{"type":["null","string"]},"command":{"type":"string"},"online_only":{"type":"boolean"},"rerun":{"type":"boolean"},"queued_at":{"type":"string","format":"date-time"},"executed_at":{"type":["null","string"],"format":"date-time"},"executed_by_ip":{"type":["null","string"]},"unqueued_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false}}}}
```

## The DeliveryItemProductDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DeliveryItemProductDto":{"required":["id","name","slug","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the product"},"slug":{"type":"string","description":"The URL-friendly slug of the product"},"version_id":{"type":"string","description":"The version identifier of the product"}},"additionalProperties":false,"description":"Represents the product information for a delivery item"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DeliveryItemStateDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DeliveryItemStateDto":{"enum":["usable","active","used","revoked","renewed"],"type":"string"}}}}
```

## The DimensionStatsEntryDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DimensionStatsEntryDto_V2":{"required":["dimension_id","line_count","quantity"],"type":"object","properties":{"dimension_id":{"$ref":"#/components/schemas/FlakeId"},"line_count":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int64"},"earnings":{"$ref":"#/components/schemas/MoneyDto_V2"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The DiscordActionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DiscordActionDto":{"required":["action_type","discord_server_id","execution_stage","id","product_id","product_version_id","revocation_stages","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"}}}}
```

## The DiscordActionExecutionStage object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"}}}}
```

## The DiscordActionRevocationStage object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"}}}}
```

## The DiscordActionType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"}}}}
```

## The DiscordProfileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DiscordProfileDto":{"required":["avatar_hash","discord_id","username"],"type":"object","properties":{"discord_id":{"$ref":"#/components/schemas/FlakeId"},"username":{"type":"string"},"avatar_hash":{"type":"string"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DiscordServerChannelDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DiscordServerChannelDto":{"required":["category","id","name"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"additionalProperties":false}}}}
```

## The DiscordServerLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DiscordServerLinkDto":{"required":["created_at","store_id","token"],"type":"object","properties":{"token":{"type":"string"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"server_id":{"$ref":"#/components/schemas/FlakeId"},"server_name":{"type":["null","string"]},"server_icon_url":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"linked_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DiscordServerRoleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DiscordServerRoleDto":{"required":["id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The DistributionEntryDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DistributionEntryDto_V2":{"required":["current","key"],"type":"object","properties":{"key":{"type":"string"},"current":{"$ref":"#/components/schemas/DistributionTotalsDto_V2"},"comparison":{"$ref":"#/components/schemas/DistributionTotalsDto_V2"}},"additionalProperties":false},"DistributionTotalsDto_V2":{"required":["order_count"],"type":"object","properties":{"order_count":{"type":"integer","format":"int64"},"gross_volume":{"$ref":"#/components/schemas/MoneyDto_V2"}},"additionalProperties":false},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The DistributionTotalsDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"DistributionTotalsDto_V2":{"required":["order_count"],"type":"object","properties":{"order_count":{"type":"integer","format":"int64"},"gross_volume":{"$ref":"#/components/schemas/MoneyDto_V2"}},"additionalProperties":false},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The ExecutedWebhookDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ExecutedWebhookDto":{"required":["id","started_at","status_code"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["null","string"],"format":"date-time"},"status_code":{"type":"integer","format":"int32"},"response":{"type":["null","string"]}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The FinishTagImageUploadUrlRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"FinishTagImageUploadUrlRequestDto":{"required":["image_id"],"type":"object","properties":{"image_id":{"type":"string","description":"The ID of the uploaded image returned by the server."}},"additionalProperties":false}}}}
```

## The FlakeId object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The GameServerConsoleConnectionStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GameServerConsoleConnectionStatusDto":{"enum":["unknown","disconnected","connecting","connected","backoff"],"type":"string"}}}}
```

## The GameServerConsoleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GameServerConsoleDto":{"required":["assigned_runner_id","connection_status","created_at","created_by","enabled","game_server_id","host","port","secure","store_id","type"],"type":"object","properties":{"game_server_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"assigned_runner_id":{"type":"string"},"connection_status":{"$ref":"#/components/schemas/GameServerConsoleConnectionStatusDto"},"last_heartbeat_at":{"type":["null","string"],"format":"date-time"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":["null","string"]},"secure":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"},"GameServerConsoleConnectionStatusDto":{"enum":["unknown","disconnected","connecting","connected","backoff"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The GameServerConsoleMessageDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GameServerConsoleMessageDto":{"required":["message","time","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/GameServerConsoleMessageTypeDto"},"message":{"type":"string"},"time":{"type":"string","format":"date-time"}},"additionalProperties":false},"GameServerConsoleMessageTypeDto":{"enum":["unknown","output","command","response","system"],"type":"string"}}}}
```

## The GameServerConsoleMessageTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GameServerConsoleMessageTypeDto":{"enum":["unknown","output","command","response","system"],"type":"string"}}}}
```

## The GameServerConsoleTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"}}}}
```

## The GameServerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The GameServerLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false}}}}
```

## The GetDimensionStatsResponseDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GetDimensionStatsResponseDto_V2":{"required":["dimension_type","entries","revenue_basis"],"type":"object","properties":{"dimension_type":{"$ref":"#/components/schemas/StatsDimensionTypeDto_V2"},"revenue_basis":{"$ref":"#/components/schemas/RevenueBasisDto_V2"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/DimensionStatsEntryDto_V2"}}},"additionalProperties":false},"StatsDimensionTypeDto_V2":{"enum":["unspecified","product","gameserver","tag","affiliate_link","coupon","giftcard","payout_id"],"type":"string"},"RevenueBasisDto_V2":{"enum":["unspecified","gross","gross_excluding_taxes","net"],"type":"string"},"DimensionStatsEntryDto_V2":{"required":["dimension_id","line_count","quantity"],"type":"object","properties":{"dimension_id":{"$ref":"#/components/schemas/FlakeId"},"line_count":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int64"},"earnings":{"$ref":"#/components/schemas/MoneyDto_V2"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The GetDistributionResponseDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GetDistributionResponseDto_V2":{"required":["distribution_type","entries"],"type":"object","properties":{"distribution_type":{"$ref":"#/components/schemas/StatsDistributionTypeDto_V2"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/DistributionEntryDto_V2"}}},"additionalProperties":false},"StatsDistributionTypeDto_V2":{"enum":["unspecified","order_country","payment_method","payment_acceptance"],"type":"string"},"DistributionEntryDto_V2":{"required":["current","key"],"type":"object","properties":{"key":{"type":"string"},"current":{"$ref":"#/components/schemas/DistributionTotalsDto_V2"},"comparison":{"$ref":"#/components/schemas/DistributionTotalsDto_V2"}},"additionalProperties":false},"DistributionTotalsDto_V2":{"required":["order_count"],"type":"object","properties":{"order_count":{"type":"integer","format":"int64"},"gross_volume":{"$ref":"#/components/schemas/MoneyDto_V2"}},"additionalProperties":false},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The GetTagImageUploadUrlResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GetTagImageUploadUrlResponseDto":{"required":["id","upload_url"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the direct image upload URL."},"upload_url":{"type":"string","description":"The URL to upload the image to."}},"additionalProperties":false}}}}
```

## The GiftCardDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GiftCardDto":{"required":["balance","code","enabled","id","starting_balance","store_id","usable_at"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the gift card is currently enabled and can be used."},"code":{"type":"string","description":"The unique code that customers use to redeem the gift card."},"note":{"type":["null","string"],"description":"Optional note or description associated with the gift card."},"balance":{"type":"integer","description":"The current balance remaining on the gift card in cents.","format":"int64"},"starting_balance":{"type":"integer","description":"The original balance when the gift card was first created in cents.","format":"int64"},"usable_at":{"type":"string","description":"The date and time when the gift card becomes usable.","format":"date-time"},"expires_at":{"type":["null","string"],"description":"The date and time when the gift card expires, if applicable.","format":"date-time"},"created_at":{"type":["null","string"],"description":"The date and time when the gift card was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the gift card was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"canceled_at":{"type":["null","string"],"description":"The date and time when the gift card was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a gift card in the PayNow system."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The GlobalCommandDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"GlobalCommandDto":{"required":["content","created_at","created_by","execution_rule","id","online_only","override_execute_on_gameserver_ids","stage","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"The actual command content to be executed."},"online_only":{"type":"boolean","description":"Indicates whether the command should only be executed when the player is online."},"override_execute_on_gameserver_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"List of specific game server IDs where this command should be executed, overriding default behavior."},"execution_rule":{"$ref":"#/components/schemas/ProductCommandExecutionRuleDto"},"created_at":{"type":"string","description":"Timestamp when the command was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"Optional timestamp indicating when the command was last updated.\nNull if the command has never been updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a global command in the system.\nGlobal commands are instructions that can be executed across a store's environment."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductCommandExecutionRuleDto":{"enum":["invalid","once_per_item","once_per_order"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The IdealDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"}}}}
```

## The InlineProductCreateDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"InlineProductCreateDto":{"type":"object","properties":{"slug":{"type":["null","string"],"description":"The unique URL-safe identifier (slug) for the product."},"name":{"type":["null","string"],"description":"The display name of the product."},"description":{"type":["null","string"],"description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"price":{"type":["null","integer"],"description":"The price of the product in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":["null","boolean"],"description":"Indicates whether the customer is prompted to select a game server before purchasing."},"allow_one_time_purchase":{"type":["null","boolean"],"description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":["null","boolean"],"description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":["null","integer"],"description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/UpsertProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/UpsertProductUpsellConfigurationDto"},"remove_after_enabled":{"type":["null","boolean"],"description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":["null","integer"],"description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The tag IDs associated with the product."},"gameservers":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The gameserver IDs associated with the product."},"commands":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution.\nRequires special approval."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.\nSet to `null` to keep enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.\nSet to `null` to keep enabled.","format":"date-time"},"required_product_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Optional inline product definition for dynamic products.\nRequires special approval, use `product_id` instead."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"UpsertProductTrialConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"],"description":"Indicates if trials should be enabled for the product."},"period_value":{"type":["null","integer"],"description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":["null","boolean"],"description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":["null","boolean"],"description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":["null","integer"],"description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":["null","boolean"],"description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":["null","integer"],"description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trials is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"UpsertProductUpsellConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"]},"recommendations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/UpsertProductUpsellRecommendationDto"}}},"additionalProperties":false},"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."}}}}
```

## The IntervalGameServerStatsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"IntervalGameServerStatsDto":{"required":["gameserver_id","store_id","sum_quantity","total_earnings","total_lines"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"total_lines":{"type":"integer","format":"int64"},"sum_quantity":{"type":"integer","format":"int64"},"total_earnings":{"type":"integer","format":"int64"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The IntervalProductStatsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"IntervalProductStatsDto":{"required":["product_id","store_id","sum_quantity","total_earnings","total_lines"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"total_lines":{"type":"integer","format":"int64"},"sum_quantity":{"type":"integer","format":"int64"},"total_earnings":{"type":"integer","format":"int64"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The IntervalTagStatsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"IntervalTagStatsDto":{"required":["store_id","sum_quantity","tag_id","total_earnings","total_lines"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"tag_id":{"$ref":"#/components/schemas/FlakeId"},"total_lines":{"type":"integer","format":"int64"},"sum_quantity":{"type":"integer","format":"int64"},"total_earnings":{"type":"integer","format":"int64"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The InvoiceDownloadUrlResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"InvoiceDownloadUrlResponseDto":{"required":["download_url"],"type":"object","properties":{"download_url":{"type":"string","description":"Temporary URL the invoice document can be downloaded from"}},"additionalProperties":false}}}}
```

## The InvoiceDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"InvoiceDto":{"required":["created_at","currency","customer_id","discount_amount","giftcard_usage_amount","id","issued_at","number","order_id","reference","status","store_id","subtotal_amount","tax_amount","total_amount","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"number":{"type":"integer","description":"Sequential number of the invoice within its store","format":"int64"},"reference":{"type":"string","description":"Human readable reference of the invoice"},"type":{"$ref":"#/components/schemas/InvoiceTypeDto"},"status":{"$ref":"#/components/schemas/InvoiceStatusDto"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"refund_id":{"$ref":"#/components/schemas/FlakeId"},"parent_invoice_id":{"$ref":"#/components/schemas/FlakeId"},"currency":{"type":"string","description":"Three-letter currency code of the invoice"},"discount_amount":{"type":"integer","description":"Total discount in smallest currency unit (e.g., cents)","format":"int64"},"subtotal_amount":{"type":"integer","description":"Total before tax in smallest currency unit","format":"int64"},"tax_amount":{"type":"integer","description":"Total tax in smallest currency unit","format":"int64"},"giftcard_usage_amount":{"type":"integer","description":"Amount paid using gift cards in smallest currency unit","format":"int64"},"total_amount":{"type":"integer","description":"Total of the invoice in smallest currency unit","format":"int64"},"file_key":{"type":["null","string"],"description":"Optional storage key of the generated invoice document"},"file_size":{"type":["null","integer"],"description":"Optional size of the generated invoice document in bytes","format":"int64"},"created_at":{"type":"string","description":"Date and time when the invoice was created","format":"date-time"},"issued_at":{"type":"string","description":"Date and time when the invoice was issued","format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"InvoiceTypeDto":{"enum":["invalid","invoice","credit_note"],"type":"string"},"InvoiceStatusDto":{"enum":["invalid","pending","generated","failed"],"type":"string"}}}}
```

## The InvoiceStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"InvoiceStatusDto":{"enum":["invalid","pending","generated","failed"],"type":"string"}}}}
```

## The InvoiceTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"InvoiceTypeDto":{"enum":["invalid","invoice","credit_note"],"type":"string"}}}}
```

## The KlarnaDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"}}}}
```

## The LastPaymentErrorDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"LastPaymentErrorDto":{"required":["decline_code","message"],"type":"object","properties":{"decline_code":{"$ref":"#/components/schemas/PaymentDeclineCode"},"message":{"type":"string","description":"Human-readable decline reason message."}},"additionalProperties":false,"description":"The last payment decline object."},"PaymentDeclineCode":{"enum":["unknown","generic_decline","call_issuer","authentication_required","currency_not_supported","duplicate_transaction","expired_card","fraudulent","incorrect_number","incorrect_cvc","incorrect_pin","incorrect_zip","insufficient_funds","invalid_account","invalid_amount","invalid_expiry_month","invalid_expiry_year","issuer_not_available","lost_card","merchant_blacklist","new_account_information_available","no_action_taken","pickup_card","pin_try_exceeded","restricted_card","stolen_card","testmode_decline","try_again_later","security_violation","card_velocity_exceeded","do_not_honor","processing_error","card_not_supported","transaction_not_allowed","authorization_revoked","store_blocked"],"type":"string","description":"A payment decline reason code."}}}}
```

## The LinkDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"}}}}
```

## The MarketingCouponConfigurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"}}}}
```

## The MoneyDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The NavLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"NavLinkDto":{"required":["name","node_id","tag_id","tag_slug"],"type":"object","properties":{"node_id":{"type":"string"},"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":["null","string"]},"tag_slug":{"type":"string"},"name":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The OrderCountryDistributionDataDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderCountryDistributionDataDto":{"required":["gross_volume","total_orders"],"type":"object","properties":{"total_orders":{"type":"integer","format":"int64"},"gross_volume":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The OrderCountryDistributionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderCountryDistributionDto":{"required":["country_code","current"],"type":"object","properties":{"country_code":{"type":"string"},"current":{"$ref":"#/components/schemas/OrderCountryDistributionDataDto"},"comparison":{"$ref":"#/components/schemas/OrderCountryDistributionDataDto"}},"additionalProperties":false},"OrderCountryDistributionDataDto":{"required":["gross_volume","total_orders"],"type":"object","properties":{"total_orders":{"type":"integer","format":"int64"},"gross_volume":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The OrderCouponUsageDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderCouponUsageDto":{"required":["coupon_id","coupon_version_id","usage_amount"],"type":"object","properties":{"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"coupon_version_id":{"$ref":"#/components/schemas/FlakeId"},"usage_amount":{"type":"integer","format":"int64"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The OrderDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderDto":{"required":["applied_coupons","applied_giftcards","billing_country","billing_cycle_sequence","billing_email","billing_name","currency","customer","customer_id","customer_ip","discount_amount","discount_amount_str","giftcard_usage_amount","giftcard_usage_amount_str","id","is_subscription","lines","presentment_currency","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","pretty_id","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_jurisdictions","total_amount","total_amount_str","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The PayNow order ID identifier starting with pn-."},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"type":{"$ref":"#/components/schemas/OrderType"},"status":{"$ref":"#/components/schemas/OrderStatus"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_token":{"type":["null","string"],"description":"The checkout token for this order"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"is_subscription":{"type":"boolean","description":"Signifies if the order is a subscription order","readOnly":true},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"applied_coupons":{"type":"array","items":{"$ref":"#/components/schemas/OrderCouponUsageDto"},"description":"Applied coupons to this order"},"giftcard_id":{"$ref":"#/components/schemas/FlakeId"},"applied_giftcards":{"type":"array","items":{"$ref":"#/components/schemas/OrderGiftCardUsageDto"},"description":"Applied gift cards to this order"},"affiliate_id":{"$ref":"#/components/schemas/FlakeId"},"billing_name":{"type":"string","description":"The billing name for this order"},"billing_email":{"type":"string","description":"The billing email for this order"},"billing_country":{"type":"string","description":"The billing country for this order"},"billing_tax_id":{"type":["null","string"],"description":"The tax identification number used for this order (for B2B transactions)"},"billing_cycle_sequence":{"type":"integer","description":"The billing cycle sequence (current renewal count) if this is a subscription order","format":"int32"},"customer_ip":{"type":"string","description":"The IP address (IPv4 or IPv6) of the customer at time of order"},"currency":{"type":"string","description":"The currency code used for this order"},"discount_amount":{"type":"integer","description":"The total discount amount applied to this order in smallest currency unit","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order in smallest currency unit","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order in smallest currency unit","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order in smallest currency unit","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card value used for this order in smallest currency unit","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"presentment_currency":{"type":"string","description":"The presentment currency code used for this order (currency shown to customer)"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount in smallest currency unit","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount in smallest currency unit","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount in smallest currency unit","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount in smallest currency unit","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount in smallest currency unit","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"created_at":{"type":["null","string"],"description":"The date and time when this order was created","format":"date-time"},"completed_at":{"type":["null","string"],"description":"The date and time when this order was completed, if applicable","format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineDto"},"description":"The line items in this order"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"A list of all tax jurisdictions that were involved in the taxation of this order."},"last_payment_error":{"$ref":"#/components/schemas/LastPaymentErrorDto"}},"additionalProperties":false,"description":"Represents a customer order"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"OrderType":{"enum":["one_time","subscription_initial","subscription_renewal","subscription_proration","mixed"],"type":"string","description":"Defines the type of items contained in an order"},"OrderStatus":{"enum":["created","completed","canceled","refunded","chargeback"],"type":"string"},"OrderCouponUsageDto":{"required":["coupon_id","coupon_version_id","usage_amount"],"type":"object","properties":{"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"coupon_version_id":{"$ref":"#/components/schemas/FlakeId"},"usage_amount":{"type":"integer","format":"int64"}},"additionalProperties":false},"OrderGiftCardUsageDto":{"required":["giftcard_id","usage_amount"],"type":"object","properties":{"giftcard_id":{"$ref":"#/components/schemas/FlakeId"},"usage_amount":{"type":"integer","format":"int64"}},"additionalProperties":false},"OrderLineDto":{"required":["discount_amount","discount_amount_str","gift","giftcard_usage_amount","giftcard_usage_amount_str","id","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","price","price_str","product_id","product_name","product_version_id","quantity","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product in this order line"},"product_image_url":{"type":["null","string"],"description":"The URL of the product image"},"description":{"type":["null","string"],"description":"Customer-presentable description of the order line."},"created_giftcard_id":{"type":["null","string"],"description":"The Gift Card ID of that product in this order line"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_change_line_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_interval_value":{"type":["null","integer"],"description":"The interval value for subscription products","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"gift":{"type":"boolean","description":"Indicates whether this order line is a gift"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/CustomerDto"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"price":{"type":"integer","description":"The unit price of the product in the smallest currency unit (e.g., cents)","format":"int32"},"price_str":{"type":"string","description":"The unit price of the product formatted as a string"},"quantity":{"type":"integer","description":"The quantity of the product in this order line","format":"int32"},"discount_amount":{"type":"integer","description":"The discount amount (from sales, coupons, and affiliate links) applied to this order line","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card used for this order line","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order line","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order line","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order line","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount for this order line","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount for this order line","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount for this order line","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount for this order line","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount for this order line","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price, or added on top"},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/OrderLinePayoutSplitDto"},"description":"The payout splits for this order line"},"pricing_region_id":{"type":["null","string"],"description":"The regional pricing region ID for this order line, null if no regional pricing set"},"custom_variables":{"type":["null","object"],"additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Key-value pair of selected custom variables for this order."}},"additionalProperties":false,"description":"Represents an order line item in a customer's order"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"OrderLinePayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage in basis points.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage in basis points.\nOnly used by platforms.","format":"int64"}},"additionalProperties":false,"description":"Represents an order line-level payout split."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"LastPaymentErrorDto":{"required":["decline_code","message"],"type":"object","properties":{"decline_code":{"$ref":"#/components/schemas/PaymentDeclineCode"},"message":{"type":"string","description":"Human-readable decline reason message."}},"additionalProperties":false,"description":"The last payment decline object."},"PaymentDeclineCode":{"enum":["unknown","generic_decline","call_issuer","authentication_required","currency_not_supported","duplicate_transaction","expired_card","fraudulent","incorrect_number","incorrect_cvc","incorrect_pin","incorrect_zip","insufficient_funds","invalid_account","invalid_amount","invalid_expiry_month","invalid_expiry_year","issuer_not_available","lost_card","merchant_blacklist","new_account_information_available","no_action_taken","pickup_card","pin_try_exceeded","restricted_card","stolen_card","testmode_decline","try_again_later","security_violation","card_velocity_exceeded","do_not_honor","processing_error","card_not_supported","transaction_not_allowed","authorization_revoked","store_blocked"],"type":"string","description":"A payment decline reason code."}}}}
```

## The OrderGiftCardUsageDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderGiftCardUsageDto":{"required":["giftcard_id","usage_amount"],"type":"object","properties":{"giftcard_id":{"$ref":"#/components/schemas/FlakeId"},"usage_amount":{"type":"integer","format":"int64"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The OrderLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderLineDto":{"required":["discount_amount","discount_amount_str","gift","giftcard_usage_amount","giftcard_usage_amount_str","id","presentment_discount_amount","presentment_discount_amount_str","presentment_giftcard_usage_amount","presentment_giftcard_usage_amount_str","presentment_subtotal_amount","presentment_subtotal_amount_str","presentment_tax_amount","presentment_tax_amount_str","presentment_total_amount","presentment_total_amount_str","price","price_str","product_id","product_name","product_version_id","quantity","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product in this order line"},"product_image_url":{"type":["null","string"],"description":"The URL of the product image"},"description":{"type":["null","string"],"description":"Customer-presentable description of the order line."},"created_giftcard_id":{"type":["null","string"],"description":"The Gift Card ID of that product in this order line"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_change_line_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_interval_value":{"type":["null","integer"],"description":"The interval value for subscription products","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"gift":{"type":"boolean","description":"Indicates whether this order line is a gift"},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/CustomerDto"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"price":{"type":"integer","description":"The unit price of the product in the smallest currency unit (e.g., cents)","format":"int32"},"price_str":{"type":"string","description":"The unit price of the product formatted as a string"},"quantity":{"type":"integer","description":"The quantity of the product in this order line","format":"int32"},"discount_amount":{"type":"integer","description":"The discount amount (from sales, coupons, and affiliate links) applied to this order line","format":"int32"},"discount_amount_str":{"type":"string","description":"The discount amount formatted as a string"},"giftcard_usage_amount":{"type":"integer","description":"The amount of gift card used for this order line","format":"int32"},"giftcard_usage_amount_str":{"type":"string","description":"The gift card usage amount formatted as a string"},"subtotal_amount":{"type":"integer","description":"The subtotal amount for this order line","format":"int32"},"subtotal_amount_str":{"type":"string","description":"The subtotal amount formatted as a string"},"tax_amount":{"type":"integer","description":"The tax amount for this order line","format":"int32"},"tax_amount_str":{"type":"string","description":"The tax amount formatted as a string"},"total_amount":{"type":"integer","description":"The total amount for this order line","format":"int32"},"total_amount_str":{"type":"string","description":"The total amount formatted as a string"},"presentment_subtotal_amount":{"type":"integer","description":"The presentment subtotal amount for this order line","format":"int32"},"presentment_subtotal_amount_str":{"type":"string","description":"The presentment subtotal amount formatted as a string","readOnly":true},"presentment_discount_amount":{"type":"integer","description":"The presentment discount amount for this order line","format":"int32"},"presentment_discount_amount_str":{"type":"string","description":"The presentment discount amount formatted as a string","readOnly":true},"presentment_tax_amount":{"type":"integer","description":"The presentment tax amount for this order line","format":"int32"},"presentment_tax_amount_str":{"type":"string","description":"The presentment tax amount formatted as a string","readOnly":true},"presentment_giftcard_usage_amount":{"type":"integer","description":"The presentment gift card usage amount for this order line","format":"int32"},"presentment_giftcard_usage_amount_str":{"type":"string","description":"The presentment gift card usage amount formatted as a string","readOnly":true},"presentment_total_amount":{"type":"integer","description":"The presentment total amount for this order line","format":"int32"},"presentment_total_amount_str":{"type":"string","description":"The presentment total amount formatted as a string","readOnly":true},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price, or added on top"},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/OrderLinePayoutSplitDto"},"description":"The payout splits for this order line"},"pricing_region_id":{"type":["null","string"],"description":"The regional pricing region ID for this order line, null if no regional pricing set"},"custom_variables":{"type":["null","object"],"additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Key-value pair of selected custom variables for this order."}},"additionalProperties":false,"description":"Represents an order line item in a customer's order"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"OrderLinePayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage in basis points.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage in basis points.\nOnly used by platforms.","format":"int64"}},"additionalProperties":false,"description":"Represents an order line-level payout split."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false}}}}
```

## The OrderLinePayoutSplitDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderLinePayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage in basis points.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage in basis points.\nOnly used by platforms.","format":"int64"}},"additionalProperties":false,"description":"Represents an order line-level payout split."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The OrderStatus object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderStatus":{"enum":["created","completed","canceled","refunded","chargeback"],"type":"string"}}}}
```

## The OrderType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrderType":{"enum":["one_time","subscription_initial","subscription_renewal","subscription_proration","mixed"],"type":"string","description":"Defines the type of items contained in an order"}}}}
```

## The OrdersSummaryDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrdersSummaryDto_V2":{"required":["lifetime_order_count","month_to_date_order_count","previous_month_order_count","revenue_basis","today_order_count","yesterday_order_count"],"type":"object","properties":{"revenue_basis":{"$ref":"#/components/schemas/RevenueBasisDto_V2"},"today_revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"today_order_count":{"type":"integer","format":"int64"},"yesterday_revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"yesterday_order_count":{"type":"integer","format":"int64"},"month_to_date_revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"month_to_date_order_count":{"type":"integer","format":"int64"},"previous_month_revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"previous_month_order_count":{"type":"integer","format":"int64"},"lifetime_revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"lifetime_order_count":{"type":"integer","format":"int64"},"lifetime_average_order_value":{"$ref":"#/components/schemas/MoneyDto_V2"}},"additionalProperties":false},"RevenueBasisDto_V2":{"enum":["unspecified","gross","gross_excluding_taxes","net"],"type":"string"},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The OrdersSummaryForRangeDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"OrdersSummaryForRangeDto_V2":{"required":["order_count","revenue_basis"],"type":"object","properties":{"revenue_basis":{"$ref":"#/components/schemas/RevenueBasisDto_V2"},"revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"average_order_value":{"$ref":"#/components/schemas/MoneyDto_V2"},"order_count":{"type":"integer","format":"int64"}},"additionalProperties":false},"RevenueBasisDto_V2":{"enum":["unspecified","gross","gross_excluding_taxes","net"],"type":"string"},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The P24DetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"}}}}
```

## The PayByBankDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"}}}}
```

## The PayNowActorType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The PayNowError object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## The PayPalDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"}}}}
```

## The PaymentAcceptanceDistributionDataDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentAcceptanceDistributionDataDto":{"required":["gross_volume","total_orders"],"type":"object","properties":{"total_orders":{"type":"integer","format":"int64"},"gross_volume":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The PaymentAcceptanceDistributionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentAcceptanceDistributionDto":{"required":["current","payment_status"],"type":"object","properties":{"payment_status":{"type":"string"},"current":{"$ref":"#/components/schemas/PaymentAcceptanceDistributionDataDto"},"comparison":{"$ref":"#/components/schemas/PaymentAcceptanceDistributionDataDto"}},"additionalProperties":false},"PaymentAcceptanceDistributionDataDto":{"required":["gross_volume","total_orders"],"type":"object","properties":{"total_orders":{"type":"integer","format":"int64"},"gross_volume":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The PaymentChargebackStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentChargebackStatusDto":{"enum":["none","pending","won","lost"],"type":"string","description":"Represents chargeback status of a payment"}}}}
```

## The PaymentDeclineCode object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentDeclineCode":{"enum":["unknown","generic_decline","call_issuer","authentication_required","currency_not_supported","duplicate_transaction","expired_card","fraudulent","incorrect_number","incorrect_cvc","incorrect_pin","incorrect_zip","insufficient_funds","invalid_account","invalid_amount","invalid_expiry_month","invalid_expiry_year","issuer_not_available","lost_card","merchant_blacklist","new_account_information_available","no_action_taken","pickup_card","pin_try_exceeded","restricted_card","stolen_card","testmode_decline","try_again_later","security_violation","card_velocity_exceeded","do_not_honor","processing_error","card_not_supported","transaction_not_allowed","authorization_revoked","store_blocked"],"type":"string","description":"A payment decline reason code."}}}}
```

## The PaymentDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentDto":{"required":["amount","chargeback_status","created_at","currency","customer","customer_id","gateway","gateway_entity_identifier","gateway_fee_amount","gateway_id","id","method","order_id","platform_fee_amount","platform_fee_rate","presentment_amount","presentment_currency","status","store_id","store_net_amount","tax_amount"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"refunds":{"type":["null","array"],"items":{"$ref":"#/components/schemas/RefundDto"},"description":"The list of refunds associated with this payment"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"gateway_id":{"type":"string","description":"The gateway payment identifier"},"method":{"$ref":"#/components/schemas/PaymentMethodDto"},"method_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/PaymentStatusDto"},"currency":{"type":"string","description":"The currency code used for this payment in the store's currency"},"amount":{"type":"integer","description":"The total payment amount in smallest currency unit","format":"int32"},"gateway_fee_amount":{"type":"integer","description":"The gateway fee amount in smallest currency unit","format":"int32"},"tax_amount":{"type":"integer","description":"The tax amount in smallest currency unit","format":"int32"},"platform_fee_amount":{"type":"integer","description":"The platform fee amount in smallest currency unit","format":"int32"},"store_net_amount":{"type":"integer","description":"The net amount going to the store in smallest currency unit","format":"int32"},"presentment_currency":{"type":"string","description":"The currency code used for presentment to the customer"},"presentment_amount":{"type":"integer","description":"The amount presented to the customer in smallest currency unit","format":"int32"},"fx_rate":{"type":["null","number"],"description":"The foreign exchange rate used for currency conversion","format":"double"},"platform_fee_rate":{"type":"integer","description":"The platform fee rate applied to this payment (in basis points)","format":"int32"},"chargeback_status":{"$ref":"#/components/schemas/PaymentChargebackStatusDto"},"chargeback_status_updated_at":{"type":["null","string"],"description":"The date and time when the chargeback status was last updated","format":"date-time"},"payout_split_rules":{"type":["null","array"],"items":{"$ref":"#/components/schemas/PaymentPayoutSplitRuleDto"},"description":"The payout split rules for multi-party payments"},"payout_split_results":{"type":["null","array"],"items":{"$ref":"#/components/schemas/PaymentPayoutSplitResultDto"},"description":"The payout split results for multi-party payments"},"created_at":{"type":"string","description":"The date and time when this payment was created","format":"date-time"},"pending_at":{"type":["null","string"],"description":"The date and time when this payment entered pending status","format":"date-time"},"completed_at":{"type":["null","string"],"description":"The date and time when this payment was completed","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"The date and time when this payment was canceled","format":"date-time"},"failed_at":{"type":["null","string"],"description":"The date and time when this payment failed","format":"date-time"},"refunded_at":{"type":["null","string"],"description":"The date and time when this payment was last refunded","format":"date-time"},"chargeback_at":{"type":["null","string"],"description":"The date and time when a chargeback was initiated on this payment","format":"date-time"},"last_payment_error":{"$ref":"#/components/schemas/LastPaymentErrorDto"}},"additionalProperties":false,"description":"Represents a payment transaction"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"RefundDto":{"required":["amount","amount_str","created_at","currency","customer_id","gateway_fee_amount","gateway_fee_amount_str","id","payment_id","platform_fee_amount","platform_fee_amount_str","refund_from_connected_user_balance","status","store_id","store_net_amount","store_net_amount_str","store_refund_amount","store_refund_amount_str","tax_amount","tax_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"payment_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/RefundStatus"},"failure_reason":{"type":["null","string"],"description":"Reason for failure if the refund has failed"},"currency":{"type":"string","description":"Three-letter currency code of the refund"},"amount":{"type":"integer","description":"Amount of the refund in smallest currency unit (e.g., cents)","format":"int64"},"amount_str":{"type":"string","description":"String representation of the refund amount, formatted for display"},"gateway_fee_amount":{"type":"integer","description":"Amount of payment processor fees in smallest currency unit","format":"int64"},"gateway_fee_amount_str":{"type":"string","description":"String representation of gateway fee amount, formatted for display"},"tax_amount":{"type":"integer","description":"Amount of tax being refunded in smallest currency unit","format":"int64"},"tax_amount_str":{"type":"string","description":"String representation of tax amount, formatted for display"},"platform_fee_amount":{"type":"integer","description":"Amount of platform fees in smallest currency unit","format":"int64"},"platform_fee_amount_str":{"type":"string","description":"String representation of platform fee amount, formatted for display"},"store_net_amount":{"type":"integer","description":"Net amount for the store after fees in smallest currency unit","format":"int64"},"store_net_amount_str":{"type":"string","description":"String representation of store net amount, formatted for display"},"store_refund_amount":{"type":"integer","description":"Amount of the refund to be paid by the store in smallest currency unit","format":"int64"},"store_refund_amount_str":{"type":"string","description":"String representation of store refund amount, formatted for display"},"presentment_currency":{"type":["null","string"],"description":"Optional currency code used for presentment to the customer if different from the base currency"},"presentment_amount":{"type":["null","integer"],"description":"Optional amount in presentment currency in smallest currency unit","format":"int64"},"fx_rate":{"type":["null","string"],"description":"Exchange rate used while refunding. Only present for payments made in non-settlement currency."},"refund_from_connected_user_balance":{"type":"boolean","description":"Indicates whether the refund should be taken from the connected user's balance.\nOnly relevant for platforms."},"created_at":{"type":"string","description":"Date and time when the refund was created","format":"date-time"},"approved_at":{"type":["null","string"],"description":"Optional date and time when the refund was approved","format":"date-time"},"pending_at":{"type":["null","string"],"description":"Optional date and time when the refund entered pending status","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Optional date and time when the refund was completed","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Optional date and time when the refund was canceled","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Optional date and time when the refund failed","format":"date-time"}},"additionalProperties":false},"RefundStatus":{"enum":["created","approved","processing","completed","canceled","failed"],"type":"string","description":"Represents the current status of a refund in the system"},"PaymentMethodDto":{"required":["created_at","customer_id","gateway","gateway_customer_id","gateway_entity_identifier","gateway_id","gateway_type","id","method_details","method_type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_id":{"type":"string","description":"The gateway's identifier for this payment method"},"gateway_customer_id":{"type":"string","description":"The gateway's customer identifier"},"gateway_type":{"type":"string","description":"The gateway-specific type identifier"},"method_type":{"type":"string","description":"The payment method type"},"method_details":{"$ref":"#/components/schemas/PaymentMethodDetailsDto"},"created_at":{"type":"string","description":"The date and time when this payment method was created","format":"date-time"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"updated_at":{"type":["null","string"],"description":"The date and time when this payment method was last updated","format":"date-time"}},"additionalProperties":false,"description":"Represents a stored payment method"},"PaymentMethodDetailsDto":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/CardDetailsDto"},"cashapp":{"$ref":"#/components/schemas/CashAppDetailsDto"},"paypal":{"$ref":"#/components/schemas/PayPalDetailsDto"},"link":{"$ref":"#/components/schemas/LinkDetailsDto"},"crypto":{"$ref":"#/components/schemas/CryptoDetailsDto"},"steamskins":{"$ref":"#/components/schemas/SteamSkinsDetailsDto"},"ideal":{"$ref":"#/components/schemas/IdealDetailsDto"},"p24":{"$ref":"#/components/schemas/P24DetailsDto"},"bancontact":{"$ref":"#/components/schemas/BancontactDetailsDto"},"klarna":{"$ref":"#/components/schemas/KlarnaDetailsDto"},"alipay":{"$ref":"#/components/schemas/AlipayDetailsDto"},"pay_by_bank":{"$ref":"#/components/schemas/PayByBankDetailsDto"},"pix":{"$ref":"#/components/schemas/PixDetailsDto"},"paysafecard":{"$ref":"#/components/schemas/PaysafeCardDetailsDto"}},"additionalProperties":false,"description":"Contains detailed information about a payment method.\nDISCLAIMER: These fields are not guaranteed to be backwards compatible and may change or be removed without notice."},"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"},"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"},"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"},"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"},"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"},"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false},"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"},"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"},"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"},"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"},"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"},"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"},"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"},"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"},"PaymentStatusDto":{"enum":["unknown","created","pending","completed","canceled","failed","refunded","chargeback","refund_failed","refund_processing"],"type":"string","description":"Represents payment status"},"PaymentChargebackStatusDto":{"enum":["none","pending","won","lost"],"type":"string","description":"Represents chargeback status of a payment"},"PaymentPayoutSplitRuleDto":{"required":["line_amount_tax","line_amount_total","line_id","splits"],"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/FlakeId"},"line_amount_total":{"type":"integer","description":"The total amount of the line item in smallest currency unit","format":"int32"},"line_amount_tax":{"type":"integer","description":"The tax amount of the line item in smallest currency unit","format":"int32"},"splits":{"type":"array","items":{"$ref":"#/components/schemas/PaymentPayoutSplitRuleSplitDto"},"description":"The list of splits defining how the payout should be divided"}},"additionalProperties":false,"description":"Represents payout split rules for a payment line"},"PaymentPayoutSplitRuleSplitDto":{"required":["platform_fee_percentage","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)","format":"int32"},"platform_fee_percentage":{"type":"integer","description":"The platform fee percentage applied to this split (in basis points)","format":"int32"}},"additionalProperties":false,"description":"Represents a single split configuration within a payout split rule"},"PaymentPayoutSplitResultDto":{"required":["connected_platform_fee_amount","gateway_fee_amount","gross_amount","line_id","net_amount","platform_fee_amount","tax_amount","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"gross_amount":{"type":"integer","description":"The gross amount before fees in smallest currency unit","format":"int32"},"tax_amount":{"type":"integer","description":"The tax amount in smallest currency unit","format":"int32"},"gateway_fee_amount":{"type":"integer","description":"The gateway fee amount in smallest currency unit","format":"int32"},"platform_fee_amount":{"type":"integer","description":"The platform fee amount in smallest currency unit","format":"int32"},"connected_platform_fee_amount":{"type":"integer","description":"The connected platform fee amount in smallest currency unit","format":"int32"},"net_amount":{"type":"integer","description":"The net amount after all fees in smallest currency unit","format":"int32"},"line_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents payout split results for multi-party payments"},"LastPaymentErrorDto":{"required":["decline_code","message"],"type":"object","properties":{"decline_code":{"$ref":"#/components/schemas/PaymentDeclineCode"},"message":{"type":"string","description":"Human-readable decline reason message."}},"additionalProperties":false,"description":"The last payment decline object."},"PaymentDeclineCode":{"enum":["unknown","generic_decline","call_issuer","authentication_required","currency_not_supported","duplicate_transaction","expired_card","fraudulent","incorrect_number","incorrect_cvc","incorrect_pin","incorrect_zip","insufficient_funds","invalid_account","invalid_amount","invalid_expiry_month","invalid_expiry_year","issuer_not_available","lost_card","merchant_blacklist","new_account_information_available","no_action_taken","pickup_card","pin_try_exceeded","restricted_card","stolen_card","testmode_decline","try_again_later","security_violation","card_velocity_exceeded","do_not_honor","processing_error","card_not_supported","transaction_not_allowed","authorization_revoked","store_blocked"],"type":"string","description":"A payment decline reason code."}}}}
```

## The PaymentGatewayDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentGatewayDto":{"enum":["invalid","stripe","paypal","forumpay","steamskins","nuvei","pagseguro","tazapay","paysafe","checkoutcom"],"type":"string"}}}}
```

## The PaymentMethodChargebackRateDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodChargebackRateDto_V2":{"required":["chargeback_rate","method_type"],"type":"object","properties":{"method_type":{"type":"string"},"chargeback_rate":{"type":"number","format":"float"}},"additionalProperties":false}}}}
```

## The PaymentMethodDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodDetailsDto":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/CardDetailsDto"},"cashapp":{"$ref":"#/components/schemas/CashAppDetailsDto"},"paypal":{"$ref":"#/components/schemas/PayPalDetailsDto"},"link":{"$ref":"#/components/schemas/LinkDetailsDto"},"crypto":{"$ref":"#/components/schemas/CryptoDetailsDto"},"steamskins":{"$ref":"#/components/schemas/SteamSkinsDetailsDto"},"ideal":{"$ref":"#/components/schemas/IdealDetailsDto"},"p24":{"$ref":"#/components/schemas/P24DetailsDto"},"bancontact":{"$ref":"#/components/schemas/BancontactDetailsDto"},"klarna":{"$ref":"#/components/schemas/KlarnaDetailsDto"},"alipay":{"$ref":"#/components/schemas/AlipayDetailsDto"},"pay_by_bank":{"$ref":"#/components/schemas/PayByBankDetailsDto"},"pix":{"$ref":"#/components/schemas/PixDetailsDto"},"paysafecard":{"$ref":"#/components/schemas/PaysafeCardDetailsDto"}},"additionalProperties":false,"description":"Contains detailed information about a payment method.\nDISCLAIMER: These fields are not guaranteed to be backwards compatible and may change or be removed without notice."},"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"},"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"},"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"},"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"},"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"},"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false},"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"},"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"},"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"},"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"},"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"},"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"},"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"},"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"}}}}
```

## The PaymentMethodDistributionDataDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodDistributionDataDto":{"required":["gross_volume"],"type":"object","properties":{"gross_volume":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The PaymentMethodDistributionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodDistributionDto":{"required":["current","method_type"],"type":"object","properties":{"method_type":{"type":"string"},"current":{"$ref":"#/components/schemas/PaymentMethodDistributionDataDto"},"comparison":{"$ref":"#/components/schemas/PaymentMethodDistributionDataDto"}},"additionalProperties":false},"PaymentMethodDistributionDataDto":{"required":["gross_volume"],"type":"object","properties":{"gross_volume":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The PaymentMethodDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodDto":{"required":["created_at","customer_id","gateway","gateway_customer_id","gateway_entity_identifier","gateway_id","gateway_type","id","method_details","method_type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_id":{"type":"string","description":"The gateway's identifier for this payment method"},"gateway_customer_id":{"type":"string","description":"The gateway's customer identifier"},"gateway_type":{"type":"string","description":"The gateway-specific type identifier"},"method_type":{"type":"string","description":"The payment method type"},"method_details":{"$ref":"#/components/schemas/PaymentMethodDetailsDto"},"created_at":{"type":"string","description":"The date and time when this payment method was created","format":"date-time"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"updated_at":{"type":["null","string"],"description":"The date and time when this payment method was last updated","format":"date-time"}},"additionalProperties":false,"description":"Represents a stored payment method"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PaymentMethodDetailsDto":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/CardDetailsDto"},"cashapp":{"$ref":"#/components/schemas/CashAppDetailsDto"},"paypal":{"$ref":"#/components/schemas/PayPalDetailsDto"},"link":{"$ref":"#/components/schemas/LinkDetailsDto"},"crypto":{"$ref":"#/components/schemas/CryptoDetailsDto"},"steamskins":{"$ref":"#/components/schemas/SteamSkinsDetailsDto"},"ideal":{"$ref":"#/components/schemas/IdealDetailsDto"},"p24":{"$ref":"#/components/schemas/P24DetailsDto"},"bancontact":{"$ref":"#/components/schemas/BancontactDetailsDto"},"klarna":{"$ref":"#/components/schemas/KlarnaDetailsDto"},"alipay":{"$ref":"#/components/schemas/AlipayDetailsDto"},"pay_by_bank":{"$ref":"#/components/schemas/PayByBankDetailsDto"},"pix":{"$ref":"#/components/schemas/PixDetailsDto"},"paysafecard":{"$ref":"#/components/schemas/PaysafeCardDetailsDto"}},"additionalProperties":false,"description":"Contains detailed information about a payment method.\nDISCLAIMER: These fields are not guaranteed to be backwards compatible and may change or be removed without notice."},"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"},"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"},"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"},"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"},"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"},"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false},"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"},"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"},"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"},"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"},"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"},"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"},"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"},"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"}}}}
```

## The PaymentMethodTypeApprovalStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodTypeApprovalStatusDto":{"enum":["invalid","pending","approved","rejected"],"type":"string"}}}}
```

## The PaymentMethodTypeCountryCurrencyMappingDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodTypeCountryCurrencyMappingDto":{"required":["country","currencies"],"type":"object","properties":{"country":{"type":"string"},"currencies":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}}
```

## The PaymentMethodTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodTypeDto":{"required":["approval_required","b2b_supported","b2c_supported","category","confirmation","country_currency_mapping","enabled","fee_overrides","gateways","id","kyc_required","name","refunds_supported","revenue_usage","subscriptions_supported","supported_countries","supported_currencies","supported_settlement_currencies"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"logo_url":{"type":["null","string"]},"checkout_logo_url_light":{"type":["null","string"]},"checkout_logo_url_dark":{"type":["null","string"]},"category":{"type":"string"},"confirmation":{"type":"string"},"enabled":{"type":"boolean"},"refunds_supported":{"type":"boolean"},"subscriptions_supported":{"type":"boolean"},"kyc_required":{"type":"boolean"},"supported_currencies":{"type":"array","items":{"type":"string"}},"supported_settlement_currencies":{"type":"array","items":{"type":"string"}},"supported_countries":{"type":"array","items":{"type":"string"}},"gateways":{"type":"array","items":{"$ref":"#/components/schemas/PaymentGatewayDto"}},"fee_overrides":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodTypeFeeOverrideDto"}},"country_currency_mapping":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodTypeCountryCurrencyMappingDto"}},"revenue_usage":{"type":"integer","format":"int64"},"monthly_revenue_limit":{"type":["null","integer"],"format":"int64"},"default_monthly_revenue_limit":{"type":["null","integer"],"format":"int64"},"settlement_time":{"type":["null","string"]},"min_transaction_amount":{"type":["null","integer"],"format":"int64"},"max_transaction_amount":{"type":["null","integer"],"format":"int64"},"b2c_supported":{"type":"boolean"},"b2b_supported":{"type":"boolean"},"approval_required":{"type":"boolean"},"approval_status":{"$ref":"#/components/schemas/PaymentMethodTypeApprovalStatusDto"},"approval_decline_reason":{"type":["null","string"]},"approval_requested_at":{"type":["null","string"],"format":"date-time"},"approval_decided_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PaymentGatewayDto":{"enum":["invalid","stripe","paypal","forumpay","steamskins","nuvei","pagseguro","tazapay","paysafe","checkoutcom"],"type":"string"},"PaymentMethodTypeFeeOverrideDto":{"required":["countries","fee_cents","fee_percentage"],"type":"object","properties":{"fee_percentage":{"type":"integer","format":"int32"},"fee_cents":{"type":"integer","format":"int32"},"countries":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"PaymentMethodTypeCountryCurrencyMappingDto":{"required":["country","currencies"],"type":"object","properties":{"country":{"type":"string"},"currencies":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"PaymentMethodTypeApprovalStatusDto":{"enum":["invalid","pending","approved","rejected"],"type":"string"}}}}
```

## The PaymentMethodTypeFeeOverrideDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentMethodTypeFeeOverrideDto":{"required":["countries","fee_cents","fee_percentage"],"type":"object","properties":{"fee_percentage":{"type":"integer","format":"int32"},"fee_cents":{"type":"integer","format":"int32"},"countries":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}}
```

## The PaymentPayoutSplitResultDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentPayoutSplitResultDto":{"required":["connected_platform_fee_amount","gateway_fee_amount","gross_amount","line_id","net_amount","platform_fee_amount","tax_amount","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"gross_amount":{"type":"integer","description":"The gross amount before fees in smallest currency unit","format":"int32"},"tax_amount":{"type":"integer","description":"The tax amount in smallest currency unit","format":"int32"},"gateway_fee_amount":{"type":"integer","description":"The gateway fee amount in smallest currency unit","format":"int32"},"platform_fee_amount":{"type":"integer","description":"The platform fee amount in smallest currency unit","format":"int32"},"connected_platform_fee_amount":{"type":"integer","description":"The connected platform fee amount in smallest currency unit","format":"int32"},"net_amount":{"type":"integer","description":"The net amount after all fees in smallest currency unit","format":"int32"},"line_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents payout split results for multi-party payments"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The PaymentPayoutSplitRuleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentPayoutSplitRuleDto":{"required":["line_amount_tax","line_amount_total","line_id","splits"],"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/FlakeId"},"line_amount_total":{"type":"integer","description":"The total amount of the line item in smallest currency unit","format":"int32"},"line_amount_tax":{"type":"integer","description":"The tax amount of the line item in smallest currency unit","format":"int32"},"splits":{"type":"array","items":{"$ref":"#/components/schemas/PaymentPayoutSplitRuleSplitDto"},"description":"The list of splits defining how the payout should be divided"}},"additionalProperties":false,"description":"Represents payout split rules for a payment line"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PaymentPayoutSplitRuleSplitDto":{"required":["platform_fee_percentage","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)","format":"int32"},"platform_fee_percentage":{"type":"integer","description":"The platform fee percentage applied to this split (in basis points)","format":"int32"}},"additionalProperties":false,"description":"Represents a single split configuration within a payout split rule"}}}}
```

## The PaymentPayoutSplitRuleSplitDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentPayoutSplitRuleSplitDto":{"required":["platform_fee_percentage","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the line amount this user receives (in basis points, e.g., 5000 = 50%)","format":"int32"},"platform_fee_percentage":{"type":"integer","description":"The platform fee percentage applied to this split (in basis points)","format":"int32"}},"additionalProperties":false,"description":"Represents a single split configuration within a payout split rule"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The PaymentPopularTimesOfDayDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentPopularTimesOfDayDto":{"required":["hour","total","weekday"],"type":"object","properties":{"weekday":{"type":"string"},"hour":{"type":"string"},"total":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The PaymentStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaymentStatusDto":{"enum":["unknown","created","pending","completed","canceled","failed","refunded","chargeback","refund_failed","refund_processing"],"type":"string","description":"Represents payment status"}}}}
```

## The PaysafeCardDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"}}}}
```

## The Period object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"}}}}
```

## The PixDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"}}}}
```

## The PlatformCapability object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"}}}}
```

## The PlatformStoreTypeAssociationDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PlatformStoreTypeAssociationDetailsDto":{"required":["disable_billing_plans","display_disclaimers","full_external_management","platform_id","store_platform"],"type":"object","properties":{"platform_id":{"$ref":"#/components/schemas/FlakeId"},"associated_platform":{"$ref":"#/components/schemas/PublicPlatformDto"},"store_platform":{"type":"string","description":"The store platform identifier string (e.g. \"rust\", \"minecraft\")."},"paynow_platform_fee_percentage_override":{"type":["null","integer"],"description":"Overrides the default PayNow platform fee percentage for this association.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_fee_percentage":{"type":["null","integer"],"description":"The fee percentage charged by the connected platform.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_wallet_id":{"$ref":"#/components/schemas/FlakeId"},"disable_billing_plans":{"type":"boolean","description":"When true, billing plans are disabled for this platform/store type combination."},"display_disclaimers":{"type":"boolean","description":"When true, legal or compliance disclaimers should be displayed to the end user."},"full_external_management":{"type":"boolean","description":"Whether the management hides some PayNow UI"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"}}}}
```

## The PlatformType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"}}}}
```

## The PopularTimeOfDayDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PopularTimeOfDayDto_V2":{"required":["day_of_week","hour","payment_count"],"type":"object","properties":{"day_of_week":{"$ref":"#/components/schemas/DayOfWeekDto"},"hour":{"type":"integer","format":"int32"},"payment_count":{"type":"integer","format":"int64"}},"additionalProperties":false},"DayOfWeekDto":{"enum":["unspecified","monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"type":"string"}}}}
```

## The PrepaidCardsBlockingTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PrepaidCardsBlockingTypeDto":{"enum":["unspecified","none","trials","all_recurring"],"type":"string","description":"Defines when prepaid cards should be blocked from use."}}}}
```

## The ProductCommandDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ProductCommandExecutionRuleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductCommandExecutionRuleDto":{"enum":["invalid","once_per_item","once_per_order"],"type":"string"}}}}
```

## The ProductCommandStage object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."}}}}
```

## The ProductDeliverableActionsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false}}}}
```

## The ProductDependentMigrationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDependentMigrationDto":{"required":["created_at","created_by","id","migration_targets","product_id","send_all_commands_to_new_servers","send_new_commands_to_all_servers","status","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"migration_targets":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetDto"}},"status":{"$ref":"#/components/schemas/ProductDependentMigrationStatusDto"},"send_new_commands_to_all_servers":{"type":"boolean"},"send_all_commands_to_new_servers":{"type":"boolean"},"completed_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ProductDependentMigrationTargetDto":{"required":["type","versions"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetVersionDto"}}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"},"ProductDependentMigrationTargetVersionDto":{"required":["migrated","new_product_version_id","old_product_version_created_at","old_product_version_id","total_entities_migrated"],"type":"object","properties":{"old_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"old_product_version_created_at":{"type":"string","format":"date-time"},"new_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"total_entities_migrated":{"type":"integer","format":"int32"},"migrated":{"type":"boolean"}},"additionalProperties":false},"ProductDependentMigrationStatusDto":{"enum":["invalid","created","completed"],"type":"string"}}}}
```

## The ProductDependentMigrationEstimateTargetCountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDependentMigrationEstimateTargetCountDto":{"required":["total_entities","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"},"total_entities":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"}}}}
```

## The ProductDependentMigrationEstimateVersionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDependentMigrationEstimateVersionDto":{"required":["product_version_created_at","product_version_id","target_counts"],"type":"object","properties":{"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_created_at":{"type":"string","format":"date-time"},"target_counts":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationEstimateTargetCountDto"}}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductDependentMigrationEstimateTargetCountDto":{"required":["total_entities","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"},"total_entities":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"}}}}
```

## The ProductDependentMigrationStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDependentMigrationStatusDto":{"enum":["invalid","created","completed"],"type":"string"}}}}
```

## The ProductDependentMigrationTargetDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDependentMigrationTargetDto":{"required":["type","versions"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductDependentMigrationTargetTypeDto"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ProductDependentMigrationTargetVersionDto"}}},"additionalProperties":false},"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"},"ProductDependentMigrationTargetVersionDto":{"required":["migrated","new_product_version_id","old_product_version_created_at","old_product_version_id","total_entities_migrated"],"type":"object","properties":{"old_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"old_product_version_created_at":{"type":"string","format":"date-time"},"new_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"total_entities_migrated":{"type":"integer","format":"int32"},"migrated":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ProductDependentMigrationTargetTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDependentMigrationTargetTypeDto":{"enum":["invalid","active_subscriptions","active_unused_delivery_items","non_expirable_delivery_items"],"type":"string"}}}}
```

## The ProductDependentMigrationTargetVersionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDependentMigrationTargetVersionDto":{"required":["migrated","new_product_version_id","old_product_version_created_at","old_product_version_id","total_entities_migrated"],"type":"object","properties":{"old_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"old_product_version_created_at":{"type":"string","format":"date-time"},"new_product_version_id":{"$ref":"#/components/schemas/FlakeId"},"total_entities_migrated":{"type":"integer","format":"int32"},"migrated":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ProductDownloadableFileDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDownloadableFileDto":{"required":["created_at","created_by","id","is_uploaded","product_id","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"is_uploaded":{"type":"boolean"},"file_name":{"type":["null","string"]},"file_content_type":{"type":["null","string"]},"file_size":{"type":["null","integer"],"format":"int64"},"file_hash":{"type":["null","string"]},"description":{"type":["null","string"]},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The ProductDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductDto":{"required":["allow_one_time_purchase","allow_subscription","commands","custom_variable_ids","customer_stock_limit","description","gameservers","id","name","payout_splits","price","remove_after_enabled","remove_after_time_scale","remove_after_time_value","required_product_ids","single_game_server_only","slug","sort_order","stock_available","store_id","store_stock_limit","subscription_interval_scale","subscription_interval_value","tags","trial","upselling","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"image_url":{"type":["null","string"],"description":"The URL to the product image."},"slug":{"type":"string","description":"The unique slug for the product."},"name":{"type":"string","description":"The display name of the product."},"description":{"type":"string","description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"sort_order":{"type":"integer","description":"The sort order for displaying the product.","format":"int32"},"price":{"type":"integer","description":"The price of the product, in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":"boolean","description":"Indicates whether the product is limited to a single game server."},"allow_one_time_purchase":{"type":"boolean","description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":"boolean","description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":"integer","description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/ProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/ProductUpsellConfigurationDto"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":"integer","description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"stock_available":{"$ref":"#/components/schemas/ProductStockAvailableDto"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDto"},"description":"The tags associated with the product."},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDto"},"description":"The game servers associated with the product."},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":["null","string"],"description":"The date and time when the product was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the product was last updated.","format":"date-time"},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":"array","items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.","format":"date-time"},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductTrialConfigurationDto":{"required":["allow_repeat_trials","enabled","new_customer_order_lookback_scale","new_customer_order_lookback_value","new_customers_only","period_scale","period_value","repeat_trial_cooldown_scale","repeat_trial_cooldown_value","revoke_immediately_when_canceled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if trials should be enabled for the product."},"period_value":{"type":"integer","description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":"boolean","description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":"boolean","description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":"integer","description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":"boolean","description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":"integer","description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trial is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"ProductUpsellConfigurationDto":{"required":["enabled","recommendations"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if upselling should be enabled for the product.\nIf disabled, the product will never be recommended regardless of the global config."},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/ProductUpsellRecommendationDto"},"description":"Upselling recommendation for the product."}},"additionalProperties":false},"ProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockAvailableDto":{"required":["customer_available","store_available"],"type":"object","properties":{"store_available":{"type":"integer","description":"Indicates how many stock is left store-wide.","format":"int32"},"customer_available":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"ProductGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether this game server is enabled."}},"additionalProperties":false},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."}}}}
```

## The ProductGameServerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether this game server is enabled."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ProductPayoutSplitDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ProductPricingRegionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductPricingRegionDto":{"required":["blended_vat_rate","country_codes","enabled","group_id","id","local_currency","local_currency_fx_rate","name"],"type":"object","properties":{"id":{"type":"string"},"group_id":{"type":"string"},"local_currency":{"type":"string"},"local_currency_fx_rate":{"type":"number","format":"double"},"blended_vat_rate":{"type":"number","format":"double"},"name":{"type":"string"},"country_codes":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"price":{"type":["null","integer"],"format":"int64"},"default_price_multiplier":{"type":["null","integer"],"format":"int64"},"currency":{"type":["null","string"]},"tax_inclusive":{"type":["null","boolean"]},"updated_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false}}}}
```

## The ProductPricingRegionGroupDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductPricingRegionGroupDto":{"required":["description","id","name","recommended_base_price_multiplier"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"recommended_base_price_multiplier":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The ProductPricingRegionOverrideDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductPricingRegionOverrideDto":{"type":"object","properties":{"price":{"type":["null","integer"],"format":"int64"},"enabled":{"type":["null","boolean"]},"currency":{"type":["null","string"]},"tax_inclusive":{"type":["null","boolean"]}},"additionalProperties":false}}}}
```

## The ProductRemoveAfterIntervalScale object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"}}}}
```

## The ProductStockAvailableDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductStockAvailableDto":{"required":["customer_available","store_available"],"type":"object","properties":{"store_available":{"type":"integer","description":"Indicates how many stock is left store-wide.","format":"int32"},"customer_available":{"type":"integer","format":"int32"}},"additionalProperties":false}}}}
```

## The ProductStockLimitDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"}}}}
```

## The ProductStockTimeScale object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"}}}}
```

## The ProductSubscriptionIntervalScale object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"}}}}
```

## The ProductTagDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductTagDto":{"required":["id","name","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The unique slug for the tag."},"name":{"type":"string","description":"The display name of the tag."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ProductTaxCode object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."}}}}
```

## The ProductTrialConfigurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductTrialConfigurationDto":{"required":["allow_repeat_trials","enabled","new_customer_order_lookback_scale","new_customer_order_lookback_value","new_customers_only","period_scale","period_value","repeat_trial_cooldown_scale","repeat_trial_cooldown_value","revoke_immediately_when_canceled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if trials should be enabled for the product."},"period_value":{"type":"integer","description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":"boolean","description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":"boolean","description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":"integer","description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":"boolean","description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":"integer","description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trial is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"}}}}
```

## The ProductUpsellConfigurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductUpsellConfigurationDto":{"required":["enabled","recommendations"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if upselling should be enabled for the product.\nIf disabled, the product will never be recommended regardless of the global config."},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/ProductUpsellRecommendationDto"},"description":"Upselling recommendation for the product."}},"additionalProperties":false},"ProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"}}}}
```

## The ProductUpsellRecommendationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"}}}}
```

## The ProrationBehaviorDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."}}}}
```

## The PublicPlatformDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"}}}}
```

## The PurchaseFollowUpStoreConfigurationCommandDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PurchaseFollowUpStoreConfigurationCommandDto":{"required":["command","id","online_only","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level purchase follow uo configuration."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The PurchaseFollowUpStoreConfigurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PurchaseFollowUpStoreConfigurationDto":{"required":["commands","coupon_configuration","enabled","invalid","minimum_order_value","store_id","trigger_after","updated_at","updated_by"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"invalid":{"type":"boolean","description":"A value indicating whether the abandoned checkout configuration for the store is invalid."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationCommandDto"},"description":"The commands you want to execute when the email is sent."},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":"string","description":"The date and time when the configuration was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents the store-level configuration for abandoned checkout settings."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"},"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"PurchaseFollowUpStoreConfigurationCommandDto":{"required":["command","id","online_only","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level purchase follow uo configuration."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The PurchaseFollowUpStoreConfigurationUpdateCommandDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PurchaseFollowUpStoreConfigurationUpdateCommandDto":{"required":["command","online_only"],"type":"object","properties":{"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level purchase follow uo configuration."}}}}
```

## The PurchaseFollowUpStoreConfigurationUpdateDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"PurchaseFollowUpStoreConfigurationUpdateDto":{"required":["commands","coupon_configuration","enabled","minimum_order_value","trigger_after"],"type":"object","properties":{"enabled":{"type":"boolean","description":"A value indicating whether the abandoned checkout feature is enabled for the store."},"trigger_after":{"$ref":"#/components/schemas/Period"},"minimum_order_value":{"type":"integer","description":"The minimum order value required to trigger an abandoned checkout email.","format":"int64"},"maximum_order_value":{"type":["null","integer"],"description":"The optional maximum order value beyond which an abandoned checkout email will not be sent.","format":"int64"},"max_coupons_per_customer_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit per customer beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_per_customer_period":{"$ref":"#/components/schemas/Period"},"max_coupons_global_amount":{"type":["null","integer"],"description":"The optional maximum coupons limit store wide beyond which an abandoned checkout email will not be sent.","format":"int32"},"max_coupons_global_period":{"$ref":"#/components/schemas/Period"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseFollowUpStoreConfigurationUpdateCommandDto"}},"coupon_configuration":{"$ref":"#/components/schemas/MarketingCouponConfigurationDto"}},"additionalProperties":false,"description":"Used for updating the store-level configuration for abandoned checkout settings."},"Period":{"type":"string","additionalProperties":false,"description":"ISO 8601 duration format","format":"period"},"PurchaseFollowUpStoreConfigurationUpdateCommandDto":{"required":["command","online_only"],"type":"object","properties":{"command":{"type":"string","description":"The command to execute."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed if the player is online."}},"additionalProperties":false,"description":"Represents a command associated with the store-level purchase follow uo configuration."},"MarketingCouponConfigurationDto":{"required":["customer_redeem_limit","customer_redeem_limit_enabled","discount_amount","discount_apply_before_sales","discount_only_required_tags_or_products","discount_type","duration","minimum_order_value","required_product_ids","required_tag_ids","usable_on_one_time_purchases","usable_on_subscriptions"],"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_intervals":{"type":["null","integer"],"description":"Gets or sets the duration of the coupon in intervals, applicable only for repeating coupons.","format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","description":"Gets or sets the discount amount.","format":"int64"},"discount_only_required_tags_or_products":{"type":"boolean","description":"Gets or sets a value indicating whether the discount only applies to specific tags or products."},"discount_apply_before_sales":{"type":"boolean","description":"Gets or sets a value indicating whether the discount is applied before any existing sales or discounts."},"required_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of tag IDs required for the discount to apply."},"required_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Gets or sets the list of product IDs required for the discount to apply."},"minimum_order_value":{"type":"integer","description":"Gets or sets the minimum order value required for the discount to be applied.","format":"int64"},"customer_redeem_limit_enabled":{"type":"boolean","description":"Gets or sets a value indicating whether a customer-specific redeem limit is enabled."},"customer_redeem_limit":{"type":"integer","description":"Gets or sets the maximum number of times a single customer can redeem the coupon.","format":"int64"},"usable_on_one_time_purchases":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on one-time purchases."},"usable_on_subscriptions":{"type":"boolean","description":"Gets or sets a value indicating whether the coupon can be used on subscription purchases."},"expires_after":{"$ref":"#/components/schemas/Period"}},"additionalProperties":false,"description":"Represents the configuration settings for a coupon applied to marketing features."},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The QueuedDiscordActionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"QueuedDiscordActionDto":{"required":["action_type","delivery_item_id","discord_server_id","enqueued_at","execution_stage","executions","id","product_id","product_version_id","revocation_stages","status","store_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"status":{"$ref":"#/components/schemas/QueuedDiscordActionStatus"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"delivery_item_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"discord_user_id":{"$ref":"#/components/schemas/FlakeId"},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]},"revocation_stages":{"type":"array","items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"enqueued_at":{"type":"string","format":"date-time"},"finalised_at":{"type":["null","string"],"format":"date-time"},"executions":{"type":"array","items":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionDto"}}},"additionalProperties":false},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionStatus":{"enum":["active","complete","errored","canceled"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"},"QueuedDiscordActionExecutionDto":{"required":["executed_at","execution_status","id","queue_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"queue_id":{"type":"integer","format":"int64"},"executed_at":{"type":"string","format":"date-time"},"execution_status":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionStatus"},"message":{"type":["null","string"]},"trace_id":{"type":["null","string"]}},"additionalProperties":false},"QueuedDiscordActionExecutionStatus":{"enum":["success","failure"],"type":"string"}}}}
```

## The QueuedDiscordActionExecutionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"QueuedDiscordActionExecutionDto":{"required":["executed_at","execution_status","id","queue_id"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"queue_id":{"type":"integer","format":"int64"},"executed_at":{"type":"string","format":"date-time"},"execution_status":{"$ref":"#/components/schemas/QueuedDiscordActionExecutionStatus"},"message":{"type":["null","string"]},"trace_id":{"type":["null","string"]}},"additionalProperties":false},"QueuedDiscordActionExecutionStatus":{"enum":["success","failure"],"type":"string"}}}}
```

## The QueuedDiscordActionExecutionStatus object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"QueuedDiscordActionExecutionStatus":{"enum":["success","failure"],"type":"string"}}}}
```

## The QueuedDiscordActionStatus object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"QueuedDiscordActionStatus":{"enum":["active","complete","errored","canceled"],"type":"string"}}}}
```

## The QueuedWebhookDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"QueuedWebhookDto":{"required":["created_at","event","executions","id","payload","state","webhook_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"webhook_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/WebhookState"},"next_retry":{"type":["null","string"],"format":"date-time"},"event":{"$ref":"#/components/schemas/WebhookEventType"},"payload":{},"executions":{"type":"array","items":{"$ref":"#/components/schemas/ExecutedWebhookDto"}}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"WebhookState":{"enum":["success","pending","failed","all"],"type":"string"},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"ExecutedWebhookDto":{"required":["id","started_at","status_code"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["null","string"],"format":"date-time"},"status_code":{"type":"integer","format":"int32"},"response":{"type":["null","string"]}},"additionalProperties":false}}}}
```

## The RefundDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"RefundDto":{"required":["amount","amount_str","created_at","currency","customer_id","gateway_fee_amount","gateway_fee_amount_str","id","payment_id","platform_fee_amount","platform_fee_amount_str","refund_from_connected_user_balance","status","store_id","store_net_amount","store_net_amount_str","store_refund_amount","store_refund_amount_str","tax_amount","tax_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"payment_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_line_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/RefundStatus"},"failure_reason":{"type":["null","string"],"description":"Reason for failure if the refund has failed"},"currency":{"type":"string","description":"Three-letter currency code of the refund"},"amount":{"type":"integer","description":"Amount of the refund in smallest currency unit (e.g., cents)","format":"int64"},"amount_str":{"type":"string","description":"String representation of the refund amount, formatted for display"},"gateway_fee_amount":{"type":"integer","description":"Amount of payment processor fees in smallest currency unit","format":"int64"},"gateway_fee_amount_str":{"type":"string","description":"String representation of gateway fee amount, formatted for display"},"tax_amount":{"type":"integer","description":"Amount of tax being refunded in smallest currency unit","format":"int64"},"tax_amount_str":{"type":"string","description":"String representation of tax amount, formatted for display"},"platform_fee_amount":{"type":"integer","description":"Amount of platform fees in smallest currency unit","format":"int64"},"platform_fee_amount_str":{"type":"string","description":"String representation of platform fee amount, formatted for display"},"store_net_amount":{"type":"integer","description":"Net amount for the store after fees in smallest currency unit","format":"int64"},"store_net_amount_str":{"type":"string","description":"String representation of store net amount, formatted for display"},"store_refund_amount":{"type":"integer","description":"Amount of the refund to be paid by the store in smallest currency unit","format":"int64"},"store_refund_amount_str":{"type":"string","description":"String representation of store refund amount, formatted for display"},"presentment_currency":{"type":["null","string"],"description":"Optional currency code used for presentment to the customer if different from the base currency"},"presentment_amount":{"type":["null","integer"],"description":"Optional amount in presentment currency in smallest currency unit","format":"int64"},"fx_rate":{"type":["null","string"],"description":"Exchange rate used while refunding. Only present for payments made in non-settlement currency."},"refund_from_connected_user_balance":{"type":"boolean","description":"Indicates whether the refund should be taken from the connected user's balance.\nOnly relevant for platforms."},"created_at":{"type":"string","description":"Date and time when the refund was created","format":"date-time"},"approved_at":{"type":["null","string"],"description":"Optional date and time when the refund was approved","format":"date-time"},"pending_at":{"type":["null","string"],"description":"Optional date and time when the refund entered pending status","format":"date-time"},"completed_at":{"type":["null","string"],"description":"Optional date and time when the refund was completed","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Optional date and time when the refund was canceled","format":"date-time"},"failed_at":{"type":["null","string"],"description":"Optional date and time when the refund failed","format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"RefundStatus":{"enum":["created","approved","processing","completed","canceled","failed"],"type":"string","description":"Represents the current status of a refund in the system"}}}}
```

## The RefundStatus object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"RefundStatus":{"enum":["created","approved","processing","completed","canceled","failed"],"type":"string","description":"Represents the current status of a refund in the system"}}}}
```

## The ResendCommandsForGameServerRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ResendCommandsForGameServerRequestDto":{"type":"object","properties":{"starts_at":{"type":["null","string"],"format":"date-time"},"ends_at":{"type":["null","string"],"format":"date-time"},"inventory_item_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"order_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ResendCommandsForGameServerResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ResendCommandsForGameServerResponseDto":{"required":["enqueued_commands_count"],"type":"object","properties":{"enqueued_commands_count":{"type":"integer","format":"int32"}},"additionalProperties":false}}}}
```

## The ResendWebhookDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ResendWebhookDto":{"required":["webhook_id"],"type":"object","properties":{"webhook_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The RevenueBasisDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"RevenueBasisDto_V2":{"enum":["unspecified","gross","gross_excluding_taxes","net"],"type":"string"}}}}
```

## The SaleDiscountTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"}}}}
```

## The SaleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SaleDto":{"required":["apply_to_product_ids","apply_to_tag_ids","begins_at","created_at","created_by","discount_amount","discount_type","duration","duration_in_intervals","enabled","id","minimum_order_value","name","store_id","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"enabled":{"type":"boolean","description":"Indicates whether the sale is enabled."},"name":{"type":"string","description":"The name of the sale."},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","description":"The discount value. For percent discounts, this represents the percentage \nmultiplied by 10 (e.g., 250 = 25%). For amount discounts, this represents \nthe value in the smallest currency unit (e.g., cents).","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","description":"The number of subscription intervals the coupon is valid for, used if the duration is repeating.","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of product IDs the sale applies to."},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"A list of tag IDs the sale applies to."},"minimum_order_value":{"type":"integer","description":"The minimum order value required to apply the sale, in the smallest currency unit (e.g., cents).","format":"int32"},"begins_at":{"type":"string","description":"The date and time when the sale begins.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the sale ends.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"The date and time when the sale was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the sale was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a detailed view of a Sale, including configuration and audit information."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SaleDurationDto":{"enum":["unspecified","once","forever","repeating"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The SaleDurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SaleDurationDto":{"enum":["unspecified","once","forever","repeating"],"type":"string"}}}}
```

## The SalesTaxJurisdictionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."}}}}
```

## The SalesTaxJurisdictionTaxDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."}}}}
```

## The SetDiscordActionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SetDiscordActionDto":{"required":["action_type","discord_server_id","execution_stage"],"type":"object","properties":{"discord_server_id":{"$ref":"#/components/schemas/FlakeId"},"action_type":{"$ref":"#/components/schemas/DiscordActionType"},"execution_stage":{"$ref":"#/components/schemas/DiscordActionExecutionStage"},"revocation_stages":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DiscordActionRevocationStage"}},"channel_id":{"$ref":"#/components/schemas/FlakeId"},"role_id":{"$ref":"#/components/schemas/FlakeId"},"message":{"type":["null","string"]}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"DiscordActionType":{"enum":["persist_role","send_message","ban_user","kick_user","generate_invite_link"],"type":"string"},"DiscordActionExecutionStage":{"enum":["on_purchase","on_expire","on_refund","on_chargeback"],"type":"string"},"DiscordActionRevocationStage":{"enum":["on_expire","on_refund","on_chargeback"],"type":"string"}}}}
```

## The StartDataMigrationFromTebexRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StartDataMigrationFromTebexRequestDto":{"required":["headless_token","plugin_token"],"type":"object","properties":{"headless_token":{"type":"string","description":"The public-facing Headless API token."},"plugin_token":{"type":"string","description":"An API token associated to a Tebex game server."}},"additionalProperties":false}}}}
```

## The StartDownloadableFileUploadRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StartDownloadableFileUploadRequestDto":{"required":["file_content_type","file_name"],"type":"object","properties":{"file_name":{"type":"string"},"file_content_type":{"type":"string"},"description":{"type":["null","string"]}},"additionalProperties":false}}}}
```

## The StatsDimensionTypeDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StatsDimensionTypeDto_V2":{"enum":["unspecified","product","gameserver","tag","affiliate_link","coupon","giftcard","payout_id"],"type":"string"}}}}
```

## The StatsDistributionTypeDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StatsDistributionTypeDto_V2":{"enum":["unspecified","order_country","payment_method","payment_acceptance"],"type":"string"}}}}
```

## The SteamId object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The SteamSkinsDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false}}}}
```

## The SteamSkinsInventoryItemDetailsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false}}}}
```

## The StoreDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreDto":{"required":["currency","description","game","id","live_mode","name","owner_id","platform","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"owner_id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-safe slug used to identify the store (e.g. \"my-rust-server\")."},"name":{"type":"string","description":"The display name of the store."},"platform":{"type":"string","description":"The platform this store is associated with (e.g. \"rust\", \"minecraft\")."},"game":{"type":"string","description":"Alias for 'platform'. Returns the platform identifier as a game name.","readOnly":true},"currency":{"type":"string","description":"The ISO 4217 currency code used by this store for pricing (e.g. \"usd\", \"eur\")"},"description":{"type":"string","description":"A human-readable description of the store shown to customers and PayNow."},"website_url":{"type":["null","string"],"description":"The store's public website URL."},"contact_email":{"type":["null","string"],"description":"General contact email address for the store."},"support_email":{"type":["null","string"],"description":"Dedicated support email address for customer inquiries."},"support_url":{"type":["null","string"],"description":"URL to the store's support portal or help page."},"integration_type":{"type":["null","string"],"description":"The integration type used by the store."},"live_mode":{"type":"boolean","description":"When set to true, the store is processing real transactions in live mode."},"logo_url":{"type":["null","string"],"description":"URL of the store's full-size logo image."},"logo_square_url":{"type":["null","string"],"description":"URL of the store's square/icon logo image."},"minecraft_bedrock_username_prefix":{"type":["null","string"],"description":"Username prefix used to identify Minecraft Bedrock players (e.g. \".\")."},"created_at":{"type":["null","string"],"description":"The UTC timestamp when the store was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The UTC timestamp when the store was last updated.","format":"date-time"},"onboarding_completed_at":{"type":["null","string"],"description":"The UTC timestamp when the store completed onboarding.","format":"date-time"},"platform_store_type_association":{"$ref":"#/components/schemas/PlatformStoreTypeAssociationDetailsDto"}},"additionalProperties":false,"description":"Represents a PayNow store and its associated configuration."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PlatformStoreTypeAssociationDetailsDto":{"required":["disable_billing_plans","display_disclaimers","full_external_management","platform_id","store_platform"],"type":"object","properties":{"platform_id":{"$ref":"#/components/schemas/FlakeId"},"associated_platform":{"$ref":"#/components/schemas/PublicPlatformDto"},"store_platform":{"type":"string","description":"The store platform identifier string (e.g. \"rust\", \"minecraft\")."},"paynow_platform_fee_percentage_override":{"type":["null","integer"],"description":"Overrides the default PayNow platform fee percentage for this association.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_fee_percentage":{"type":["null","integer"],"description":"The fee percentage charged by the connected platform.\nExpressed in basis points (e.g. 250 = 2.50%).","format":"int64"},"connected_platform_wallet_id":{"$ref":"#/components/schemas/FlakeId"},"disable_billing_plans":{"type":"boolean","description":"When true, billing plans are disabled for this platform/store type combination."},"display_disclaimers":{"type":"boolean","description":"When true, legal or compliance disclaimers should be displayed to the end user."},"full_external_management":{"type":"boolean","description":"Whether the management hides some PayNow UI"}},"additionalProperties":false},"PublicPlatformDto":{"required":["accent_color","business_name","capabilities","country_code","created_at","description","id","logo_url","name","slug","type","website_url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string"},"type":{"$ref":"#/components/schemas/PlatformType"},"country_code":{"type":"string"},"business_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"logo_url":{"type":"string"},"accent_color":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCapability"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"disabled_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"PlatformType":{"enum":["invalid","marketplace","store_platform","other"],"type":"string"},"PlatformCapability":{"enum":["invalid","connected_users"],"type":"string"}}}}
```

## The StoreMemberDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreMemberDto":{"required":["id","user","user_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"user_id":{"$ref":"#/components/schemas/FlakeId"},"user":{"$ref":"#/components/schemas/StoreMemberUserDto"},"added_at":{"type":["null","string"],"description":"The UTC timestamp when the member was added to the store.","format":"date-time"},"added_by":{"$ref":"#/components/schemas/ActorDto"},"role_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false,"description":"Represents a member of a PayNow store."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreMemberUserDto":{"required":["id","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"},"email":{"type":["null","string"],"description":"The email address associated with the user.\nOnly visible if you are the store owner."},"first_name":{"type":["null","string"],"description":"The first name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"last_name":{"type":["null","string"],"description":"The last name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"nickname":{"type":["null","string"],"description":"The nickname of the user."}},"additionalProperties":false,"description":"Represents identity and profile information for a store member."},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false}}}}
```

## The StoreMemberUserDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreMemberUserDto":{"required":["id","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"},"email":{"type":["null","string"],"description":"The email address associated with the user.\nOnly visible if you are the store owner."},"first_name":{"type":["null","string"],"description":"The first name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"last_name":{"type":["null","string"],"description":"The last name of the actor.\nHidden if the user has a set nickname, and you are not the store owner."},"nickname":{"type":["null","string"],"description":"The nickname of the user."}},"additionalProperties":false,"description":"Represents identity and profile information for a store member."},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The StorePaymentSettingsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StorePaymentSettingsDto":{"required":["adaptive_currency_enabled","block_prepaid_cards","chargeback_coverage","force_3d_secure","max_checkout_amount","promo_code_stacking_behavior","show_adaptive_currency_on_storefront","show_all_payment_methods_for_subscriptions","store_tax_inclusive_pricing"],"type":"object","properties":{"show_all_payment_methods_for_subscriptions":{"type":"boolean","description":"Whether to show all available payment methods for subscription purchases."},"store_tax_inclusive_pricing":{"type":"boolean","description":"Whether store pricing is tax-inclusive."},"block_prepaid_cards":{"$ref":"#/components/schemas/PrepaidCardsBlockingTypeDto"},"promo_code_stacking_behavior":{"$ref":"#/components/schemas/StorePromoCodeStackingBehaviorDto"},"adaptive_currency_enabled":{"type":"boolean","description":"Whether the 'Adaptive Currency' feature is enabled."},"show_adaptive_currency_on_storefront":{"type":"boolean","description":"Whether the displayed currency on the storefront should be the Adaptive Currency by default."},"max_checkout_amount":{"type":"integer","description":"Maximum checkout amount allowed in cents.","format":"int64"},"force_3d_secure":{"type":"boolean","description":"Whether to force 3D Secure authentication for all transactions."},"chargeback_coverage":{"$ref":"#/components/schemas/ChargebackCoverageTypeDto"},"chargeback_coverage_max_amount":{"type":["null","integer"],"description":"Maximum per-transaction chargeback coverage amount in cents.","format":"int64"}},"additionalProperties":false,"description":"Store payment configuration settings."},"PrepaidCardsBlockingTypeDto":{"enum":["unspecified","none","trials","all_recurring"],"type":"string","description":"Defines when prepaid cards should be blocked from use."},"StorePromoCodeStackingBehaviorDto":{"enum":["invalid","disabled","enabled","gift_cards_only"],"type":"string","description":"Defines the behavior of promo code stacking."},"ChargebackCoverageTypeDto":{"enum":["unspecified","none","fraudulent","all"],"type":"string","description":"Defines the type of chargeback coverage provided."}}}}
```

## The StorePricingRegionOverrideDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StorePricingRegionOverrideDto":{"type":"object","properties":{"default_price_multiplier":{"type":["null","integer"],"format":"int64"},"enabled":{"type":["null","boolean"]},"currency":{"type":["null","string"]},"tax_inclusive":{"type":["null","boolean"]}},"additionalProperties":false}}}}
```

## The StorePromoCodeStackingBehaviorDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StorePromoCodeStackingBehaviorDto":{"enum":["invalid","disabled","enabled","gift_cards_only"],"type":"string","description":"Defines the behavior of promo code stacking."}}}}
```

## The StoreRequirementActionParty object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreRequirementActionParty":{"enum":["invalid","store","paynow","payment_processor","payout_provider","kyc_provider","external"],"type":"string","description":"Determines the party that needs to perform or requests a verification"}}}}
```

## The StoreRequirementCategory object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreRequirementCategory":{"enum":["invalid","business","kyc","compliance","risk","technical","financial","legal","other"],"type":"string","description":"Represents categories of requirements that must be fulfilled for store setup and compliance in the PayNow platform."}}}}
```

## The StoreRequirementStatus object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreRequirementStatus":{"enum":["invalid","pending","under_review","requires_revision","approved","expired","waived","rejected_final"],"type":"string"}}}}
```

## The StoreRestrictionFlagDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreRestrictionFlagDto":{"enum":["none","payments_disabled","payouts_disabled"],"type":"string"}}}}
```

## The StoreTrustDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreTrustDto":{"required":["created_at","events","pending_requirements","restrictions","status","store_id"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/StoreTrustStatusDto"},"status_reason":{"type":["null","string"]},"restrictions":{"$ref":"#/components/schemas/StoreRestrictionFlagDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"onboarding_steps":{"$ref":"#/components/schemas/StoreTrustOnboardingStepsDto"},"events":{"type":"array","items":{"$ref":"#/components/schemas/StoreTrustEventDto"}},"pending_requirements":{"type":"array","items":{"$ref":"#/components/schemas/TrustStoreRequirementDto"}}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreTrustStatusDto":{"enum":["invalid","pending_review","requires_action","under_review","active","restricted","offboarded"],"type":"string"},"StoreRestrictionFlagDto":{"enum":["none","payments_disabled","payouts_disabled"],"type":"string"},"StoreTrustOnboardingStepsDto":{"required":["downloadable_files_added","gameserver_linked","kyc_completed","payout_onboarding_completed","products_created","store_id","store_owner_id","webhooks_active"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_owner_id":{"$ref":"#/components/schemas/FlakeId"},"payout_onboarding_completed":{"type":"boolean"},"kyc_completed":{"type":"boolean"},"products_created":{"type":"boolean"},"gameserver_linked":{"type":"boolean"},"webhooks_active":{"type":"boolean"},"downloadable_files_added":{"type":"boolean"}},"additionalProperties":false},"StoreTrustEventDto":{"required":["actor","created_at","id","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/StoreTrustEventTypeDto"},"description":{"type":["null","string"]},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_review_id":{"$ref":"#/components/schemas/FlakeId"},"actor":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"StoreTrustEventTypeDto":{"enum":["invalid","onboarded","escalated_to_review","action_required","restricted","offboarded","reactivated","requirement_added","requirement_submitted","requirement_verified","requirement_rejected","requirement_deadline_missed","requirement_waived","requirement_requires_revision","restriction_added","restriction_lifted","review_scheduled","review_completed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"TrustStoreRequirementDto":{"required":["category","code","created_at","id","metadata","name","requested_by","restricts_capabilities","status","store_id","submissions"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"template_id":{"type":["null","string"],"description":"Template ID if this requirement was created from a template. Null for ad-hoc requirements."},"originating_flag_id":{"$ref":"#/components/schemas/FlakeId"},"category":{"$ref":"#/components/schemas/StoreRequirementCategory"},"code":{"type":"string","description":"Unique code identifying the type of requirement. Copied from template or custom for ad-hoc requirements."},"name":{"type":"string","description":"Human-readable name of the requirement. Copied from template or custom for ad-hoc requirements."},"description":{"type":["null","string"],"description":"Detailed description explaining what the store needs to provide. Copied from template or custom for ad-hoc requirements."},"schema":{"type":"null","description":"JSON schema defining the form fields, validation rules, and document requirements"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for this requirement (stored as JSON)"},"status":{"$ref":"#/components/schemas/StoreRequirementStatus"},"requested_by":{"$ref":"#/components/schemas/StoreRequirementActionParty"},"requested_by_detail":{"type":["null","string"],"description":"Specifies the specific requester entity (e.g., \"stripe\", \"trolley\", or admin user ID)\nFree-form string for internal records"},"created_at":{"type":"string","description":"When this requirement was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When this requirement was last updated","format":"date-time"},"deadline_at":{"type":["null","string"],"description":"When this requirement must be completed by (optional)","format":"date-time"},"submitted_at":{"type":["null","string"],"description":"When the store submitted their response to this requirement","format":"date-time"},"verified_at":{"type":["null","string"],"description":"When this requirement was verified and approved","format":"date-time"},"rejected_at":{"type":["null","string"],"description":"When this requirement was rejected for not meeting standards","format":"date-time"},"restricts_capabilities":{"type":"array","items":{"type":"string"},"description":"Store capabilities that are restricted until this requirement is satisfied"},"submissions":{"type":"array","items":{"$ref":"#/components/schemas/TrustStoreRequirementSubmissionDto"},"description":"Associated submissions for this requriement."}},"additionalProperties":false},"StoreRequirementCategory":{"enum":["invalid","business","kyc","compliance","risk","technical","financial","legal","other"],"type":"string","description":"Represents categories of requirements that must be fulfilled for store setup and compliance in the PayNow platform."},"StoreRequirementStatus":{"enum":["invalid","pending","under_review","requires_revision","approved","expired","waived","rejected_final"],"type":"string"},"StoreRequirementActionParty":{"enum":["invalid","store","paynow","payment_processor","payout_provider","kyc_provider","external"],"type":"string","description":"Determines the party that needs to perform or requests a verification"},"TrustStoreRequirementSubmissionDto":{"required":["id","store_id","store_requirement_field_id","store_requirement_id","submitted_at","submitted_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_field_id":{"type":"string","description":"The identifier of the specific field within the store requirement."},"text_value":{"type":["null","string"],"description":"The text value submitted for this field, if applicable."},"file_id":{"type":["null","string"],"description":"The identifier of the uploaded file, if a file was submitted."},"file_name":{"type":["null","string"],"description":"The original name of the uploaded file."},"file_content_type":{"type":["null","string"],"description":"The MIME content type of the uploaded file."},"file_size_bytes":{"type":["null","integer"],"description":"The size of the uploaded file in bytes.","format":"int64"},"submitted_at":{"type":"string","description":"The timestamp when this submission was made.","format":"date-time"},"submitted_by":{"$ref":"#/components/schemas/ActorDto"},"submitted_by_ip_address":{"type":["null","string"],"description":"The IP address from which the submission was made."},"submitted_by_user_agent":{"type":["null","string"],"description":"The user agent string of the client that made the submission."}},"additionalProperties":false}}}}
```

## The StoreTrustEventDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreTrustEventDto":{"required":["actor","created_at","id","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/StoreTrustEventTypeDto"},"description":{"type":["null","string"]},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_review_id":{"$ref":"#/components/schemas/FlakeId"},"actor":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreTrustEventTypeDto":{"enum":["invalid","onboarded","escalated_to_review","action_required","restricted","offboarded","reactivated","requirement_added","requirement_submitted","requirement_verified","requirement_rejected","requirement_deadline_missed","requirement_waived","requirement_requires_revision","restriction_added","restriction_lifted","review_scheduled","review_completed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The StoreTrustEventTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreTrustEventTypeDto":{"enum":["invalid","onboarded","escalated_to_review","action_required","restricted","offboarded","reactivated","requirement_added","requirement_submitted","requirement_verified","requirement_rejected","requirement_deadline_missed","requirement_waived","requirement_requires_revision","restriction_added","restriction_lifted","review_scheduled","review_completed"],"type":"string"}}}}
```

## The StoreTrustOnboardingStepsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreTrustOnboardingStepsDto":{"required":["downloadable_files_added","gameserver_linked","kyc_completed","payout_onboarding_completed","products_created","store_id","store_owner_id","webhooks_active"],"type":"object","properties":{"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_owner_id":{"$ref":"#/components/schemas/FlakeId"},"payout_onboarding_completed":{"type":"boolean"},"kyc_completed":{"type":"boolean"},"products_created":{"type":"boolean"},"gameserver_linked":{"type":"boolean"},"webhooks_active":{"type":"boolean"},"downloadable_files_added":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The StoreTrustStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreTrustStatusDto":{"enum":["invalid","pending_review","requires_action","under_review","active","restricted","offboarded"],"type":"string"}}}}
```

## The StoreUpsellCheckoutStyleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreUpsellCheckoutStyleDto":{"enum":["unknown","inline","inline_and_prepayment_dialog","dedicated_step"],"type":"string"}}}}
```

## The StoreUpsellRecommendationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"}}}}
```

## The StoreUpsellSettingsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StoreUpsellSettingsDto":{"required":["automatic_recommendations_discount_amount","automatic_recommendations_discount_type","automatic_recommendations_enabled","checkout_style","enabled","recommendation_overrides","recommendation_overrides_enabled","updated_at","updated_by"],"type":"object","properties":{"enabled":{"type":"boolean"},"automatic_recommendations_enabled":{"type":"boolean"},"automatic_recommendations_discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"automatic_recommendations_discount_amount":{"type":"integer","format":"int64"},"recommendation_overrides_enabled":{"type":"boolean"},"recommendation_overrides":{"type":"array","items":{"$ref":"#/components/schemas/StoreUpsellRecommendationDto"}},"checkout_style":{"$ref":"#/components/schemas/StoreUpsellCheckoutStyleDto"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"StoreUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"StoreUpsellCheckoutStyleDto":{"enum":["unknown","inline","inline_and_prepayment_dialog","dedicated_step"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The StorefrontStoreDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"StorefrontStoreDto":{"required":["creator_currency","currency","game","id","live_mode","name","platform","slug"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"slug":{"type":"string","description":"The URL-friendly identifier for the store, used in store URLs."},"name":{"type":"string","description":"The display name of the store shown to customers."},"platform":{"type":"string","description":"The platform or the game of the store."},"game":{"type":"string","description":"The game of the store. Equivalent to the `platform` for backwards compatibility.","readOnly":true},"currency":{"type":"string","description":"The three-letter ISO currency code used for pricing in this store.\nIf using the Adaptive Currency feature, this will be updated to reflect customer's local currency\n(based on passed in IP / country headers)."},"creator_currency":{"type":"string","description":"The three-letter ISO currency code signifying the main currency of the store."},"description":{"type":["null","string"],"description":"A detailed description of the store. Only present for some platform types."},"website_url":{"type":["null","string"],"description":"The URL of the store's main website, if not using Hosted Webstores."},"support_email":{"type":["null","string"],"description":"The email address customers can use to contact store support."},"support_url":{"type":["null","string"],"description":"The URL of the store's support page."},"integration_type":{"type":["null","string"],"description":"The type of integration this store uses with external systems."},"live_mode":{"type":"boolean","description":"Indicates whether the store is in live mode (true) or test mode (false)."},"logo_url":{"type":["null","string"],"description":"The URL to the store's main logo image."},"logo_square_url":{"type":["null","string"],"description":"The URL to the store's square logo image."},"created_at":{"type":["null","string"],"description":"The date and time when the store was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the store was last updated.","format":"date-time"}},"additionalProperties":false,"description":"Represents a store entity within the storefront system."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The SubscriptionBillingAmountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionBillingAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Represents a billing amount breakdown for a subscription."}}}}
```

## The SubscriptionChangeAmountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."}}}}
```

## The SubscriptionChangeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."}}}}
```

## The SubscriptionChangeLineAmountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."}}}}
```

## The SubscriptionChangeLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."}}}}
```

## The SubscriptionChangeLineProductDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false}}}}
```

## The SubscriptionChangeProratedAmountDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."}}}}
```

## The SubscriptionChangeStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."}}}}
```

## The SubscriptionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionDto":{"required":["cancel_at_period_end","coupon_ids","created_at","currency","customer","discount_amount","discount_amount_str","gift","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","interval_scale","interval_value","lines","next_billing_amount","next_billing_presentment_amount","past_due","pretty_id","price","status","store_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","tax_jurisdictions","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"Human-readable identifier for the subscription."},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"payment_method_id":{"$ref":"#/components/schemas/FlakeId"},"payment_method":{"$ref":"#/components/schemas/PaymentMethodDto"},"pending_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionBillingAmountDto"},"status":{"$ref":"#/components/schemas/SubscriptionStatusDto"},"coupon_id":{"$ref":"#/components/schemas/FlakeId"},"coupon_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"Identifiers of coupons applied to this subscription."},"coupon_repeating_ends_at":{"type":["null","string"],"description":"Date when a repeating coupon ends for this subscription.","format":"date-time","deprecated":true},"affiliate_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"billing_name":{"type":["null","string"],"description":"Name used for billing purposes."},"billing_email":{"type":["null","string"],"description":"Email used for billing purposes."},"billing_country":{"type":["null","string"],"description":"Country code used for billing purposes."},"billing_tax_id":{"type":["null","string"],"description":"The tax identification number used for this order (for B2B transactions)"},"tax_jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionDto"},"description":"List of tax jurisdictions applicable to this subscription."},"customer_ip":{"type":["null","string"],"description":"IP address of the customer at the time of subscription."},"gift":{"type":"boolean","description":"Indicates whether this subscription is a gift.","readOnly":true,"deprecated":true},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"gift_to_customer":{"$ref":"#/components/schemas/CustomerDto"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":["null","string"],"description":"Name of the product associated with this subscription.","readOnly":true,"deprecated":true},"product_image_url":{"type":["null","string"],"description":"URL for the product image.","readOnly":true,"deprecated":true},"interval_value":{"type":"integer","description":"Numeric value of the billing interval.","format":"int32"},"interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"currency":{"type":"string","description":"Currency code used for billing this subscription."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself.","readOnly":true,"deprecated":true},"price":{"type":"integer","description":"Base price of the subscription in smallest currency units (e.g., cents).","format":"int64","readOnly":true,"deprecated":true},"price_str":{"type":["null","string"],"description":"Formatted string representation of the price.","readOnly":true,"deprecated":true},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true},"fx_rate":{"type":["null","string"],"description":"The foreign exchange rate applied (if presentment currency differs from settlement currency)."},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription.","readOnly":true,"deprecated":true},"current_period_start":{"type":["null","string"],"description":"Start date of the current billing period.","format":"date-time"},"current_period_end":{"type":["null","string"],"description":"End date of the current billing period.","format":"date-time"},"billing_cycle_sequence":{"type":["null","integer"],"description":"Sequence number of the current billing cycle.","format":"int32"},"next_attempt_at":{"type":["null","string"],"description":"Date and time when the next payment attempt will occur.","format":"date-time"},"attempt_count":{"type":["null","integer"],"description":"Number of payment attempts made for the current billing cycle.","format":"int32"},"created_at":{"type":"string","description":"Date and time when the subscription was created.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"Date and time when the subscription was last updated.","format":"date-time"},"active_at":{"type":["null","string"],"description":"Date and time when the subscription became active.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"Date and time when the subscription was canceled.","format":"date-time"},"cancel_reason":{"type":["null","string"],"description":"Reason provided for cancellation."},"cancellation_requested_at":{"type":["null","string"],"description":"Date and time when a subscription cancellation (cancel_at_period_end) was requested.","format":"date-time"},"cancel_at_period_end":{"type":"boolean","description":"Whether the subscription will be canceled at the end of the billing period.","readOnly":true},"past_due":{"type":"boolean","description":"Whether the subscription is past due, and is in a dunning (retrying) state."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionLineDto"},"description":"Line items associated with this subscription."}},"additionalProperties":false,"description":"Data transfer object representing a store subscription."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"PaymentMethodDto":{"required":["created_at","customer_id","gateway","gateway_customer_id","gateway_entity_identifier","gateway_id","gateway_type","id","method_details","method_type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"gateway":{"type":"string","description":"The payment gateway provider"},"gateway_id":{"type":"string","description":"The gateway's identifier for this payment method"},"gateway_customer_id":{"type":"string","description":"The gateway's customer identifier"},"gateway_type":{"type":"string","description":"The gateway-specific type identifier"},"method_type":{"type":"string","description":"The payment method type"},"method_details":{"$ref":"#/components/schemas/PaymentMethodDetailsDto"},"created_at":{"type":"string","description":"The date and time when this payment method was created","format":"date-time"},"gateway_entity_identifier":{"type":"string","description":"The gateway entity identifier"},"updated_at":{"type":["null","string"],"description":"The date and time when this payment method was last updated","format":"date-time"}},"additionalProperties":false,"description":"Represents a stored payment method"},"PaymentMethodDetailsDto":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/CardDetailsDto"},"cashapp":{"$ref":"#/components/schemas/CashAppDetailsDto"},"paypal":{"$ref":"#/components/schemas/PayPalDetailsDto"},"link":{"$ref":"#/components/schemas/LinkDetailsDto"},"crypto":{"$ref":"#/components/schemas/CryptoDetailsDto"},"steamskins":{"$ref":"#/components/schemas/SteamSkinsDetailsDto"},"ideal":{"$ref":"#/components/schemas/IdealDetailsDto"},"p24":{"$ref":"#/components/schemas/P24DetailsDto"},"bancontact":{"$ref":"#/components/schemas/BancontactDetailsDto"},"klarna":{"$ref":"#/components/schemas/KlarnaDetailsDto"},"alipay":{"$ref":"#/components/schemas/AlipayDetailsDto"},"pay_by_bank":{"$ref":"#/components/schemas/PayByBankDetailsDto"},"pix":{"$ref":"#/components/schemas/PixDetailsDto"},"paysafecard":{"$ref":"#/components/schemas/PaysafeCardDetailsDto"}},"additionalProperties":false,"description":"Contains detailed information about a payment method.\nDISCLAIMER: These fields are not guaranteed to be backwards compatible and may change or be removed without notice."},"CardDetailsDto":{"required":["brand","country","exp_month","exp_year","fingerprint","funding","last4"],"type":"object","properties":{"brand":{"type":"string","description":"The card brand"},"country":{"type":"string","description":"The country code where the card was issued"},"exp_month":{"type":"integer","description":"The card expiration month","format":"int32"},"exp_year":{"type":"integer","description":"The card expiration year","format":"int32"},"fingerprint":{"type":"string","description":"A unique fingerprint for this card"},"funding":{"type":"string","description":"The card funding type"},"last4":{"type":"string","description":"The last 4 digits of the card number"},"bin":{"type":["null","string"],"description":"The Bank Identification Number (first 6/8 digits of card).\nOnly available internally."},"issuer":{"type":["null","string"],"description":"The card issuer/bank name.\nOnly available internally."},"description":{"type":["null","string"],"description":"The card description.\nOnly available internally."},"wallet":{"$ref":"#/components/schemas/CardWalletDto"}},"additionalProperties":false,"description":"Card payment method details"},"CardWalletDto":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of digital wallet"}},"additionalProperties":false,"description":"Digital wallet details for a card"},"CashAppDetailsDto":{"required":["buyer_id","cashtag"],"type":"object","properties":{"buyer_id":{"type":"string","description":"The Cash App buyer identifier"},"cashtag":{"type":"string","description":"The Cash App cashtag"}},"additionalProperties":false,"description":"Cash App payment method details"},"PayPalDetailsDto":{"required":["country","payer_email","payer_id","payer_name","vault"],"type":"object","properties":{"payer_id":{"type":"string","description":"The PayPal payer identifier"},"payer_email":{"type":"string","description":"The PayPal account email"},"payer_name":{"type":"string","description":"The PayPal account holder name"},"country":{"type":"string","description":"The country code of the PayPal account"},"vault":{"type":"boolean","description":"Indicates if this PayPal account is vaulted"},"pending_vault_approval":{"type":["null","boolean"],"description":"Indicates if vault approval is pending"},"standalone_setup":{"type":["null","boolean"],"description":"Indicates if this is a standalone setup"}},"additionalProperties":false,"description":"PayPal payment method details"},"LinkDetailsDto":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email associated with the Link account"}},"additionalProperties":false,"description":"Link payment method details"},"CryptoDetailsDto":{"required":["confirmations","crypto_amount","crypto_currency","total_paid","transaction_hashes"],"type":"object","properties":{"crypto_currency":{"type":"string","description":"The cryptocurrency used"},"crypto_amount":{"type":"string","description":"The amount in cryptocurrency"},"total_paid":{"type":"string","description":"The total amount paid in cryptocurrency"},"confirmations":{"type":"integer","description":"The number of blockchain confirmations","format":"int32"},"transaction_hashes":{"type":"array","items":{"type":"string"},"description":"A list of blockchain transactions involving this payment"}},"additionalProperties":false,"description":"Cryptocurrency payment method details"},"SteamSkinsDetailsDto":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SteamSkinsInventoryItemDetailsDto"},"description":"The list of Steam inventory items used for payment"}},"additionalProperties":false,"description":"Steam Skins payment method details"},"SteamSkinsInventoryItemDetailsDto":{"required":["app_id","id","name","price"],"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the Steam item"},"app_id":{"type":"integer","description":"The Steam app ID","format":"int32"},"name":{"type":"string","description":"The name of the item"},"price":{"type":"integer","description":"The price of the item in the smallest currency unit","format":"int32"}},"additionalProperties":false},"IdealDetailsDto":{"required":["bank","bic"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"bic":{"type":"string","description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"iDEAL payment method details"},"P24DetailsDto":{"required":["bank"],"type":"object","properties":{"bank":{"type":"string","description":"The bank identifier"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Przelewy24 payment method details"},"BancontactDetailsDto":{"type":"object","properties":{"bank":{"type":["null","string"],"description":"The bank identifier"},"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"iban_last4":{"type":["null","string"],"description":"The last 4 digits of the IBAN"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Bancontact payment method details"},"KlarnaDetailsDto":{"type":"object","properties":{"country":{"type":["null","string"],"description":"The country code"},"method_category":{"type":["null","string"],"description":"The Klarna payment method category"}},"additionalProperties":false,"description":"Klarna payment method details"},"AlipayDetailsDto":{"type":"object","properties":{"buyer_id":{"type":["null","string"],"description":"The Alipay buyer identifier"},"fingerprint":{"type":["null","string"],"description":"A unique fingerprint for this Alipay account"}},"additionalProperties":false,"description":"Alipay payment method details"},"PayByBankDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bic":{"type":["null","string"],"description":"The Bank Identifier Code"},"country":{"type":["null","string"],"description":"The country code"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pay by Bank payment method details"},"PixDetailsDto":{"type":"object","properties":{"bank_name":{"type":["null","string"],"description":"The bank name"},"bank_account_number":{"type":["null","string"],"description":"The bank account number"},"payer_name":{"type":["null","string"],"description":"The payer name"}},"additionalProperties":false,"description":"Pix payment method details"},"PaysafeCardDetailsDto":{"type":"object","properties":{"first_name":{"type":["null","string"]},"last_name":{"type":["null","string"]},"psc_id":{"type":["null","string"]},"association_id":{"type":["null","string"]}},"additionalProperties":false,"description":"Paysafecard payment method details"},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"SubscriptionBillingAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Represents a billing amount breakdown for a subscription."},"SubscriptionStatusDto":{"enum":["invalid","created","active","canceled"],"type":"string","description":"Represents the current state of a subscription."},"SalesTaxJurisdictionDto":{"required":["name","taxes"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tax jurisdiction."},"taxes":{"type":"array","items":{"$ref":"#/components/schemas/SalesTaxJurisdictionTaxDto"},"description":"List of taxes applied within this jurisdiction."},"not_taxed_reason":{"type":["null","string"],"description":"Explanation for why taxes are not applied, if applicable.\nThis property is null when taxes are applied."}},"additionalProperties":false,"description":"Object representing a sales tax jurisdiction and its associated taxes."},"SalesTaxJurisdictionTaxDto":{"required":["tax_amount","tax_name","tax_rate","taxable_amount"],"type":"object","properties":{"tax_name":{"type":"string","description":"The name of the tax."},"taxable_amount":{"type":"string","description":"The amount subject to taxation, formatted as a string."},"tax_amount":{"type":"string","description":"The calculated tax amount, formatted as a string."},"tax_rate":{"type":"string","description":"The rate at which the tax is applied, formatted as a string."}},"additionalProperties":false,"description":"Object representing a specific tax within a sales tax jurisdiction."},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"SubscriptionLineDto":{"required":["currency","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","price","product_id","product_name","product_version_id","store_id","subscription_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"initial_order_line_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription line."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this subscription line."},"product_image_url":{"type":["null","string"],"description":"URL for the product image."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself."},"currency":{"type":"string","description":"Currency code for this subscription line."},"price":{"type":"integer","description":"Base price of the subscription line in smallest currency units (e.g., cents).","format":"int64"},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true}},"additionalProperties":false,"description":"Represents a line item within a subscription."}}}}
```

## The SubscriptionLineDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionLineDto":{"required":["currency","discount_amount","discount_amount_str","id","initial_discount_amount","initial_discount_amount_str","initial_giftcard_usage_amount","initial_giftcard_usage_amount_str","initial_subtotal_amount","initial_subtotal_amount_str","initial_tax_amount","initial_tax_amount_str","initial_total_amount","initial_total_amount_str","price","product_id","product_name","product_version_id","store_id","subscription_id","subtotal_amount","subtotal_amount_str","tax_amount","tax_amount_str","tax_inclusive","total_amount","total_amount_str"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"initial_order_line_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"Identifier for the pricing region associated with this subscription line."},"gift_to_customer_id":{"$ref":"#/components/schemas/FlakeId"},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"sale_id":{"$ref":"#/components/schemas/FlakeId"},"sale_version_id":{"$ref":"#/components/schemas/FlakeId"},"trial_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"Name of the product associated with this subscription line."},"product_image_url":{"type":["null","string"],"description":"URL for the product image."},"tax_inclusive":{"type":"boolean","description":"Indicates whether tax is included in the base price itself."},"currency":{"type":"string","description":"Currency code for this subscription line."},"price":{"type":"integer","description":"Base price of the subscription line in smallest currency units (e.g., cents).","format":"int64"},"discount_amount":{"type":"integer","description":"Amount of discount applied in smallest currency units.","format":"int64"},"discount_amount_str":{"type":"string","description":"Formatted string representation of the discount amount.","readOnly":true},"subtotal_amount":{"type":"integer","description":"Subtotal amount in smallest currency units.","format":"int64"},"subtotal_amount_str":{"type":"string","description":"Formatted string representation of the subtotal amount.","readOnly":true},"tax_amount":{"type":"integer","description":"Tax amount in smallest currency units.","format":"int64"},"tax_amount_str":{"type":"string","description":"Formatted string representation of the tax amount.","readOnly":true},"total_amount":{"type":"integer","description":"Total amount in smallest currency units.","format":"int64"},"total_amount_str":{"type":"string","description":"Formatted string representation of the total amount.","readOnly":true},"initial_discount_amount":{"type":"integer","description":"Initial discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_discount_amount_str":{"type":"string","description":"Formatted string representation of the initial discount amount.","readOnly":true},"initial_subtotal_amount":{"type":"integer","description":"Initial subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_subtotal_amount_str":{"type":"string","description":"Formatted string representation of the initial subtotal amount.","readOnly":true},"initial_giftcard_usage_amount":{"type":"integer","description":"Initial gift card usage amount in smallest currency units.","format":"int64"},"initial_giftcard_usage_amount_str":{"type":"string","description":"Formatted string representation of the initial gift card usage amount.","readOnly":true},"initial_tax_amount":{"type":"integer","description":"Initial tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_tax_amount_str":{"type":"string","description":"Formatted string representation of the initial tax amount.","readOnly":true},"initial_total_amount":{"type":"integer","description":"Initial total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_total_amount_str":{"type":"string","description":"Formatted string representation of the initial total amount.","readOnly":true},"presentment_currency":{"type":["null","string"],"description":"Presentment currency code (currency shown to customer)."},"presentment_subtotal_amount":{"type":["null","integer"],"description":"Presentment subtotal amount in smallest currency units.","format":"int64"},"presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment subtotal amount.","readOnly":true},"presentment_discount_amount":{"type":["null","integer"],"description":"Presentment discount amount in smallest currency units.","format":"int64"},"presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment discount amount.","readOnly":true},"presentment_tax_amount":{"type":["null","integer"],"description":"Presentment tax amount in smallest currency units.","format":"int64"},"presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment tax amount.","readOnly":true},"presentment_total_amount":{"type":["null","integer"],"description":"Presentment total amount in smallest currency units.","format":"int64"},"presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the presentment total amount.","readOnly":true},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"Initial presentment discount amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_discount_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment discount amount.","readOnly":true},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"Initial presentment subtotal amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_subtotal_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment subtotal amount.","readOnly":true},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"Initial presentment gift card usage amount in smallest currency units.","format":"int64"},"initial_presentment_giftcard_usage_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment gift card usage amount.","readOnly":true},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"Initial presentment tax amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_tax_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment tax amount.","readOnly":true},"initial_presentment_total_amount":{"type":["null","integer"],"description":"Initial presentment total amount in smallest currency units for the first billing cycle.","format":"int64"},"initial_presentment_total_amount_str":{"type":["null","string"],"description":"Formatted string representation of the initial presentment total amount.","readOnly":true}},"additionalProperties":false,"description":"Represents a line item within a subscription."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The SubscriptionStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionStatusDto":{"enum":["invalid","created","active","canceled"],"type":"string","description":"Represents the current state of a subscription."}}}}
```

## The SubscriptionsSummaryDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionsSummaryDto_V2":{"required":["active_subscription_count","revenue_basis"],"type":"object","properties":{"revenue_basis":{"$ref":"#/components/schemas/RevenueBasisDto_V2"},"monthly_recurring_revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"average_subscription_value":{"$ref":"#/components/schemas/MoneyDto_V2"},"active_subscription_count":{"type":"integer","format":"int64"}},"additionalProperties":false},"RevenueBasisDto_V2":{"enum":["unspecified","gross","gross_excluding_taxes","net"],"type":"string"},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The SubscriptionsSummaryForRangeDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"SubscriptionsSummaryForRangeDto_V2":{"required":["churned_subscription_count","new_subscription_count","revenue_basis"],"type":"object","properties":{"revenue_basis":{"$ref":"#/components/schemas/RevenueBasisDto_V2"},"new_subscription_count":{"type":"integer","format":"int64"},"churned_revenue":{"$ref":"#/components/schemas/MoneyDto_V2"},"churned_subscription_count":{"type":"integer","format":"int64"}},"additionalProperties":false},"RevenueBasisDto_V2":{"enum":["unspecified","gross","gross_excluding_taxes","net"],"type":"string"},"MoneyDto_V2":{"required":["amount_minor_units","iso_currency"],"type":"object","properties":{"iso_currency":{"type":"string","description":"The ISO 4217 currency code, e.g. \"USD\", \"GBP\"."},"amount_minor_units":{"type":"integer","description":"The amount in the smallest unit of the currency, e.g. cents for USD.\nFor example, 1000 = $10.00 USD.","format":"int64"}},"additionalProperties":false}}}}
```

## The TagDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TagDto":{"required":["created_at","created_by","enabled","id","name","slug","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","description":"When the tag was created","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"name":{"type":"string","description":"The unique name for the tag."},"slug":{"type":"string","description":"The unique slug for the tag."},"description":{"type":["null","string"],"description":"The description of the tag."},"image_url":{"type":["null","string"],"description":"The Image URL associated with the tag."},"enabled":{"type":"boolean","description":"Indicates whether this tag is enabled."},"updated_at":{"type":["null","string"],"description":"When the tag was last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The TierGroupDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TierGroupDto":{"required":["created_at","created_by","id","name","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The name of the tier group."},"created_at":{"type":"string","description":"When the tier group was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When was the tier group last updated.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The TimeSeriesChartDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesChartDto":{"required":["chart","primary_value","primary_value_comparison","series","unit"],"type":"object","properties":{"chart":{"type":"string"},"currency":{"type":["null","string"]},"primary_value":{"type":"number","format":"double"},"primary_value_comparison":{"type":"number","format":"double"},"unit":{"$ref":"#/components/schemas/TimeSeriesUnitDto"},"series":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesChartSeriesDto"}}},"additionalProperties":false},"TimeSeriesUnitDto":{"enum":["hour","day","week","month","quarter","year"],"type":"string"},"TimeSeriesChartSeriesDto":{"required":["data","label"],"type":"object","properties":{"label":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesChartSeriesEntryDto"}}},"additionalProperties":false},"TimeSeriesChartSeriesEntryDto":{"required":["interval_end","interval_start","value"],"type":"object","properties":{"interval_start":{"type":"string","format":"date-time"},"interval_end":{"type":"string","format":"date-time"},"value":{"type":"number","format":"double"}},"additionalProperties":false}}}}
```

## The TimeSeriesChartDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesChartDto_V2":{"required":["metric_type","primary_value","primary_value_comparison","series","unit"],"type":"object","properties":{"metric_type":{"$ref":"#/components/schemas/TimeSeriesChartMetricTypeDto_V2"},"dimension_type":{"$ref":"#/components/schemas/StatsDimensionTypeDto_V2"},"dimension_id":{"$ref":"#/components/schemas/FlakeId"},"revenue_basis":{"$ref":"#/components/schemas/RevenueBasisDto_V2"},"currency":{"type":["null","string"]},"primary_value":{"type":"number","format":"double"},"primary_value_comparison":{"type":"number","format":"double"},"unit":{"$ref":"#/components/schemas/TimeSeriesUnitDto_V2"},"series":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesChartSeriesDto_V2"}}},"additionalProperties":false},"TimeSeriesChartMetricTypeDto_V2":{"enum":["unspecified","payment_volume","payment_count","order_volume","order_count","new_customer_count","subscription_count","trial_count","abandoned_checkout_count","purchase_followup_count","upsell_count","player_count","mrr","tax_volume","gateway_fee_volume","platform_fee_volume"],"type":"string"},"StatsDimensionTypeDto_V2":{"enum":["unspecified","product","gameserver","tag","affiliate_link","coupon","giftcard","payout_id"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"RevenueBasisDto_V2":{"enum":["unspecified","gross","gross_excluding_taxes","net"],"type":"string"},"TimeSeriesUnitDto_V2":{"enum":["hour","day","week","month","quarter","year"],"type":"string"},"TimeSeriesChartSeriesDto_V2":{"required":["entries","label"],"type":"object","properties":{"label":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesChartSeriesEntryDto_V2"}}},"additionalProperties":false},"TimeSeriesChartSeriesEntryDto_V2":{"required":["interval_end","interval_start","value"],"type":"object","properties":{"interval_start":{"type":"string","format":"date-time"},"interval_end":{"type":"string","format":"date-time"},"value":{"type":"number","format":"double"}},"additionalProperties":false}}}}
```

## The TimeSeriesChartMetricTypeDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesChartMetricTypeDto_V2":{"enum":["unspecified","payment_volume","payment_count","order_volume","order_count","new_customer_count","subscription_count","trial_count","abandoned_checkout_count","purchase_followup_count","upsell_count","player_count","mrr","tax_volume","gateway_fee_volume","platform_fee_volume"],"type":"string"}}}}
```

## The TimeSeriesChartSeriesDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesChartSeriesDto":{"required":["data","label"],"type":"object","properties":{"label":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesChartSeriesEntryDto"}}},"additionalProperties":false},"TimeSeriesChartSeriesEntryDto":{"required":["interval_end","interval_start","value"],"type":"object","properties":{"interval_start":{"type":"string","format":"date-time"},"interval_end":{"type":"string","format":"date-time"},"value":{"type":"number","format":"double"}},"additionalProperties":false}}}}
```

## The TimeSeriesChartSeriesDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesChartSeriesDto_V2":{"required":["entries","label"],"type":"object","properties":{"label":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesChartSeriesEntryDto_V2"}}},"additionalProperties":false},"TimeSeriesChartSeriesEntryDto_V2":{"required":["interval_end","interval_start","value"],"type":"object","properties":{"interval_start":{"type":"string","format":"date-time"},"interval_end":{"type":"string","format":"date-time"},"value":{"type":"number","format":"double"}},"additionalProperties":false}}}}
```

## The TimeSeriesChartSeriesEntryDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesChartSeriesEntryDto":{"required":["interval_end","interval_start","value"],"type":"object","properties":{"interval_start":{"type":"string","format":"date-time"},"interval_end":{"type":"string","format":"date-time"},"value":{"type":"number","format":"double"}},"additionalProperties":false}}}}
```

## The TimeSeriesChartSeriesEntryDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesChartSeriesEntryDto_V2":{"required":["interval_end","interval_start","value"],"type":"object","properties":{"interval_start":{"type":"string","format":"date-time"},"interval_end":{"type":"string","format":"date-time"},"value":{"type":"number","format":"double"}},"additionalProperties":false}}}}
```

## The TimeSeriesUnitDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesUnitDto":{"enum":["hour","day","week","month","quarter","year"],"type":"string"}}}}
```

## The TimeSeriesUnitDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TimeSeriesUnitDto_V2":{"enum":["hour","day","week","month","quarter","year"],"type":"string"}}}}
```

## The ToggleStorePaymentMethodTypeRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ToggleStorePaymentMethodTypeRequestDto":{"required":["enabled"],"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false}}}}
```

## The TrialDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TrialDto":{"required":["created_at","customer","customer_id","id","period_scale","period_value","pretty_id","product_id","product_name","product_version_id","status","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The human-readable formatted version of the trial identifier.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_id":{"$ref":"#/components/schemas/FlakeId"},"checkout_line_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"customer":{"$ref":"#/components/schemas/CustomerDto"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product being trialed."},"product_image_url":{"type":["null","string"],"description":"The URL of the product image, if available."},"period_value":{"type":"integer","description":"The duration value of the trial period.","format":"int32"},"period_scale":{"type":"string","description":"The timescale unit for the trial period (e.g., \"days\", \"weeks\", \"months\")."},"starts_at":{"type":["null","string"],"description":"The date and time when the trial period starts, if applicable.","format":"date-time"},"ends_at":{"type":["null","string"],"description":"The date and time when the trial period ends, if applicable.","format":"date-time"},"status":{"$ref":"#/components/schemas/TrialStatusDto"},"created_at":{"type":"string","description":"The date and time when the trial was created.","format":"date-time"},"canceled_at":{"type":["null","string"],"description":"The date and time when the trial was canceled, if applicable.","format":"date-time"},"canceled_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomerDto":{"required":["created_at","id","metadata","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"profile":{"$ref":"#/components/schemas/CustomerGenericProfileDto"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"steam":{"$ref":"#/components/schemas/CustomerSteamProfileDto"},"minecraft_uuid":{"type":["null","string"],"description":"The customer's Minecraft UUID, if they have linked their Minecraft account.\nNot set for offline Minecraft stores. If the platform type is Minecraft - Geyser,\nand the profile is a bedrock account, this will be a UUID generated from the Xbox XUID."},"minecraft":{"$ref":"#/components/schemas/CustomerMinecraftProfileDto"},"xbox_xuid":{"type":["null","string"],"description":"The customer's Xbox XUID, if available."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"name":{"type":["null","string"],"description":"The display name for the customer."},"created_at":{"type":"string","description":"The date and time when the customer was created in the system.","format":"date-time"},"updated_at":{"type":["null","string"],"description":"The date and time when the customer was last updated, if applicable.","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional custom data associated with the customer."}},"additionalProperties":false,"description":"Represents a customer in the PayNow system with their associated profiles and metadata."},"CustomerGenericProfileDto":{"required":["id","name","platform"],"type":"object","properties":{"id":{"type":"string","description":"The platform-specific identifier for the profile."},"platform":{"type":"string","description":"The name of the platform this profile belongs to."},"name":{"type":"string","description":"The display name of the user on this platform."},"avatar_url":{"type":["null","string"],"description":"The URL to the user's avatar image on this platform."}},"additionalProperties":false,"description":"Represents a generic platform profile for a customer."},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerSteamProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/SteamId"},"name":{"type":"string","description":"The display name of the user on Steam."},"avatar_url":{"type":"string","description":"The URL to the user's Steam avatar image."}},"additionalProperties":false,"description":"Represents a Steam profile for a customer."},"CustomerMinecraftProfileDto":{"required":["avatar_url","id","name"],"type":"object","properties":{"id":{"type":"string","description":"The UUID of the Minecraft player.\nIf the platform is Minecraft Offline, this will be the name itself.\nIf the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID."},"name":{"type":"string","description":"The username of the Minecraft player."},"avatar_url":{"type":"string","description":"The URL to the player's Minecraft skin rendered as an avatar."}},"additionalProperties":false,"description":"Represents a Minecraft profile for a customer."},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"},"TrialStatusDto":{"enum":["created","active","canceled","completed"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The TrialEligibilityOverrideDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TrialEligibilityOverrideDto":{"required":["created_at","created_by","customer_id","expires_at","id","pretty_id","product_id","product_name","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"pretty_id":{"type":"string","description":"The human-readable formatted version of the override identifier.","readOnly":true},"store_id":{"$ref":"#/components/schemas/FlakeId"},"customer_id":{"$ref":"#/components/schemas/FlakeId"},"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_name":{"type":"string","description":"The name of the product associated with this override."},"product_image_url":{"type":["null","string"],"description":"The URL of the product image, if available."},"created_at":{"type":"string","description":"The date and time when this override was created.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":"string","description":"The date and time when this override expires and is no longer valid.","format":"date-time"},"used_at":{"type":["null","string"],"description":"The date and time when this override was used to start a trial, if applicable.","format":"date-time"},"used_on_trial_id":{"$ref":"#/components/schemas/FlakeId"},"note":{"type":["null","string"],"description":"An optional note or comment about this override."},"deleted_at":{"type":["null","string"],"description":"The date and time when this override was deleted, if applicable.","format":"date-time"},"deleted_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The TrialStatusDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TrialStatusDto":{"enum":["created","active","canceled","completed"],"type":"string"}}}}
```

## The TrialsSummaryDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TrialsSummaryDto_V2":{"required":["active_trial_count"],"type":"object","properties":{"active_trial_count":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The TrialsSummaryForRangeDto\_V2 object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TrialsSummaryForRangeDto_V2":{"required":["canceled_trial_count","converted_trial_count","started_trial_count"],"type":"object","properties":{"started_trial_count":{"type":"integer","format":"int64"},"canceled_trial_count":{"type":"integer","format":"int64"},"converted_trial_count":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The TrustStoreRequirementDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TrustStoreRequirementDto":{"required":["category","code","created_at","id","metadata","name","requested_by","restricts_capabilities","status","store_id","submissions"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"template_id":{"type":["null","string"],"description":"Template ID if this requirement was created from a template. Null for ad-hoc requirements."},"originating_flag_id":{"$ref":"#/components/schemas/FlakeId"},"category":{"$ref":"#/components/schemas/StoreRequirementCategory"},"code":{"type":"string","description":"Unique code identifying the type of requirement. Copied from template or custom for ad-hoc requirements."},"name":{"type":"string","description":"Human-readable name of the requirement. Copied from template or custom for ad-hoc requirements."},"description":{"type":["null","string"],"description":"Detailed description explaining what the store needs to provide. Copied from template or custom for ad-hoc requirements."},"schema":{"type":"null","description":"JSON schema defining the form fields, validation rules, and document requirements"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for this requirement (stored as JSON)"},"status":{"$ref":"#/components/schemas/StoreRequirementStatus"},"requested_by":{"$ref":"#/components/schemas/StoreRequirementActionParty"},"requested_by_detail":{"type":["null","string"],"description":"Specifies the specific requester entity (e.g., \"stripe\", \"trolley\", or admin user ID)\nFree-form string for internal records"},"created_at":{"type":"string","description":"When this requirement was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When this requirement was last updated","format":"date-time"},"deadline_at":{"type":["null","string"],"description":"When this requirement must be completed by (optional)","format":"date-time"},"submitted_at":{"type":["null","string"],"description":"When the store submitted their response to this requirement","format":"date-time"},"verified_at":{"type":["null","string"],"description":"When this requirement was verified and approved","format":"date-time"},"rejected_at":{"type":["null","string"],"description":"When this requirement was rejected for not meeting standards","format":"date-time"},"restricts_capabilities":{"type":"array","items":{"type":"string"},"description":"Store capabilities that are restricted until this requirement is satisfied"},"submissions":{"type":"array","items":{"$ref":"#/components/schemas/TrustStoreRequirementSubmissionDto"},"description":"Associated submissions for this requriement."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"StoreRequirementCategory":{"enum":["invalid","business","kyc","compliance","risk","technical","financial","legal","other"],"type":"string","description":"Represents categories of requirements that must be fulfilled for store setup and compliance in the PayNow platform."},"StoreRequirementStatus":{"enum":["invalid","pending","under_review","requires_revision","approved","expired","waived","rejected_final"],"type":"string"},"StoreRequirementActionParty":{"enum":["invalid","store","paynow","payment_processor","payout_provider","kyc_provider","external"],"type":"string","description":"Determines the party that needs to perform or requests a verification"},"TrustStoreRequirementSubmissionDto":{"required":["id","store_id","store_requirement_field_id","store_requirement_id","submitted_at","submitted_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_field_id":{"type":"string","description":"The identifier of the specific field within the store requirement."},"text_value":{"type":["null","string"],"description":"The text value submitted for this field, if applicable."},"file_id":{"type":["null","string"],"description":"The identifier of the uploaded file, if a file was submitted."},"file_name":{"type":["null","string"],"description":"The original name of the uploaded file."},"file_content_type":{"type":["null","string"],"description":"The MIME content type of the uploaded file."},"file_size_bytes":{"type":["null","integer"],"description":"The size of the uploaded file in bytes.","format":"int64"},"submitted_at":{"type":"string","description":"The timestamp when this submission was made.","format":"date-time"},"submitted_by":{"$ref":"#/components/schemas/ActorDto"},"submitted_by_ip_address":{"type":["null","string"],"description":"The IP address from which the submission was made."},"submitted_by_user_agent":{"type":["null","string"],"description":"The user agent string of the client that made the submission."}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The TrustStoreRequirementSubmissionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"TrustStoreRequirementSubmissionDto":{"required":["id","store_id","store_requirement_field_id","store_requirement_id","submitted_at","submitted_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_id":{"$ref":"#/components/schemas/FlakeId"},"store_requirement_field_id":{"type":"string","description":"The identifier of the specific field within the store requirement."},"text_value":{"type":["null","string"],"description":"The text value submitted for this field, if applicable."},"file_id":{"type":["null","string"],"description":"The identifier of the uploaded file, if a file was submitted."},"file_name":{"type":["null","string"],"description":"The original name of the uploaded file."},"file_content_type":{"type":["null","string"],"description":"The MIME content type of the uploaded file."},"file_size_bytes":{"type":["null","integer"],"description":"The size of the uploaded file in bytes.","format":"int64"},"submitted_at":{"type":"string","description":"The timestamp when this submission was made.","format":"date-time"},"submitted_by":{"$ref":"#/components/schemas/ActorDto"},"submitted_by_ip_address":{"type":["null","string"],"description":"The IP address from which the submission was made."},"submitted_by_user_agent":{"type":["null","string"],"description":"The user agent string of the client that made the submission."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"}}}}
```

## The UnqueueCommandsRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UnqueueCommandsRequestDto":{"required":["attempt_ids"],"type":"object","properties":{"attempt_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UnqueueCommandsResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UnqueueCommandsResponseDto":{"required":["unqueued_count"],"type":"object","properties":{"unqueued_count":{"type":"integer","format":"int64"}},"additionalProperties":false}}}}
```

## The UpdateAffiliateLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateAffiliateLinkDto":{"type":"object","properties":{"wallet_id":{"type":"string"},"enabled":{"type":"boolean"},"code":{"type":"string"},"referer_type":{"$ref":"#/components/schemas/AffiliateLinkRefererTypeDto"},"tracking_length_days":{"type":"integer","format":"int32"},"apply_for_subscriptions":{"type":"boolean"},"discount_type":{"$ref":"#/components/schemas/AffiliateLinkDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"commission_type":{"$ref":"#/components/schemas/AffiliateLinkCommissionTypeDto"},"commission_amount":{"type":"integer","format":"int64"},"commission_amount_steps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateLinkCommissionAmountStepDto"}},"last_commission_amount_step_repeats":{"type":"boolean"}}},"AffiliateLinkRefererTypeDto":{"enum":["invalid","first_referer","last_referer"],"type":"string","description":"Specifies which affiliate link is credited when a customer follows multiple links before purchasing."},"AffiliateLinkDiscountTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of discount offered to customers referred through an affiliate link."},"AffiliateLinkCommissionTypeDto":{"enum":["none","fixed","percentage"],"type":"string","description":"Specifies the type of commission an affiliate earns from referred purchases."},"AffiliateLinkCommissionAmountStepDto":{"required":["billing_cycle_sequence","commission_amount"],"type":"object","properties":{"billing_cycle_sequence":{"type":"integer","description":"The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.","format":"int32"},"commission_amount":{"type":"integer","description":"The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).","format":"int64"}},"additionalProperties":false,"description":"Represents the commission for a specific subscription renewal billing cycle.\nA step applies to its exact cycle - see the affiliate link's 'last_commission_amount_step_repeats' for what happens past the last step."}}}}
```

## The UpdateCouponDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateCouponDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"code":{"type":"string"},"note":{"type":"string"},"duration":{"$ref":"#/components/schemas/CouponDurationDto"},"duration_in_months":{"type":["null","integer"],"format":"int32"},"duration_in_intervals":{"type":["null","integer"],"format":"int32"},"discount_type":{"$ref":"#/components/schemas/CouponDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"discount_apply_individually":{"type":"boolean"},"discount_apply_before_sales":{"type":"boolean"},"apply_to_products":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"apply_to_tags":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"usable_by_customer_id":{"$ref":"#/components/schemas/FlakeId"},"minimum_order_value":{"type":"integer","format":"int64"},"redeem_limit_store_enabled":{"type":"boolean"},"redeem_limit_store_amount":{"type":"integer","format":"int64"},"redeem_limit_customer_enabled":{"type":"boolean"},"redeem_limit_customer_amount":{"type":"integer","format":"int64"},"usable_on_one_time_purchase":{"type":"boolean"},"usable_on_subscription":{"type":"boolean"},"usable_at":{"type":["null","string"],"format":"date-time"},"expires_at":{"type":["null","string"],"format":"date-time"}}},"CouponDurationDto":{"enum":["once","forever","repeating"],"type":"string","description":"Defines the duration for which a coupon remains valid."},"CouponDiscountTypeDto":{"enum":["unspecified","percent","amount"],"type":"string","description":"Specifies the type of discount applied by a coupon."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UpdateGameServerConsoleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateGameServerConsoleDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":"string"},"secure":{"type":"boolean"}}}}}}
```

## The UpdateGameServerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateGameServerDto":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"}}}}}}
```

## The UpdateGiftCardDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateGiftCardDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"code":{"type":"string"},"note":{"type":"string"},"balance":{"type":"integer","format":"int64"},"usable_at":{"type":"string","format":"date-time"},"expires_at":{"type":["null","string"],"format":"date-time"}}}}}}
```

## The UpdateNavLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateNavLinkDto":{"type":"object","properties":{"tag_id":{"$ref":"#/components/schemas/FlakeId"},"parent_node_id":{"type":"string"},"order":{"type":["null","integer"],"format":"int32"}}},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UpdateNavLinkOrderChangeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateNavLinkOrderChangeDto":{"required":["node_id","order"],"type":"object","properties":{"node_id":{"$ref":"#/components/schemas/FlakeId"},"order":{"type":"integer","format":"int32"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UpdateProductSortOrderRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateProductSortOrderRequestDto":{"required":["product_ids"],"type":"object","properties":{"product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"},"description":"An array of product IDs in the order that they should be sorted."}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UpdateSaleDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateSaleDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"},"discount_type":{"$ref":"#/components/schemas/SaleDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int32"},"duration":{"$ref":"#/components/schemas/SaleDurationDto"},"duration_in_intervals":{"type":"integer","format":"int32"},"apply_to_product_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"apply_to_tag_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlakeId"}},"minimum_order_value":{"type":"integer","format":"int32"},"begins_at":{"type":"string","format":"date-time"},"ends_at":{"type":["null","string"],"format":"date-time"}}},"SaleDiscountTypeDto":{"enum":["percent","amount"],"type":"string"},"SaleDurationDto":{"enum":["unspecified","once","forever","repeating"],"type":"string"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UpdateStoreDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateStoreDto":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string"},"game":{"type":"string"},"description":{"type":"string"},"website_url":{"type":"string"},"contact_email":{"type":"string"},"support_email":{"type":"string"},"support_url":{"type":"string"},"integration_type":{"type":"string"},"live_mode":{"type":"boolean"},"minecraft_bedrock_username_prefix":{"type":"string"}}}}}}
```

## The UpdateStoreMemberDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateStoreMemberDto":{"required":["role_id"],"type":"object","properties":{"role_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UpdateStorePaymentSettingsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateStorePaymentSettingsDto":{"type":"object","properties":{"show_all_payment_methods_for_subscriptions":{"type":"boolean"},"store_tax_inclusive_pricing":{"type":"boolean"},"block_prepaid_cards":{"$ref":"#/components/schemas/PrepaidCardsBlockingTypeDto"},"promo_code_stacking_behavior":{"$ref":"#/components/schemas/StorePromoCodeStackingBehaviorDto"},"adaptive_currency_enabled":{"type":"boolean"},"show_adaptive_currency_on_storefront":{"type":"boolean"}}},"PrepaidCardsBlockingTypeDto":{"enum":["unspecified","none","trials","all_recurring"],"type":"string","description":"Defines when prepaid cards should be blocked from use."},"StorePromoCodeStackingBehaviorDto":{"enum":["invalid","disabled","enabled","gift_cards_only"],"type":"string","description":"Defines the behavior of promo code stacking."}}}}
```

## The UpdateStoreUpsellSettingsDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateStoreUpsellSettingsDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"automatic_recommendations_enabled":{"type":"boolean"},"automatic_recommendations_discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"automatic_recommendations_discount_amount":{"type":"integer","format":"int64"},"recommendation_overrides_enabled":{"type":"boolean"},"recommendation_overrides":{"type":"array","items":{"$ref":"#/components/schemas/StoreUpsellRecommendationDto"}},"checkout_style":{"$ref":"#/components/schemas/StoreUpsellCheckoutStyleDto"}}},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"StoreUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"StoreUpsellCheckoutStyleDto":{"enum":["unknown","inline","inline_and_prepayment_dialog","dedicated_step"],"type":"string"}}}}
```

## The UpdateSubscriptionLineRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateSubscriptionLineRequestDto":{"required":["custom_variables"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variable values keyed by variable name."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UpdateSubscriptionRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateSubscriptionRequestDto":{"required":["lines","proration_behavior"],"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/UpdateSubscriptionLineRequestDto"},"description":"The line items describing the desired state of the subscription after the change."},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"}},"additionalProperties":false},"UpdateSubscriptionLineRequestDto":{"required":["custom_variables"],"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"product_version_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom variable values keyed by variable name."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."}}}}
```

## The UpdateSubscriptionResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateSubscriptionResponseDto":{"required":["subscription_change"],"type":"object","properties":{"subscription_change":{"$ref":"#/components/schemas/SubscriptionChangeDto"},"pending_payment":{"$ref":"#/components/schemas/CheckoutPaymentInfoDto"}},"additionalProperties":false,"description":"Response returned after a subscription change is initiated."},"SubscriptionChangeDto":{"required":["created_at","id","lines","next_billing_amount","next_billing_presentment_amount","off_session","prorated_amount","proration_behavior","status","subscription_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_id":{"$ref":"#/components/schemas/FlakeId"},"prorated_order_id":{"$ref":"#/components/schemas/FlakeId"},"status":{"$ref":"#/components/schemas/SubscriptionChangeStatusDto"},"proration_behavior":{"$ref":"#/components/schemas/ProrationBehaviorDto"},"off_session":{"type":"boolean","description":"Whether this change was initiated without active customer interaction."},"prorated_amount":{"$ref":"#/components/schemas/SubscriptionChangeProratedAmountDto"},"created_at":{"type":"string","format":"date-time"},"applied_at":{"type":["null","string"],"format":"date-time"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionChangeLineDto"}},"next_billing_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"},"next_billing_presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeAmountDto"}},"additionalProperties":false,"description":"A pending or applied change to a subscription."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SubscriptionChangeStatusDto":{"enum":["invalid","pending_payment","pending_renewal","applied","canceled","pending_verification"],"type":"string","description":"Represents the status of a subscription change."},"ProrationBehaviorDto":{"enum":["invalid","immediate","next_billing_period","none"],"type":"string","description":"Describes how proration is handled when a subscription change is applied."},"SubscriptionChangeProratedAmountDto":{"required":["currency","presentment_currency","presentment_prorated_amount","prorated_amount"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 settlement currency code, in lowercase."},"prorated_amount":{"type":"integer","description":"Total prorated charge in smallest settlement currency units, including tax.","format":"int64"},"presentment_currency":{"type":"string","description":"ISO 4217 presentment currency code, in lowercase."},"presentment_prorated_amount":{"type":"integer","description":"Total prorated charge in smallest presentment currency units, including tax.","format":"int64"}},"additionalProperties":false,"description":"The total prorated charge for a subscription change, expressed in both settlement and presentment currencies."},"SubscriptionChangeLineDto":{"required":["amount","id","is_deleted","presentment_amount","price","product","prorated_amount","prorated_presentment_amount","remaining_minutes","tax_inclusive","total_minutes"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"subscription_line_id":{"$ref":"#/components/schemas/FlakeId"},"is_deleted":{"type":"boolean","description":"Whether this line is being removed by the change."},"tax_inclusive":{"type":"boolean","description":"Whether tax is included in the base price."},"price":{"type":"integer","description":"Base price in smallest settlement currency units.","format":"int64"},"product":{"$ref":"#/components/schemas/SubscriptionChangeLineProductDto"},"amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"presentment_amount":{"$ref":"#/components/schemas/SubscriptionChangeLineAmountDto"},"prorated_amount":{"type":"integer","description":"Prorated charge for this line in smallest settlement currency units.","format":"int64"},"prorated_presentment_amount":{"type":"integer","description":"Prorated charge for this line in smallest presentment currency units.","format":"int64"},"remaining_minutes":{"type":"integer","description":"Minutes remaining in the billing period at the time of change - used to calculate proration.","format":"int64"},"total_minutes":{"type":"integer","description":"Total minutes in the billing period - used to calculate proration.","format":"int64"}},"additionalProperties":false,"description":"A single line item within a subscription change."},"SubscriptionChangeLineProductDto":{"required":["custom_variables","id","name","version_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"version_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name of the product."},"image_url":{"type":["null","string"],"description":"URL of the product image, if set."},"selected_gameserver_id":{"$ref":"#/components/schemas/FlakeId"},"pricing_region_id":{"type":["null","string"],"description":"The pricing region used to determine the price, if applicable."},"custom_variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomVariableLineItemDto"},"description":"Custom variables set on this line item, keyed by variable identifier."}},"additionalProperties":false,"description":"The product associated with a subscription change line."},"CustomVariableLineItemDto":{"required":["description","id","identifier","name","price","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"The identifier used to reference this custom variable (e.g., \"color\", \"size\")."},"name":{"type":"string","description":"The display name of the custom variable shown to users."},"description":{"type":"string","description":"A detailed description of what this custom variable represents."},"price":{"type":"integer","description":"The price associated with this custom variable in the smallest currency unit (e.g., cents).","format":"int64"},"value":{"type":"string","description":"The selected value for this custom variable."}},"additionalProperties":false},"SubscriptionChangeLineAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents)."},"SubscriptionChangeAmountDto":{"required":["currency","discount","subtotal","tax","total"],"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code, in lowercase."},"subtotal":{"type":"integer","description":"Base amount before discounts or tax, in smallest currency units.","format":"int64"},"discount":{"type":"integer","description":"Total discount applied, in smallest currency units.","format":"int64"},"tax":{"type":"integer","description":"Tax amount, in smallest currency units.","format":"int64"},"total":{"type":"integer","description":"Amount due after discounts and tax, in smallest currency units.","format":"int64"}},"additionalProperties":false,"description":"Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents)."},"CheckoutPaymentInfoDto":{"required":["declined","status"],"type":"object","properties":{"status":{"type":"string","description":"Status string from the payment provider."},"declined":{"type":"boolean","description":"Indicates whether the payment was declined."},"decline_message":{"type":["null","string"],"description":"The customer readable decline reason, if the payment was declined."},"checkout_url":{"type":["null","string"],"description":"Checkout URL to redirect to for on-session payments."}},"additionalProperties":false,"description":"Payment outcome information returned after a subscription change triggers an immediate charge."}}}}
```

## The UpdateTierGroupRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateTierGroupRequestDto":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"The name of the tier group."}},"additionalProperties":false}}}}
```

## The UpdateTrialEligibilityOverrideDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateTrialEligibilityOverrideDto":{"type":"object","properties":{"product_id":{"$ref":"#/components/schemas/FlakeId"},"expires_at":{"type":"string","format":"date-time"},"note":{"type":"string"}}},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The UpdateWebhookDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpdateWebhookDto":{"required":["reset_secret","subscribed_to","url"],"type":"object","properties":{"url":{"type":"string"},"reset_secret":{"type":"boolean"},"subscribed_to":{"$ref":"#/components/schemas/WebhookEventType"},"discord_description_template":{"type":["null","string"]},"discord_title":{"type":["null","string"]},"discord_color":{"type":["null","string"]},"discord_format":{"$ref":"#/components/schemas/WebhookDiscordFormatDto"}},"additionalProperties":false},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"WebhookDiscordFormatDto":{"enum":["Invalid","Embed","Text"],"type":"string"}}}}
```

## The UpsellDiscountTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"}}}}
```

## The UpsellTypeDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"}}}}
```

## The UpsertBanRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertBanRequestDto":{"type":"object","properties":{"reason":{"type":["null","string"]},"identities":{"type":["null","array"],"items":{"$ref":"#/components/schemas/BanIdentityDto"}},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"}}}}
```

## The UpsertCustomVariableRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertCustomVariableRequestDto":{"required":["identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string for programmatic reference.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name shown to customers."},"description":{"type":["null","string"],"description":"Description explaining the purpose of this custom variable."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern for validating customer input.\nOnly applies to text and number types. Ignored for dropdown types."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionRequestDto"},"description":"Predefined options for dropdown-type custom variables.\nRequired for dropdown types, ignored for text and number types.\nWhen updating, this completely replaces all existing options."}},"additionalProperties":false,"description":"Unified request model for creating or updating custom variables.\nContains all the configurable properties of a custom variable."},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionRequestDto":{"required":["is_default","name","price","price_type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"The value the command variable will be replaced with."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).\nIf fixed, the value is in cents, if a percentage, in permille.","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default.\nOnly one option per custom variable should be marked as default."}},"additionalProperties":false,"description":"Request model for defining custom variable options.\nUsed within UpsertCustomVariableRequestDto for dropdown-type variables."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."}}}}
```

## The UpsertCustomerRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertCustomerRequestDto":{"type":"object","properties":{"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID for the customer."},"minecraft_platform":{"$ref":"#/components/schemas/CustomerMinecraftPlatform"},"xbox_xuid":{"type":["null","string"],"description":"The Xbox XUID (Xbox User ID) for the customer."},"name":{"type":["null","string"],"description":"The name of the customer."},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional customer information stored as key-value pairs."}},"additionalProperties":false},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"CustomerMinecraftPlatform":{"enum":["unknown","java","bedrock"],"type":"string"}}}}
```

## The UpsertGlobalCommandDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertGlobalCommandDto":{"required":["content","execution_rule","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"The command content to be executed."},"online_only":{"type":"boolean","description":"Indicates whether the command should only be executed when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"List of specific game server IDs where this command should be executed."},"execution_rule":{"$ref":"#/components/schemas/ProductCommandExecutionRuleDto"}},"additionalProperties":false,"description":"Data transfer object used for creating new global commands or updating existing ones.\nSupports partial updates following PATCH semantics."},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"ProductCommandExecutionRuleDto":{"enum":["invalid","once_per_item","once_per_order"],"type":"string"}}}}
```

## The UpsertProductRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertProductRequestDto":{"type":"object","properties":{"slug":{"type":["null","string"],"description":"The unique URL-safe identifier (slug) for the product."},"name":{"type":["null","string"],"description":"The display name of the product."},"description":{"type":["null","string"],"description":"The detailed description of the product."},"label":{"type":["null","string"],"description":"The display label for the product."},"price":{"type":["null","integer"],"description":"The price of the product in the lowest denominator (e.g. cents).","format":"int64"},"single_game_server_only":{"type":["null","boolean"],"description":"Indicates whether the customer is prompted to select a game server before purchasing."},"allow_one_time_purchase":{"type":["null","boolean"],"description":"Indicates whether one-time purchases are allowed."},"allow_subscription":{"type":["null","boolean"],"description":"Indicates whether subscription purchases are allowed."},"subscription_interval_value":{"type":["null","integer"],"description":"The subscription interval value.","format":"int32"},"subscription_interval_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"trial":{"$ref":"#/components/schemas/UpsertProductTrialConfigurationDto"},"upselling":{"$ref":"#/components/schemas/UpsertProductUpsellConfigurationDto"},"remove_after_enabled":{"type":["null","boolean"],"description":"Indicates whether automatic removal is enabled."},"remove_after_time_value":{"type":["null","integer"],"description":"The time value for automatic removal.","format":"int32"},"remove_after_time_scale":{"$ref":"#/components/schemas/ProductRemoveAfterIntervalScale"},"store_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"customer_stock_limit":{"$ref":"#/components/schemas/ProductStockLimitDto"},"stock_limit_do_not_include_removed":{"type":["null","boolean"],"description":"Indicates whether removed items should be excluded from stock limits."},"tags":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The tag IDs associated with the product."},"gameservers":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The gameserver IDs associated with the product."},"commands":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductCommandDto"},"description":"The commands to be executed at different stages."},"deliverable_actions":{"$ref":"#/components/schemas/ProductDeliverableActionsDto"},"metadata":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Additional metadata for the product."},"payout_splits":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ProductPayoutSplitDto"},"description":"The payout splits for revenue distribution.\nRequires special approval."},"tax_code":{"$ref":"#/components/schemas/ProductTaxCode"},"allow_concurrent_active_items":{"type":["null","boolean"],"description":"Indicates whether concurrent active items are allowed."},"is_hidden":{"type":["null","boolean"],"description":"Indicates whether the product is hidden."},"is_gifting_disabled":{"type":["null","boolean"],"description":"Indicates whether gifting is disabled."},"enabled_at":{"type":["null","string"],"description":"The date and time when the product becomes enabled.\nSet to `null` to keep enabled.","format":"date-time"},"enabled_until":{"type":["null","string"],"description":"The date and time until which the product remains enabled.\nSet to `null` to keep enabled.","format":"date-time"},"required_product_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of products required for purchasing this product."},"required_product_all":{"type":["null","boolean"],"description":"Indicates whether all required products are needed."},"custom_variable_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"The IDs of associated custom variables."},"is_gift_cards_disabled":{"type":["null","boolean"],"description":"Indicates if applying gift cards should be disabled on the product."},"is_coupons_disabled":{"type":["null","boolean"],"description":"Indicates if applying coupons should be disabled on the product."},"is_affiliate_links_disabled":{"type":["null","boolean"],"description":"Indicates if applying affiliate links should be disabled on the product."},"tier_group_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"UpsertProductTrialConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"],"description":"Indicates if trials should be enabled for the product."},"period_value":{"type":["null","integer"],"description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":["null","boolean"],"description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":["null","boolean"],"description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":["null","integer"],"description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":["null","boolean"],"description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":["null","integer"],"description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trials is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"UpsertProductUpsellConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"]},"recommendations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/UpsertProductUpsellRecommendationDto"}}},"additionalProperties":false},"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"},"ProductRemoveAfterIntervalScale":{"enum":["invalid","day","week","month"],"type":"string"},"ProductStockLimitDto":{"required":["enabled","include_trials","time_scale"],"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates whether stock limit is enabled."},"quantity":{"type":["null","integer"],"description":"The quantity limit.","format":"int32"},"time_value":{"type":["null","integer"],"description":"The time value for stock limit period.","format":"int32"},"time_scale":{"$ref":"#/components/schemas/ProductStockTimeScale"},"include_trials":{"type":"boolean","description":"Indicates if trials should be included in the active stock limit calculation."}},"additionalProperties":false},"ProductStockTimeScale":{"enum":["invalid","day","week","month","year"],"type":"string"},"ProductCommandDto":{"required":["content","online_only","stage"],"type":"object","properties":{"stage":{"$ref":"#/components/schemas/ProductCommandStage"},"content":{"type":"string","description":"Content of the command."},"online_only":{"type":"boolean","description":"Value indicating whether the command should only execute when the player is online."},"override_execute_on_gameserver_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/FlakeId"},"description":"Value indicating on which game servers should the command be executed.\nIf left empty or null, then the default behavior applies\n(executing on all game servers or on the selected game server is selection is enabled)"}},"additionalProperties":false},"ProductCommandStage":{"enum":["invalid","on_purchase","on_expire","on_refund","on_renew","on_chargeback","on_trial_start","on_trial_expire"],"type":"string","description":"Defines the stages at which product commands can be executed."},"ProductDeliverableActionsDto":{"required":["grant_giftcard"],"type":"object","properties":{"grant_giftcard":{"type":"boolean","description":"Value indicating whether to grant a giftcard with the product with the subtotal amount."}},"additionalProperties":false},"ProductPayoutSplitDto":{"required":["platform_fee","user_id"],"type":"object","properties":{"user_id":{"$ref":"#/components/schemas/FlakeId"},"percentage":{"type":["null","integer"],"description":"The percentage of the payment allocated to the user, in basis points (500 = 5%).\nThe last payout split must have this field set to `null` to receive the remaining portion.","format":"int64"},"platform_fee":{"type":"integer","description":"The platform fee percentage your platform receives, in basis points (500 = 5%).","format":"int64"}},"additionalProperties":false},"ProductTaxCode":{"enum":["unknown","digital_goods_subscription","digital_goods_permanent","saas","downloaded_software","digital_goods_subscription_gaming","digital_goods_permanent_gaming","iaas","paas","saas_security","saas_storage"],"type":"string","description":"Determines the category of the product for taxation purposes.\nContact support for help with setting the correct tax code."}}}}
```

## The UpsertProductTrialConfigurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertProductTrialConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"],"description":"Indicates if trials should be enabled for the product."},"period_value":{"type":["null","integer"],"description":"The trial period value.","format":"int32"},"period_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"revoke_immediately_when_canceled":{"type":["null","boolean"],"description":"Indicates if the trial should be revoked immediately when canceled or at the end of the trial."},"new_customers_only":{"type":["null","boolean"],"description":"Restricts trials to customers who have no orders within the lookback period.\nWhen enabled, customers with recent orders will be ineligible for trials."},"new_customer_order_lookback_value":{"type":["null","integer"],"description":"The lookback period value for determining if a customer is \"new\".\nOnly used when new_customers_only is enabled.","format":"int32"},"new_customer_order_lookback_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"},"allow_repeat_trials":{"type":["null","boolean"],"description":"Allows customers to trial again after a cooldown period following their previous trial.\nWhen disabled, customers can only trial once and never become eligible again."},"repeat_trial_cooldown_value":{"type":["null","integer"],"description":"The cooldown period value before a customer becomes eligible for another trial.\nOnly used when allow_repeat_trials is enabled.","format":"int32"},"repeat_trial_cooldown_scale":{"$ref":"#/components/schemas/ProductSubscriptionIntervalScale"}},"additionalProperties":false,"description":"Represents the configuration for trials of a product"},"ProductSubscriptionIntervalScale":{"enum":["invalid","day","week","month","year"],"type":"string"}}}}
```

## The UpsertProductUpsellConfigurationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertProductUpsellConfigurationDto":{"type":"object","properties":{"enabled":{"type":["null","boolean"]},"recommendations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/UpsertProductUpsellRecommendationDto"}}},"additionalProperties":false},"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"}}}}
```

## The UpsertProductUpsellRecommendationDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertProductUpsellRecommendationDto":{"required":["discount_amount","discount_type","prefer_as_subscription","recommended_product_id","type"],"type":"object","properties":{"recommended_product_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/UpsellTypeDto"},"discount_type":{"$ref":"#/components/schemas/UpsellDiscountTypeDto"},"discount_amount":{"type":"integer","format":"int64"},"minimum_base_product_quantity":{"type":["null","integer"],"format":"int32"},"minimum_recommended_product_quantity":{"type":["null","integer"],"format":"int32"},"quantity_to_add":{"type":["null","integer"],"format":"int32"},"prefer_as_subscription":{"type":"boolean"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsellTypeDto":{"enum":["unknown","additional","alternative","increase_quantity"],"type":"string"},"UpsellDiscountTypeDto":{"enum":["unknown","none","fixed","percentage"],"type":"string"}}}}
```

## The UpsertTagRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"UpsertTagRequestDto":{"type":"object","properties":{"name":{"type":["null","string"]},"slug":{"type":["null","string"]},"description":{"type":["null","string"]},"enabled":{"type":["null","boolean"]}},"additionalProperties":false}}}}
```

## The ValidationError object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## The WebhookDiscordFormatDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"WebhookDiscordFormatDto":{"enum":["Invalid","Embed","Text"],"type":"string"}}}}
```

## The WebhookEventType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"}}}}
```

## The WebhookHistoryDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"WebhookHistoryDto":{"required":["history","page"],"type":"object","properties":{"page":{"type":"integer","format":"int32"},"history":{"type":"array","items":{"$ref":"#/components/schemas/QueuedWebhookDto"}}},"additionalProperties":false},"QueuedWebhookDto":{"required":["created_at","event","executions","id","payload","state","webhook_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"webhook_id":{"$ref":"#/components/schemas/FlakeId"},"created_at":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/WebhookState"},"next_retry":{"type":["null","string"],"format":"date-time"},"event":{"$ref":"#/components/schemas/WebhookEventType"},"payload":{},"executions":{"type":"array","items":{"$ref":"#/components/schemas/ExecutedWebhookDto"}}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"WebhookState":{"enum":["success","pending","failed","all"],"type":"string"},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"ExecutedWebhookDto":{"required":["id","started_at","status_code"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["null","string"],"format":"date-time"},"status_code":{"type":"integer","format":"int32"},"response":{"type":["null","string"]}},"additionalProperties":false}}}}
```

## The WebhookState object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"WebhookState":{"enum":["success","pending","failed","all"],"type":"string"}}}}
```

## The WebhookSubscriptionDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"WebhookSubscriptionDto":{"required":["id","secret","subscribed_to","type","url"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"url":{"type":"string"},"secret":{"type":"string"},"subscribed_to":{"$ref":"#/components/schemas/WebhookEventType"},"type":{"$ref":"#/components/schemas/WebhookType"},"discord_description_template":{"type":["null","string"]},"discord_title":{"type":["null","string"]},"discord_color":{"type":["null","string"]},"discord_format":{"$ref":"#/components/schemas/WebhookDiscordFormatDto"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"},"WebhookType":{"enum":["json_v1","discord_v1"],"type":"string"},"WebhookDiscordFormatDto":{"enum":["Invalid","Embed","Text"],"type":"string"}}}}
```

## The WebhookType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"WebhookType":{"enum":["json_v1","discord_v1"],"type":"string"}}}}
```

## The WebhookVariablesDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"components":{"schemas":{"WebhookVariablesDto":{"required":["event_type","variables"],"type":"object","properties":{"event_type":{"$ref":"#/components/schemas/WebhookEventType"},"variables":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"WebhookEventType":{"enum":["OnIgnore","OnOrderCompleted","OnRefund","OnChargeback","OnDeliveryItemAdded","OnDeliveryItemActivated","OnDeliveryItemUsed","OnDeliveryItemRevoked","OnSubscriptionActivated","OnSubscriptionRenewed","OnSubscriptionCanceled","OnDiscordOrderActionsQueued","OnConnectedUserRegistered","OnConnectedUserBecamePayable","OnConnectedUserPayoutCreated","OnConnectedUserPayoutCompleted","OnConnectedUserTransactionInserted","OnConnectedUserBecameUnpayable","OnTrialActivated","OnTrialCompleted","OnTrialCanceled","OnPurchaseFollowUpAttemptEmailSent","OnPurchaseFollowUpAttemptSucceeded","OnAbandonedCheckoutRecoveryAttemptEmailSent","OnAbandonedCheckoutRecoveryAttemptSucceeded","OnChargebackClosed","OnDeliveryItemExpired","OnDeliveryItemRenewed","OnConnectedUserTrustStatusChanged","OnPaymentCompleted","OnPaymentFailed"],"type":"string"}}}}
```


# Gameserver API


# Delivery

## POST /v1/delivery/gameserver/link

> Update the link information for a Gameserver

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"tags":[{"name":"delivery"}],"paths":{"/v1/delivery/gameserver/link":{"post":{"tags":["delivery"],"summary":"Update the link information for a Gameserver","operationId":"DeliveryGameServer_LinkGameServer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkGameServerRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/LinkGameServerRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/LinkGameServerRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkGameServerResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}},"components":{"schemas":{"LinkGameServerRequestDto":{"required":["hostname","ip","platform","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"}},"additionalProperties":false},"LinkGameServerResponseDto":{"required":["gameserver","update_available"],"type":"object","properties":{"update_available":{"type":"boolean"},"latest_version":{"type":["null","string"]},"previously_linked":{"$ref":"#/components/schemas/PreviousGameServerLinkDto"},"gameserver":{"$ref":"#/components/schemas/StorefrontGameServerDto"}},"additionalProperties":false},"PreviousGameServerLinkDto":{"required":["host_name","ip","last_linked_at"],"type":"object","properties":{"ip":{"type":"string"},"host_name":{"type":"string"},"last_linked_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## GET /v1/delivery/command-queue

> Retrieve the queue of commands to execute for a Gameserver

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"tags":[{"name":"delivery"}],"paths":{"/v1/delivery/command-queue":{"get":{"tags":["delivery"],"summary":"Retrieve the queue of commands to execute for a Gameserver","operationId":"DeliveryCommandQueue_GetQueuedCommands","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueuedCommandDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}},"components":{"schemas":{"QueuedCommandDto":{"required":["attempt_id","command","online_only","queued_at"],"type":"object","properties":{"attempt_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID of the customer, if applicable."},"customer_name":{"type":["null","string"],"description":"The name of the customer, if applicable."},"command":{"type":"string","description":"The command to be executed."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed only if the customer is online (Connected to the gameserver)"},"queued_at":{"type":"string","description":"Represents when the command was queued.","format":"date-time"}},"additionalProperties":false,"description":"Represents a command to be executed on a Gameserver"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## POST /v1/delivery/command-queue

> Retrieve the queued commands, while supplying the online players for a gameserver

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"tags":[{"name":"delivery"}],"paths":{"/v1/delivery/command-queue":{"post":{"tags":["delivery"],"summary":"Retrieve the queued commands, while supplying the online players for a gameserver","operationId":"DeliveryCommandQueue_GetQueuedCommandsWithOnlinePlayers","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetQueuedCommandsWithOnlinePlayersRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetQueuedCommandsWithOnlinePlayersRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/GetQueuedCommandsWithOnlinePlayersRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueuedCommandDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}},"components":{"schemas":{"GetQueuedCommandsWithOnlinePlayersRequestDto":{"type":"object","properties":{"steam_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/SteamId"}},"minecraft_uuids":{"type":["null","array"],"items":{"type":"string"}},"customer_names":{"type":["null","array"],"items":{"type":"string"}}},"additionalProperties":false},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"QueuedCommandDto":{"required":["attempt_id","command","online_only","queued_at"],"type":"object","properties":{"attempt_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID of the customer, if applicable."},"customer_name":{"type":["null","string"],"description":"The name of the customer, if applicable."},"command":{"type":"string","description":"The command to be executed."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed only if the customer is online (Connected to the gameserver)"},"queued_at":{"type":"string","description":"Represents when the command was queued.","format":"date-time"}},"additionalProperties":false,"description":"Represents a command to be executed on a Gameserver"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## DELETE /v1/delivery/command-queue

> Mark commands as executed in bulk

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"tags":[{"name":"delivery"}],"paths":{"/v1/delivery/command-queue":{"delete":{"tags":["delivery"],"summary":"Mark commands as executed in bulk","operationId":"DeliveryCommandQueue_MarkQueuedCommandExecutedBulk","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarkQueuedCommandAsExecutedDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarkQueuedCommandAsExecutedDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarkQueuedCommandAsExecutedDto"}}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}},"components":{"schemas":{"MarkQueuedCommandAsExecutedDto":{"required":["attempt_id"],"type":"object","properties":{"attempt_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## DELETE /v1/delivery/command-queue/{attemptId}

> Mark a queued command as executed

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"tags":[{"name":"delivery"}],"paths":{"/v1/delivery/command-queue/{attemptId}":{"delete":{"tags":["delivery"],"summary":"Mark a queued command as executed","operationId":"DeliveryCommandQueue_MarkQueuedCommandExecuted","parameters":[{"name":"attemptId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}},"components":{"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## Mark commands as executed in bulk via a POST request

> Mark commands as executed in bulk via a POST request.\
> Some HTTP clients don't support bodies in DELETE requests, so for compatibility we have a POST route.\
> Please use the DELETE route if your HTTP client supports it.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"tags":[{"name":"delivery"}],"paths":{"/v1/delivery/command-queue/acknowledge":{"post":{"tags":["delivery"],"summary":"Mark commands as executed in bulk via a POST request","description":"Mark commands as executed in bulk via a POST request.\nSome HTTP clients don't support bodies in DELETE requests, so for compatibility we have a POST route.\nPlease use the DELETE route if your HTTP client supports it.","operationId":"DeliveryCommandQueue_MarkQueuedCommandExecutedBulkViaPost","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarkQueuedCommandAsExecutedDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarkQueuedCommandAsExecutedDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarkQueuedCommandAsExecutedDto"}}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}},"components":{"schemas":{"MarkQueuedCommandAsExecutedDto":{"required":["attempt_id"],"type":"object","properties":{"attempt_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## POST /v1/delivery/events

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"tags":[{"name":"delivery"}],"paths":{"/v1/delivery/events":{"post":{"tags":["delivery"],"operationId":"DeliveryEvents_ReportGameServerEvents","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportGameServerEventsEntryDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportGameServerEventsEntryDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportGameServerEventsEntryDto"}}}}},"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}},"components":{"schemas":{"ReportGameServerEventsEntryDto":{"required":["event","timestamp"],"type":"object","properties":{"event":{"$ref":"#/components/schemas/GameServerEventDto"},"player_join":{"$ref":"#/components/schemas/ReportGameServerEventsEntryPlayerJoinDto"},"timestamp":{"type":"string","description":"When did this event occur.","format":"date-time"}},"additionalProperties":false,"description":"Represents a single game server event entry in a report."},"GameServerEventDto":{"enum":["invalid","player_join"],"type":"string","description":"Represents the types of events that can occur on a game server."},"ReportGameServerEventsEntryPlayerJoinDto":{"required":["ip_address"],"type":"object","properties":{"ip_address":{"$ref":"#/components/schemas/IPAddress"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID of the player."},"minecraft_name":{"maxLength":128,"type":["null","string"],"description":"The Minecraft username of the player."}},"additionalProperties":false,"description":"Contains detailed information about a player joining a game server."},"IPAddress":{"type":"string","additionalProperties":false,"format":"ip-address"},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```


# Models

## The AddressFamily object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"AddressFamily":{"enum":["unspecified","unix","inter_network","imp_link","pup","chaos","ns","iso","ecma","data_kit","ccitt","sna","dec_net","data_link","lat","hyper_channel","apple_talk","net_bios","voice_view","fire_fox","banyan","atm","inter_network_v6","cluster","ieee12844","irda","network_designers","max","packet","controller_area_network","unknown"],"type":"string"}}}}
```

## The FlakeId object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The GameServerEventDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"GameServerEventDto":{"enum":["invalid","player_join"],"type":"string","description":"Represents the types of events that can occur on a game server."}}}}
```

## The GetQueuedCommandsWithOnlinePlayersRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"GetQueuedCommandsWithOnlinePlayersRequestDto":{"type":"object","properties":{"steam_ids":{"type":["null","array"],"items":{"$ref":"#/components/schemas/SteamId"}},"minecraft_uuids":{"type":["null","array"],"items":{"type":"string"}},"customer_names":{"type":["null","array"],"items":{"type":"string"}}},"additionalProperties":false},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The IPAddress object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"IPAddress":{"type":"string","additionalProperties":false,"format":"ip-address"}}}}
```

## The LinkGameServerRequestDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"LinkGameServerRequestDto":{"required":["hostname","ip","platform","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"}},"additionalProperties":false}}}}
```

## The LinkGameServerResponseDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"LinkGameServerResponseDto":{"required":["gameserver","update_available"],"type":"object","properties":{"update_available":{"type":"boolean"},"latest_version":{"type":["null","string"]},"previously_linked":{"$ref":"#/components/schemas/PreviousGameServerLinkDto"},"gameserver":{"$ref":"#/components/schemas/StorefrontGameServerDto"}},"additionalProperties":false},"PreviousGameServerLinkDto":{"required":["host_name","ip","last_linked_at"],"type":"object","properties":{"ip":{"type":"string"},"host_name":{"type":"string"},"last_linked_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The MarkQueuedCommandAsExecutedDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"MarkQueuedCommandAsExecutedDto":{"required":["attempt_id"],"type":"object","properties":{"attempt_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The PayNowError object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```

## The PreviousGameServerLinkDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"PreviousGameServerLinkDto":{"required":["host_name","ip","last_linked_at"],"type":"object","properties":{"ip":{"type":"string"},"host_name":{"type":"string"},"last_linked_at":{"type":"string","format":"date-time"}},"additionalProperties":false}}}}
```

## The QueuedCommandDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"QueuedCommandDto":{"required":["attempt_id","command","online_only","queued_at"],"type":"object","properties":{"attempt_id":{"$ref":"#/components/schemas/FlakeId"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID of the customer, if applicable."},"customer_name":{"type":["null","string"],"description":"The name of the customer, if applicable."},"command":{"type":"string","description":"The command to be executed."},"online_only":{"type":"boolean","description":"Indicates if the command should be executed only if the customer is online (Connected to the gameserver)"},"queued_at":{"type":"string","description":"Represents when the command was queued.","format":"date-time"}},"additionalProperties":false,"description":"Represents a command to be executed on a Gameserver"},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The ReportGameServerEventsEntryDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"ReportGameServerEventsEntryDto":{"required":["event","timestamp"],"type":"object","properties":{"event":{"$ref":"#/components/schemas/GameServerEventDto"},"player_join":{"$ref":"#/components/schemas/ReportGameServerEventsEntryPlayerJoinDto"},"timestamp":{"type":"string","description":"When did this event occur.","format":"date-time"}},"additionalProperties":false,"description":"Represents a single game server event entry in a report."},"GameServerEventDto":{"enum":["invalid","player_join"],"type":"string","description":"Represents the types of events that can occur on a game server."},"ReportGameServerEventsEntryPlayerJoinDto":{"required":["ip_address"],"type":"object","properties":{"ip_address":{"$ref":"#/components/schemas/IPAddress"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID of the player."},"minecraft_name":{"maxLength":128,"type":["null","string"],"description":"The Minecraft username of the player."}},"additionalProperties":false,"description":"Contains detailed information about a player joining a game server."},"IPAddress":{"type":"string","additionalProperties":false,"format":"ip-address"},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The ReportGameServerEventsEntryPlayerJoinDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"ReportGameServerEventsEntryPlayerJoinDto":{"required":["ip_address"],"type":"object","properties":{"ip_address":{"$ref":"#/components/schemas/IPAddress"},"steam_id":{"$ref":"#/components/schemas/SteamId"},"minecraft_uuid":{"type":["null","string"],"description":"The Minecraft UUID of the player."},"minecraft_name":{"maxLength":128,"type":["null","string"],"description":"The Minecraft username of the player."}},"additionalProperties":false,"description":"Contains detailed information about a player joining a game server."},"IPAddress":{"type":"string","additionalProperties":false,"format":"ip-address"},"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The SteamId object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"SteamId":{"type":"string","additionalProperties":false,"description":"A 64-bit Steam account identifier. Accepts string or numeric format.","format":"steam-id"}}}}
```

## The StorefrontGameServerDto object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"StorefrontGameServerDto":{"required":["enabled","id","name"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."}},"additionalProperties":false,"description":"Represents a simplified view of a game server for storefront display purposes."},"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"}}}}
```

## The ValidationError object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Game Server API","version":"v1"},"components":{"schemas":{"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}}}
```


# About PayNow\.js

PayNow\.js is an embeddable library that allows you to accept payments on your own website without redirecting to the PayNow checkout.

***

### Installation

You can get started using PayNow\.js via installing from NPM or by embedding the library from our CDN.

\
**NPM**

```
npm install @paynow-gg/paynow.js
```

**PNPM**

```
pnpm install @paynow-gg/paynow.js
```

**Yarn**

```markup
yarn install @paynow-gg/paynow.js
```

**CDN**

```html
<script src="https://cdn.paynow.gg/paynow-js/bundle.js" defer></script>
```

If you are importing from the CDN, the `PayNow` object will become available in the window. This will allow you to access PayNow\.js


# Checkouts

Once you've embedded PayNow\.js in your website - you can easily open and manage checkout lifecycles.

### Opening the Checkout

**React**

```tsx
import PayNowJS from "@paynow-gg/paynow.js"

export default function CheckoutComponent() {
    function openCheckout() {
        PayNowJS.checkout.open({ token: "checkout token" })
    }

    return (
        <button onClick={() => openCheckout()>Open Checkout</button>
    )
}
```

**JavaScript (CDN Installation)**

```html
<!DOCTYPE html>
<html>
    <head>
        <script src="https://cdn.paynow.gg/paynow-js/bundle.js" defer></script>
    </head>
    <body>
        <button onclick="openCheckout">
            Open Checkout
        </button>

        <script>
            function openCheckout() {
                window.PayNow.checkout.open({
                    token: "CHECKOUT_TOKEN"
                })
            }
        </script>
    </body>
</html>

```

### Closing the checkout

Call `close()` to programmatically dismiss the checkout overlay:

**React:**

```tsx
PayNowJS.checkout.close()
```

**JavaScript (CDN)**

```javascript
window.PayNow.checkout.close()
```

### Event Listeners

PayNow\.js emits three events during the checkout lifecycle:<br>

* `ready` - Fires when the checkout overlay is rendered
* `completed` - Fires when the customer completes their purchase
* `closed` - Fires when the checkout overlay is dismissed<br>

You can listen to these events via the `on` and `off` functions on `checkout`&#x20;

#### React Usage

```tsx
import { useEffect } from "react"

import PayNowJS from "@paynow-gg/paynow.js"

export default function CheckoutComponent() {
  useEffect(() => {
    const handleReady = () => {
      console.log("Checkout is ready")
    }

    const handleCompleted = (event) => {
      console.log(`Order completed! ID: ${event.orderId}`)
      
      // Optionally close the overlay
      PayNowJS.checkout.close()
      
      // Redirect to your order completed page or update your UI!
    }

    const handleClosed = () => {
      console.log("Checkout was closed")
    }

    // Register listeners
    
    PayNowJS.checkout.on("ready", handleReady)
    PayNowJS.checkout.on("completed", handleCompleted)
    PayNowJS.checkout.on("closed", handleClosed)

    // Cleanup on unmount
    
    return () => {
      PayNowJS.checkout.off("ready", handleReady)
      PayNowJS.checkout.off("completed", handleCompleted)
      PayNowJS.checkout.off("closed", handleClosed)
    }
  }, [])

  return (
    <button onClick={() => PayNowJS.checkout.open({ token: "token_here" })}>
      Open Checkout
    </button>
  )
}
```

#### JavaScript (CDN) Usage

```html
<button onclick="openCheckout()">Open Checkout</button>

<script>
function openCheckout() {
  window.PayNow.checkout.open({
    token: "checkout_token_here"
  })
}

// Register event listeners
window.PayNow.checkout.on("ready", () => {
  console.log("Checkout is ready")
})

window.PayNow.checkout.on("completed", (event) => {
  alert("Order completed! ID: " + event.orderId)
  window.PayNow.checkout.close()
  // Redirect or update your page
  window.location.href = "/success?orderId=" + event.orderId
})

window.PayNow.checkout.on("closed", () => {
  console.log("Checkout was closed")
})
</script>
```

### API Reference

**Methods**

* `checkout.open(options: { token: string, baseURL?: string; renderTo?: { element: HTMLElement; } })`: Opens the checkout with the specified token and optional base URL.  You should never need to set `baseURL` - its used internally.
* `checkout.close()`: Closes the open checkout.
* `checkout.on<K extends keyof CheckoutEvents>(event: K, handler: CheckoutEvents[K])`: Registers an event listener for a specified checkout event.
* `checkout.off<K extends keyof CheckoutEvents>(event: K, handler: CheckoutEvents[K])`: Unregisters an event listener for a specified checkout event.

**Events**

* `ready`: Emitted when the checkout is ready to use.
* `completed`: Emitted when an order is completed, providing an object with the `orderId`.
* `closed`: Emitted when the checkout is closed.


# Webhooks Introduction

## 🔔 Webhooks

Webhooks provide a powerful way for your application to receive **real-time updates** from the PayNow API. Instead of polling for changes, you can **subscribe to specific events**, and PayNow will send a **POST request** to your server when those events occur.

***

### ⚙️ How Webhooks Work

When you subscribe to a webhook event:

1. You provide a URL endpoint.
2. PayNow sends a `POST` request to that URL whenever the subscribed event occurs.
3. The request body contains relevant event data.
4. Your server processes this data and returns an appropriate HTTP status.

***

### 🚀 Setting Up Webhooks

You can configure webhook subscriptions in two ways:

* **Via the Dashboard**\
  Use the built-in user interface to manage subscriptions.
* **Via the API**\
  Programmatically register webhook endpoints with desired settings.

#### Required Setup Details

| Parameter | Description                                        |
| --------- | -------------------------------------------------- |
| `event`   | The event you want to subscribe to                 |
| `url`     | The full URL where the POST request should be sent |
| `type`    | Payload format (see Webhook Types below)           |

***

### 📦 Webhook Types

Currently, PayNow supports the following **two** webhook types:

| Type           | Format        | Description                                                                                                    |
| -------------- | ------------- | -------------------------------------------------------------------------------------------------------------- |
| `JSON (v1)`    | JSON          | Sends a structured JSON payload. Fully documented under **Webhook Integration**                                |
| `Discord (v1)` | Discord Embed | Sends a Discord-friendly embed. Simply plug in a Discord webhook URL and customize the message using templates |

> ⚠️ Only the **JSON v1** webhook is covered in the Webhook Integration documentation.\
> The **Discord webhook** works by copying your Discord webhook URL into PayNow and setting your event and message template.

***

### 📣 Event Types

PayNow supports various event types that can trigger a webhook. For the full list of supported events, refer to the Webhook Events documentation.

***

### 📬 Handling Webhook Notifications

When your server receives a webhook:

* **It should return a `2xx` status code** if the event was received and processed successfully.
* If your server responds with **a non-successful status code (`>299`)**, PayNow will **retry automatically**.

#### Retry Behavior

* Retries use **exponential backoff**, meaning delays will increase between attempts.
* Delivery attempts will continue for a reasonable period before being marked as failed.

***

### 📘 Further Reading

* Webhook Integration – Detailed setup and payload structure
* Webhook Events – Complete list of supported webhook triggers


# Validating Incoming Webhooks

## Verifying the HMAC signature

To verify the HMAC signature included in the webhook payload, follow these steps:

1. Retrieve the `PayNow-Signature` header from the webhook request, containing the HMAC of the entire payload body and the timestamp.
2. Extract the Unix millisecond timestamp from the `PayNow-Timestamp` header.
3. Create a string by combining the timestamp from the header, followed by a dot (".") and then the actual payload string from the webhook request. Then create an HMAC signature using the resulting string and your signing secret.
4. Compare the calculated signature with the signature provided in the `PayNow-Signature` header.

{% hint style="info" %}
When comparing HMAC signatures, avoid using simple string comparison methods, as they may be susceptible to timing attacks. Instead, use constant-time comparison techniques to compare the calculated signature with the provided signature, ensuring that the comparison takes the same amount of time regardless of the comparison result.
{% endhint %}

## IP Addresses

PayNow sends webhooks from a set list of IP addresses. If your firewall requires whitelisting inbound requests, please add the following IP addresses to your allowlist:

* `34.203.112.123`
* `54.208.125.169`
* `54.86.24.96`

**Note:** These IP addresses are subject to change. We recommend implementing signature verification as your primary security measure, and using IP whitelisting as an additional layer of security.


# Preventing Replay Attacks

To prevent replay attacks, ensure that you check the timestamp included in the request and ignore webhook notifications with older timestamps. Here's how to do it:

Compare the timestamp provided in the `PayNow-Timestamp` header with the current time. If the timestamp is significantly older than the current time (e.g., more than a few seconds or minutes), consider the request invalid and discard it.

{% hint style="info" %}
We recommend ignoring webhook requests older than 5 minutes. Use Network Time Protocol ([NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol)) to make sure that your server's clock is accurate.
{% endhint %}

**You may also store the `event_id` in your database and ignore any duplicate requests with the same ID.** This is useful for ensuring that your server does not handle the same webhook twice.


# Integration Implementation Examples

{% tabs %}
{% tab title="Javascript" %}

```go
const express = require('express');
const crypto = require('crypto');
require('dotenv').config();

const app = express();
const PORT = process.env.PORT || 8080;

const SIGNING_SECRET = process.env.SIGNING_SECRET;
const TOLERANCE_PERIOD = 5 * 60 * 1000; // 5 minutes in milliseconds

// Middleware to preserve raw body for signature verification
const rawBodySaver = function (req, res, buf, encoding) {
    if (buf && buf.length) {
        req.rawBody = buf.toString(encoding || 'utf8');
    }
}

// Function to calculate HMAC signature
function calculateHMAC(payloadWithTimestamp) {
    const hmac = crypto.createHmac('sha256', SIGNING_SECRET);
    hmac.update(payloadWithTimestamp);
    return hmac.digest('base64');
}

// Middleware to verify webhook signature and prevent replay attacks
function verifyWebhookSignature(req, res, next) {
    const timestamp = req.headers['paynow-timestamp'];
    const providedSignature = req.headers['paynow-signature'];

    if (!timestamp || !providedSignature) {
        return res.status(400).send('Missing required headers');
    }

    const timestampInt = parseInt(timestamp, 10);
    if (isNaN(timestampInt)) {
        return res.status(400).send('Invalid timestamp format');
    }

    const timestampTime = new Date(timestampInt);
    const currentTime = new Date();
    if (currentTime - timestampTime > TOLERANCE_PERIOD) {
        return res.status(401).send('Timestamp out of tolerance');
    }

    const payloadWithTimestamp = `${timestamp}.${req.rawBody}`;
    const expectedSignature = calculateHMAC(payloadWithTimestamp);

    const signatureValid = crypto.timingSafeEqual(Buffer.from(providedSignature, 'base64'), Buffer.from(expectedSignature, 'base64'));

    if (!signatureValid) {
        return res.status(401).send('Invalid signature');
    }

    next();
}

app.use(express.json({ verify: rawBodySaver }));

app.post('/webhook', verifyWebhookSignature, (req, res) => {
    const eventType = req.body.event_type;
    switch (eventType) {
        case 'ON_DELIVERY_ITEM_ADDED':
            // handleOnDeliveryItemAdded(req.body);
            break;
        case 'ON_DELIVERY_ITEM_ACTIVATED':
            // handleOnDeliveryItemActivated(req.body);
            break;
        case 'ON_DELIVERY_ITEM_USED':
            // handleOnDeliveryItemUsed(req.body);
            break;
        case 'ON_DELIVERY_ITEM_REVOKED':
            // handleOnDeliveryItemRevoked(req.body);
            break;
        default:
            console.log(`Received unknown event type: ${eventType}`);
    }
    res.status(200).send('Webhook processed');
});

app.listen(PORT, () => {
    console.log(`Server running at http://localhost:${PORT}/`);
});
```

{% endtab %}

{% tab title="GO" %}

```go
import (
    "crypto/hmac"
    "crypto/sha256"
    "encoding/base64"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "log"
    "net/http"
    "os"
    "strconv"
    "time"
)

const tolerancePeriod = 5 * time.Minute

func getSigningSecret() []byte {
    return []byte(os.Getenv("SIGNING_SECRET"))
}

func calculateHMAC(payloadWithTimestamp string) string {
    h := hmac.New(sha256.New, getSigningSecret())
    h.Write([]byte(payloadWithTimestamp))
    return base64.StdEncoding.EncodeToString(h.Sum(nil))
}

func verifyWebhookSignature(next http.HandlerFunc) http.HandlerFunc {
    return func(w http.ResponseWriter, r *http.Request) {
        timestamp := r.Header.Get("paynow-timestamp")
        providedSignature := r.Header.Get("paynow-signature")

        if timestamp == "" || providedSignature == "" {
            http.Error(w, "Missing required headers", http.StatusBadRequest)
            return
        }

        timestampInt, err := strconv.ParseInt(timestamp, 10, 64)
        if err != nil {
            http.Error(w, "Invalid timestamp format", http.StatusBadRequest)
            return
        }

        timestampTime := time.Unix(timestampInt/1000, (timestampInt%1000)*int64(time.Millisecond))
        currentTime := time.Now()

        if currentTime.Sub(timestampTime) > tolerancePeriod {
            http.Error(w, "Timestamp out of tolerance", http.StatusUnauthorized)
            return
        }

        body, err := ioutil.ReadAll(r.Body)
        if err != nil {
            http.Error(w, "Failed to read request body", http.StatusInternalServerError)
            return
        }
        defer r.Body.Close()

        payloadWithTimestamp := fmt.Sprintf("%d.%s", timestampInt, body)
        expectedSignature := calculateHMAC(payloadWithTimestamp)

        if !hmac.Equal([]byte(providedSignature), []byte(expectedSignature)) {
            http.Error(w, "Invalid signature", http.StatusUnauthorized)
            return
        }

        next(w, r)
    }
}

func handleWebhook(w http.ResponseWriter, r *http.Request) {
    var data struct {
        EventType string `json:"event_type"`
    }
    if err := json.NewDecoder(r.Body).Decode(&data); err != nil {
        http.Error(w, "Error decoding JSON", http.StatusBadRequest)
        return
    }

    fmt.Printf("Received event type: %s\n", data.EventType)
    // Process event based on data.EventType here
    fmt.Fprintln(w, "Webhook processed")
}

func main() {
    http.HandleFunc("/webhook", verifyWebhookSignature(handleWebhook))
    port := os.Getenv("PORT")
    if port == "" {
        port = "8080"
    }
    log.Printf("Server running at http://localhost:%s/\n", port)
    log.Fatal(http.ListenAndServe(":"+port, nil))
}
```

{% endtab %}
{% endtabs %}


# Webhook Events

This section provides request examples for all of the Webhook Event Types supported by PayNow Webhooks!\
\
**Please note:** Definitions of Webhook Event Objects may differ to those of the **Management API** and **Storefront API**!


# Webhooks

{% openapi-webhook spec="paynow-webhooks" name="ON\_CHARGEBACK" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_CHARGEBACK\_CLOSED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_DISCORD\_ACCOUNT\_LINKED\_TO\_CHECKOUT" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_DELIVERY\_ITEM\_ADDED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_DELIVERY\_ITEM\_ACTIVATED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_DELIVERY\_ITEM\_USED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_DELIVERY\_ITEM\_RENEWED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_DELIVERY\_ITEM\_EXPIRED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_DELIVERY\_ITEM\_REVOKED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_ORDER\_COMPLETED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_REFUND" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_SUBSCRIPTION\_ACTIVATED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_SUBSCRIPTION\_CANCELED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_SUBSCRIPTION\_RENEWED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_TRIAL\_ACTIVATED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_TRIAL\_COMPLETED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}

{% openapi-webhook spec="paynow-webhooks" name="ON\_TRIAL\_CANCELED" method="post" %}
[paynow-webhooks](https://api.paynow.gg/swagger/webhook-definitions/openapi.yaml)
{% endopenapi-webhook %}


# Models

## The CheckoutDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"CheckoutDTO":{"required":["id","metadata","lines"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Checkout","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the checkout"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutLineDTO"},"description":"The lines of the Checkout"}}},"CheckoutLineDTO":{"required":["id","product_id","product_version_id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Checkout line","format":"flake-id"},"product_id":{"type":"string","description":"The Product Flake ID of the Checkout Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Product Version Flake ID of the Checkout Line","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the Checkout Line"}}}}}}
```

## The CheckoutLineDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"CheckoutLineDTO":{"required":["id","product_id","product_version_id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Checkout line","format":"flake-id"},"product_id":{"type":"string","description":"The Product Flake ID of the Checkout Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Product Version Flake ID of the Checkout Line","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the Checkout Line"}}}}}}
```

## The CustomerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"CustomerDTO":{"required":["id","steam","minecraft","profile"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Customer","format":"flake-id"},"name":{"type":["null","string"],"description":""},"steam":{"$ref":"#/components/schemas/SteamCustomerDTO"},"minecraft":{"$ref":"#/components/schemas/MinecraftCustomerDTO"},"profile":{"$ref":"#/components/schemas/GenericProfileDTO"}}},"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}},"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}}}}}
```

## The GameServerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"GameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}}}}}
```

## The GenericProfileDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}}}}}
```

## The MinecraftCustomerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}}}}}
```

## The OrderCouponUsageDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"OrderCouponUsageDTO":{"required":["coupon_id","usage_amount"],"type":"object","properties":{"coupon_id":{"type":"string","description":"","format":"flake-id"},"usage_amount":{"type":"integer","description":""}}}}}}
```

## The OrderDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"OrderDTO":{"required":["id","store_id","customer","checkout_id","checkout","applied_coupons","applied_giftcards","coupon_id","type","currency","tax_inclusive","tax_amount","discount_amount","subtotal_amount","total_amount","created_at","completed_at","billing_name","billing_email","billing_address_country","customer_ip","giftcard_usage_amount","lines","product_names","product_tags","product_gameservers","status"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Order","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the store associated with the order","format":"flake-id"},"customer":{"$ref":"#/components/schemas/CustomerDTO"},"checkout_id":{"type":"string","description":"The Flake ID of the Checkout associated with the order","format":"flake-id"},"checkout":{"$ref":"#/components/schemas/CheckoutDTO"},"subscription_id":{"type":["null","string"],"description":"The Flake ID of the Subscription associated with the order","format":"flake-id"},"applied_coupons":{"type":"array","items":{"$ref":"#/components/schemas/OrderCouponUsageDTO"},"description":"Applied coupons to this order"},"applied_giftcards":{"type":"array","items":{"$ref":"#/components/schemas/OrderGiftCardUsageDTO"},"description":"Applied gift cards to this order"},"coupon_id":{"type":"string","description":"The Flake ID of the Coupon associated with the order","format":"flake-id"},"type":{"type":"string","description":"The type of the order"},"currency":{"type":"string","description":"The ISO-4217 Currency Code of the order"},"tax_inclusive":{"type":"boolean","description":"Indicates if the order value was inclusive of tax"},"tax_amount":{"type":"integer","description":"The tax amount, represented as cents"},"discount_amount":{"type":"integer","description":"The discount amount, represented as cents"},"subtotal_amount":{"type":"integer","description":"The subtotal amount, represented as cents"},"total_amount":{"type":"integer","description":"The total amount, represented as cents"},"created_at":{"type":"string","description":"Indicates when the order was created","format":"date-time"},"completed_at":{"type":"string","description":"Indicates when the order was completed","format":"date-time"},"billing_name":{"type":"string","description":"The billing name of the customer associated with the order"},"billing_email":{"type":"string","description":"The billing email address of the customer associated with the order"},"billing_address_country":{"type":"string","description":"The ISO-3316 Country Code of the customer associated with the order"},"customer_ip":{"type":"string","description":"The IPv4 or IPv6 Address of the associated customer when creating the order"},"giftcard_usage_amount":{"type":"integer","description":"The total amount of giftcard usage associated with the order, represented in cents"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineDTO"},"description":"The order lines associated with the order"},"product_names":{"type":"string","description":"A comma-seperated string of the names of the product associated with the order"},"product_tags":{"type":"string","description":"A comma-seperated string of the tags of the products associated with the order"},"product_gameservers":{"type":"string","description":"A comma-seperated string of the gameservers of the product associated with the order"},"status":{"type":"string","description":"The status of the Order.  Possbile options: created, completed, canceled"}}},"CustomerDTO":{"required":["id","steam","minecraft","profile"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Customer","format":"flake-id"},"name":{"type":["null","string"],"description":""},"steam":{"$ref":"#/components/schemas/SteamCustomerDTO"},"minecraft":{"$ref":"#/components/schemas/MinecraftCustomerDTO"},"profile":{"$ref":"#/components/schemas/GenericProfileDTO"}}},"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}},"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"CheckoutDTO":{"required":["id","metadata","lines"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Checkout","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the checkout"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutLineDTO"},"description":"The lines of the Checkout"}}},"CheckoutLineDTO":{"required":["id","product_id","product_version_id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Checkout line","format":"flake-id"},"product_id":{"type":"string","description":"The Product Flake ID of the Checkout Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Product Version Flake ID of the Checkout Line","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the Checkout Line"}}},"OrderCouponUsageDTO":{"required":["coupon_id","usage_amount"],"type":"object","properties":{"coupon_id":{"type":"string","description":"","format":"flake-id"},"usage_amount":{"type":"integer","description":""}}},"OrderGiftCardUsageDTO":{"required":["giftcard_id","usage_amount"],"type":"object","properties":{"giftcard_id":{"type":"string","description":"","format":"flake-id"},"usage_amount":{"type":"integer","description":""}}},"OrderLineDTO":{"required":["id","product_id","product_version_id","product","product_name","price","quantity","discount_amount","subtotal_amount","tax_amount","total_amount"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Order Line","format":"flake-id"},"checkout_line_id":{"type":["null","string"],"description":"The Flake ID of the Checkout Line associated with this Order Line","format":"flake-id"},"product_id":{"type":"string","description":"The Flake ID of the Product ID associated with this Order Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Flake ID of the Product Version ID associated with this Order Line","format":"flake-id"},"product":{"$ref":"#/components/schemas/ProductDTO"},"product_name":{"type":"string","description":"The name of the product associated with this Order Line"},"product_image_url":{"type":["null","string"],"description":"The Image URL of the Product associated with this Order Line"},"subscription_id":{"type":["null","string"],"description":"The Flake ID of the Subscription associated with this Order Line","format":"flake-id"},"subscription_line_id":{"type":["null","string"],"description":"The Flake ID of the Subscription Line associated with this Order Line","format":"flake-id"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the subscription associated with this Order Line renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the scale in which the subscription associated with this Order Line renews at"},"trial_id":{"type":["null","string"],"description":"The Flake ID of the Trial associated with this Order Line","format":"flake-id"},"gift_to_customer":{"oneOf":[{"$ref":"#/components/schemas/CustomerDTO"},{"type":"null"}]},"price":{"type":"integer","description":"The price of the Order Line"},"quantity":{"type":"integer","description":"The quantity of the Order Line"},"discount_amount":{"type":"integer","description":"The discount amount of the order line, represented in cents"},"subtotal_amount":{"type":"integer","description":"The subtotal amount of the order line, represented in cents"},"tax_amount":{"type":"integer","description":"The tax amount of the order line, represented in cents"},"total_amount":{"type":"integer","description":"The total amount of the order line, represented in cents"},"selected_gameserver_id":{"type":["null","string"],"description":"The Flake ID of which was the selected Game Server ID for the Order Line","format":"flake-id"}}},"ProductDTO":{"required":["id","store_id","version_id","slug","name","description","enabled","sort_order","price","single_game_server_only","allow_one_time_purchase","allow_subscription","remove_after_enabled","tags","tag_names","gameservers","gameserver_names","commands","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the Store","format":"flake-id"},"version_id":{"type":"string","description":"The Flake ID of the Version of the Product","format":"flake-id"},"image_url":{"type":["null","string"],"description":"The Image URL of the product"},"slug":{"type":"string","description":"The URL-Friendly Slug of the Product"},"name":{"type":"string","description":"The name of the Product"},"description":{"type":"string","description":"The description of the product"},"enabled":{"type":"boolean","description":"Indicates if the product is enabled."},"label":{"type":["null","string"],"description":"The label of the product"},"sort_order":{"type":"integer","description":"The sort order of the product"},"price":{"type":"integer","description":"The price of the product, represented in cents."},"single_game_server_only":{"type":"boolean","description":"Indicates if the customer must select a single game server when purchasing the product"},"allow_one_time_purchase":{"type":"boolean","description":"Indicates if one-time purchases are supported on the product"},"allow_subscription":{"type":"boolean","description":"Indicates if subscriptions are supported on the product"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the product subscription renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the interval in which the product subscription renews at"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled"},"remove_after_time_value":{"type":["null","integer"],"description":"The value of the time in which this product should be removed"},"remove_after_time_scale":{"type":["null","string"],"description":"The scale of the time in which this product should be removed"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDTO"},"description":"The tags associated with the product"},"tag_names":{"type":"string","description":"A comma-seperated string of all the tags associated with the product"},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDTO"},"description":"The game servers associated with the product"},"gameserver_names":{"type":"string","description":"A comma-seperated string of all the game servers associated with the product"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDTO"},"description":"The commands associated with the product"},"created_at":{"type":["null","string"],"description":"When the product was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When the product was last updated","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"The metadata of the product"}}},"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}},"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}},"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}}}}}
```

## The OrderGiftCardUsageDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"OrderGiftCardUsageDTO":{"required":["giftcard_id","usage_amount"],"type":"object","properties":{"giftcard_id":{"type":"string","description":"","format":"flake-id"},"usage_amount":{"type":"integer","description":""}}}}}}
```

## The OrderLineDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"OrderLineDTO":{"required":["id","product_id","product_version_id","product","product_name","price","quantity","discount_amount","subtotal_amount","tax_amount","total_amount"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Order Line","format":"flake-id"},"checkout_line_id":{"type":["null","string"],"description":"The Flake ID of the Checkout Line associated with this Order Line","format":"flake-id"},"product_id":{"type":"string","description":"The Flake ID of the Product ID associated with this Order Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Flake ID of the Product Version ID associated with this Order Line","format":"flake-id"},"product":{"$ref":"#/components/schemas/ProductDTO"},"product_name":{"type":"string","description":"The name of the product associated with this Order Line"},"product_image_url":{"type":["null","string"],"description":"The Image URL of the Product associated with this Order Line"},"subscription_id":{"type":["null","string"],"description":"The Flake ID of the Subscription associated with this Order Line","format":"flake-id"},"subscription_line_id":{"type":["null","string"],"description":"The Flake ID of the Subscription Line associated with this Order Line","format":"flake-id"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the subscription associated with this Order Line renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the scale in which the subscription associated with this Order Line renews at"},"trial_id":{"type":["null","string"],"description":"The Flake ID of the Trial associated with this Order Line","format":"flake-id"},"gift_to_customer":{"oneOf":[{"$ref":"#/components/schemas/CustomerDTO"},{"type":"null"}]},"price":{"type":"integer","description":"The price of the Order Line"},"quantity":{"type":"integer","description":"The quantity of the Order Line"},"discount_amount":{"type":"integer","description":"The discount amount of the order line, represented in cents"},"subtotal_amount":{"type":"integer","description":"The subtotal amount of the order line, represented in cents"},"tax_amount":{"type":"integer","description":"The tax amount of the order line, represented in cents"},"total_amount":{"type":"integer","description":"The total amount of the order line, represented in cents"},"selected_gameserver_id":{"type":["null","string"],"description":"The Flake ID of which was the selected Game Server ID for the Order Line","format":"flake-id"}}},"ProductDTO":{"required":["id","store_id","version_id","slug","name","description","enabled","sort_order","price","single_game_server_only","allow_one_time_purchase","allow_subscription","remove_after_enabled","tags","tag_names","gameservers","gameserver_names","commands","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the Store","format":"flake-id"},"version_id":{"type":"string","description":"The Flake ID of the Version of the Product","format":"flake-id"},"image_url":{"type":["null","string"],"description":"The Image URL of the product"},"slug":{"type":"string","description":"The URL-Friendly Slug of the Product"},"name":{"type":"string","description":"The name of the Product"},"description":{"type":"string","description":"The description of the product"},"enabled":{"type":"boolean","description":"Indicates if the product is enabled."},"label":{"type":["null","string"],"description":"The label of the product"},"sort_order":{"type":"integer","description":"The sort order of the product"},"price":{"type":"integer","description":"The price of the product, represented in cents."},"single_game_server_only":{"type":"boolean","description":"Indicates if the customer must select a single game server when purchasing the product"},"allow_one_time_purchase":{"type":"boolean","description":"Indicates if one-time purchases are supported on the product"},"allow_subscription":{"type":"boolean","description":"Indicates if subscriptions are supported on the product"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the product subscription renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the interval in which the product subscription renews at"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled"},"remove_after_time_value":{"type":["null","integer"],"description":"The value of the time in which this product should be removed"},"remove_after_time_scale":{"type":["null","string"],"description":"The scale of the time in which this product should be removed"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDTO"},"description":"The tags associated with the product"},"tag_names":{"type":"string","description":"A comma-seperated string of all the tags associated with the product"},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDTO"},"description":"The game servers associated with the product"},"gameserver_names":{"type":"string","description":"A comma-seperated string of all the game servers associated with the product"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDTO"},"description":"The commands associated with the product"},"created_at":{"type":["null","string"],"description":"When the product was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When the product was last updated","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"The metadata of the product"}}},"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}},"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}},"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}},"CustomerDTO":{"required":["id","steam","minecraft","profile"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Customer","format":"flake-id"},"name":{"type":["null","string"],"description":""},"steam":{"$ref":"#/components/schemas/SteamCustomerDTO"},"minecraft":{"$ref":"#/components/schemas/MinecraftCustomerDTO"},"profile":{"$ref":"#/components/schemas/GenericProfileDTO"}}},"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}},"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}}}}}
```

## The ProductCommandDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}}}}}
```

## The ProductDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"ProductDTO":{"required":["id","store_id","version_id","slug","name","description","enabled","sort_order","price","single_game_server_only","allow_one_time_purchase","allow_subscription","remove_after_enabled","tags","tag_names","gameservers","gameserver_names","commands","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the Store","format":"flake-id"},"version_id":{"type":"string","description":"The Flake ID of the Version of the Product","format":"flake-id"},"image_url":{"type":["null","string"],"description":"The Image URL of the product"},"slug":{"type":"string","description":"The URL-Friendly Slug of the Product"},"name":{"type":"string","description":"The name of the Product"},"description":{"type":"string","description":"The description of the product"},"enabled":{"type":"boolean","description":"Indicates if the product is enabled."},"label":{"type":["null","string"],"description":"The label of the product"},"sort_order":{"type":"integer","description":"The sort order of the product"},"price":{"type":"integer","description":"The price of the product, represented in cents."},"single_game_server_only":{"type":"boolean","description":"Indicates if the customer must select a single game server when purchasing the product"},"allow_one_time_purchase":{"type":"boolean","description":"Indicates if one-time purchases are supported on the product"},"allow_subscription":{"type":"boolean","description":"Indicates if subscriptions are supported on the product"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the product subscription renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the interval in which the product subscription renews at"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled"},"remove_after_time_value":{"type":["null","integer"],"description":"The value of the time in which this product should be removed"},"remove_after_time_scale":{"type":["null","string"],"description":"The scale of the time in which this product should be removed"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDTO"},"description":"The tags associated with the product"},"tag_names":{"type":"string","description":"A comma-seperated string of all the tags associated with the product"},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDTO"},"description":"The game servers associated with the product"},"gameserver_names":{"type":"string","description":"A comma-seperated string of all the game servers associated with the product"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDTO"},"description":"The commands associated with the product"},"created_at":{"type":["null","string"],"description":"When the product was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When the product was last updated","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"The metadata of the product"}}},"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}},"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}},"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}}}}}
```

## The ProductGameServerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}}}}}
```

## The ProductTagDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}}}}}
```

## The SteamCustomerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}}}}}
```

## The SubscriptionLineDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"SubscriptionLineDTO":{"required":["id","subscription_id","product_id","product_version_id","product_name","tax_inclusive","price","discount_amount","subtotal_amount","tax_amount","total_amount","initial_discount_amount","initial_subtotal_amount","initial_giftcard_usage_amount","initial_tax_amount","initial_total_amount","currency"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Subscription Line","format":"flake-id"},"subscription_id":{"type":"string","description":"The Flake ID of the Subscription associated with this Subscription Line","format":"flake-id"},"checkout_line_id":{"type":["null","string"],"description":"The Flake ID of the Checkout Line associated with this Subscription Line","format":"flake-id"},"initial_order_line_id":{"type":["null","string"],"description":"The Flake ID of the initial Order Line associated with this Subscription Line","format":"flake-id"},"gift_to_customer_id":{"type":["null","string"],"description":"The Flake ID of the customer this Subscription Line was gifted to","format":"flake-id"},"gift_to_customer":{"oneOf":[{"$ref":"#/components/schemas/CustomerDTO"},{"type":"null"}]},"selected_gameserver_id":{"type":["null","string"],"description":"The Flake ID of the selected Game Server for this Subscription Line","format":"flake-id"},"sale_id":{"type":["null","string"],"description":"The Flake ID of the Sale associated with this Subscription Line","format":"flake-id"},"trial_id":{"type":["null","string"],"description":"The Flake ID of the Trial associated with this Subscription Line","format":"flake-id"},"product_id":{"type":"string","description":"The Flake ID of the Product associated with this Subscription Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Flake ID of the Product Version associated with this Subscription Line","format":"flake-id"},"product_name":{"type":"string","description":"The name of the Product associated with this Subscription Line"},"product_image_url":{"type":["null","string"],"description":"The image URL of the Product associated with this Subscription Line"},"product":{"oneOf":[{"$ref":"#/components/schemas/ProductDTO"},{"type":"null"}]},"tax_inclusive":{"type":"boolean","description":"Whether the price of this Subscription Line is tax inclusive"},"price":{"type":"integer","description":"The price of this Subscription Line represented in cents"},"discount_amount":{"type":"integer","description":"The discount amount applied to this Subscription Line represented in cents"},"subtotal_amount":{"type":"integer","description":"The subtotal amount of this Subscription Line represented in cents"},"tax_amount":{"type":"integer","description":"The tax amount of this Subscription Line represented in cents"},"total_amount":{"type":"integer","description":"The total amount of this Subscription Line represented in cents"},"initial_discount_amount":{"type":"integer","description":"The initial discount amount applied to this Subscription Line represented in cents"},"initial_subtotal_amount":{"type":"integer","description":"The initial subtotal amount of this Subscription Line represented in cents"},"initial_giftcard_usage_amount":{"type":"integer","description":"The initial gift card usage amount applied to this Subscription Line represented in cents"},"initial_tax_amount":{"type":"integer","description":"The initial tax amount of this Subscription Line represented in cents"},"initial_total_amount":{"type":"integer","description":"The initial total amount of this Subscription Line represented in cents"},"currency":{"type":"string","description":"The currency code of this Subscription Line"},"presentment_currency":{"type":["null","string"],"description":"The presentment currency code of this Subscription Line"},"presentment_subtotal_amount":{"type":["null","integer"],"description":"The presentment subtotal amount of this Subscription Line represented in cents"},"presentment_discount_amount":{"type":["null","integer"],"description":"The presentment discount amount of this Subscription Line represented in cents"},"presentment_tax_amount":{"type":["null","integer"],"description":"The presentment tax amount of this Subscription Line represented in cents"},"presentment_total_amount":{"type":["null","integer"],"description":"The presentment total amount of this Subscription Line represented in cents"},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"The initial presentment discount amount of this Subscription Line represented in cents"},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"The initial presentment subtotal amount of this Subscription Line represented in cents"},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"The initial presentment gift card usage amount of this Subscription Line represented in cents"},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"The initial presentment tax amount of this Subscription Line represented in cents"},"initial_presentment_total_amount":{"type":["null","integer"],"description":"The initial presentment total amount of this Subscription Line represented in cents"}}},"CustomerDTO":{"required":["id","steam","minecraft","profile"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Customer","format":"flake-id"},"name":{"type":["null","string"],"description":""},"steam":{"$ref":"#/components/schemas/SteamCustomerDTO"},"minecraft":{"$ref":"#/components/schemas/MinecraftCustomerDTO"},"profile":{"$ref":"#/components/schemas/GenericProfileDTO"}}},"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}},"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"ProductDTO":{"required":["id","store_id","version_id","slug","name","description","enabled","sort_order","price","single_game_server_only","allow_one_time_purchase","allow_subscription","remove_after_enabled","tags","tag_names","gameservers","gameserver_names","commands","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the Store","format":"flake-id"},"version_id":{"type":"string","description":"The Flake ID of the Version of the Product","format":"flake-id"},"image_url":{"type":["null","string"],"description":"The Image URL of the product"},"slug":{"type":"string","description":"The URL-Friendly Slug of the Product"},"name":{"type":"string","description":"The name of the Product"},"description":{"type":"string","description":"The description of the product"},"enabled":{"type":"boolean","description":"Indicates if the product is enabled."},"label":{"type":["null","string"],"description":"The label of the product"},"sort_order":{"type":"integer","description":"The sort order of the product"},"price":{"type":"integer","description":"The price of the product, represented in cents."},"single_game_server_only":{"type":"boolean","description":"Indicates if the customer must select a single game server when purchasing the product"},"allow_one_time_purchase":{"type":"boolean","description":"Indicates if one-time purchases are supported on the product"},"allow_subscription":{"type":"boolean","description":"Indicates if subscriptions are supported on the product"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the product subscription renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the interval in which the product subscription renews at"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled"},"remove_after_time_value":{"type":["null","integer"],"description":"The value of the time in which this product should be removed"},"remove_after_time_scale":{"type":["null","string"],"description":"The scale of the time in which this product should be removed"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDTO"},"description":"The tags associated with the product"},"tag_names":{"type":"string","description":"A comma-seperated string of all the tags associated with the product"},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDTO"},"description":"The game servers associated with the product"},"gameserver_names":{"type":"string","description":"A comma-seperated string of all the game servers associated with the product"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDTO"},"description":"The commands associated with the product"},"created_at":{"type":["null","string"],"description":"When the product was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When the product was last updated","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"The metadata of the product"}}},"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}},"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}},"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}}}}}
```

## The WebhookEventType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"WebhookEventType":{"enum":["ON_ORDER_COMPLETED","ON_REFUND","ON_CHARGEBACK","ON_DELIVERY_ITEM_ADDED","ON_DELIVERY_ITEM_ACTIVATED","ON_DELIVERY_ITEM_USED","ON_DELIVERY_ITEM_REVOKED","ON_SUBSCRIPTION_ACTIVATED","ON_SUBSCRIPTION_RENEWED","ON_SUBSCRIPTION_CANCELED","ON_DISCORD_ACCOUNT_LINKED_TO_CHECKOUT","ON_CONNECTED_USER_REGISTERED","ON_CONNECTED_USER_BECAME_PAYABLE","ON_CONNECTED_USER_PAYOUT_CREATED","ON_CONNECTED_USER_PAYOUT_COMPLETED","ON_CONNECTED_USER_TRANSACTION_INSERTED","ON_CONNECTED_USER_BECAME_UNPAYABLE","ON_TRIAL_ACTIVATED","ON_TRIAL_COMPLETED","ON_TRIAL_CANCELED","ON_PURCHASE_FOLLOW_UP_ATTEMPT_EMAIL_SENT","ON_PURCHASE_FOLLOW_UP_ATTEMPT_SUCCEEDED","ON_ABANDONED_CHECKOUT_RECOVERY_ATTEMPT_EMAIL_SENT","ON_ABANDONED_CHECKOUT_RECOVERY_ATTEMPT_SUCCEEDED","ON_CHARGEBACK_CLOSED","ON_DELIVERY_ITEM_EXPIRED","ON_DELIVERY_ITEM_RENEWED"],"type":"string","description":"The type of webhook event"}}}}
```


# Routes

## 🚏 Webstore Routes

This section outlines all HTTP routes supported by the webstore, including the associated template, method, and query parameters for each.

***

### 🏠 Home

**Route:** `GET /`\
**Template:** `index.html`

Displays the main homepage of the webstore.

***

### 🛍 Products

#### 🔎 List Products

**Route:** `GET /products`\
**Template:** `category.html`

| Query Parameter | Type      | Description                                            |
| --------------- | --------- | ------------------------------------------------------ |
| `tags`          | string\[] | Optional. Comma-separated tag slugs to filter products |

***

#### 📄 View Product

**Route:** `GET /products/{product.slug}`\
**Template:** `product.html`

Displays product detail page based on the provided slug.

***

#### 💳 Checkout Product

**Route:** `POST /products/{product.slug}/checkout`

| Query Parameter | Type    | Description                                                 |
| --------------- | ------- | ----------------------------------------------------------- |
| `cart`          | boolean | Optional. Adds to cart if true                              |
| `subscription`  | boolean | Optional. Adds as a subscription                            |
| `trial`         | boolean | Optional.  Adds as a trial. Subscription must also be true. |
| `quantity`      | int     | Optional. Product quantity (default: 1)                     |
| `gift_to`       | string  | Optional. Recipient’s platform ID                           |
| `gift_platform` | string  | Optional. Gifting platform (default: `"steam"`)             |
| `gameserver_id` | string  | Optional. ID of selected gameserver                         |

***

### 🛒 Cart

#### 🧾 View Cart

**Route:** `GET /cart`\
**Template:** `cart.html`

***

#### ➕ Add to Cart

**Route:** `POST /cart/add/{product.slug}`

| Query Parameter    | Type    | Description                                                            |
| ------------------ | ------- | ---------------------------------------------------------------------- |
| `quantity`         | integer | Optional. Defaults to 1                                                |
| `gameserver_id`    | string  | Optional. Selected gameserver ID                                       |
| `custom_variables` | object  | Optional.  Object containing custom key-value pairs for the cart line. |
| `subscription`     | boolean | Optional. Adds as a subscription.                                      |
| `trial`            | boolean | Optional.  Adds as a trial. Subscription must also be true.            |

***

#### ✏️ Set Cart Line

**Route:** `POST /cart/set/{product.slug}`

| Query Parameter    | Type    | Description                                                            |
| ------------------ | ------- | ---------------------------------------------------------------------- |
| `quantity`         | integer | Optional. New quantity (default: 1)                                    |
| `gameserver_id`    | string  | Optional. Selected gameserver ID                                       |
| `custom_variables` | object  | Optional.  Object containing custom key-value pairs for the cart line. |
| `subscription`     | boolean | Optional. Edits as a subscription.                                     |
| `trial`            | boolean | Optional.  Edits as a trial. Subscription must also be true.           |

> **Note:** This route is also used to **remove from cart** by setting quantity to `0`.

***

#### 🗑 Empty Cart

**Route:** `POST /cart/empty`

Clears all items from the customer's cart.

***

#### ✅ Checkout Cart

**Route:** `POST /cart/checkout`

| Query Parameter | Type   | Description                           |
| --------------- | ------ | ------------------------------------- |
| `return_url`    | string | Optional. Redirect URL after checkout |

***

### 👤 Authentication

#### 🔐 Sign In

**Route:** `POST /auth/sign-in`

| Query Parameter | Type   | Description                           |
| --------------- | ------ | ------------------------------------- |
| `return_url`    | string | Optional. URL to redirect after login |

***

#### 🔓 Sign Out

**Route:** `POST /auth/sign-out`

Signs out the currently logged-in user.

***

### 🔁 Subscriptions

#### 📋 View Subscriptions

**Route:** `GET /subscriptions`\
**Template:** `subscriptions.html`

***

#### ❌ Cancel Subscription

**Route:** `POST /subscriptions/{subscription.id}/cancel`

Cancels the specified subscription.

***

### 🎉 Checkout Complete

**Route:** `GET /complete`\
**Template:** `complete.html`

Displays a confirmation message after a successful transaction.

***

### 📜 Legal Pages

| Page             | Route                         |
| ---------------- | ----------------------------- |
| Terms of Service | `GET /legal/terms-of-service` |
| User Agreement   | `GET /legal/user-agreement`   |
| Privacy Policy   | `GET /legal/privacy`          |


# Variables

### 🗂 Template Files

| File Name            | Description                                                  |
| -------------------- | ------------------------------------------------------------ |
| `index.html`         | The main landing page of your webstore                       |
| `category.html`      | Displays categories, manages navigation, and product filters |
| `product.html`       | Displays detailed information for a specific product         |
| `cart.html`          | Shows the customer's current shopping cart                   |
| `complete.html`      | Confirms a successful purchase                               |
| `subscriptions.html` | Lists all active and canceled customer subscriptions         |

***

### 🌐 Global Variables

#### Common Across All Pages

| Variable Name          | Description                                                        |
| ---------------------- | ------------------------------------------------------------------ |
| `store`                | The currently active store                                         |
| `webstore`             | Information about the active hosted webstore                       |
| `cart`                 | The current customer's cart (NULL if not logged in)                |
| `navlinks`             | All enabled navigation links                                       |
| `tags`                 | All enabled tags in the store                                      |
| `customer`             | The logged-in customer (NULL if not logged in)                     |
| `request`              | Information about the current HTTP request                         |
| `notification`         | Active customer notification, if any                               |
| `currency`             | Preferred customer currency (defaults to `store.currency` if NULL) |
| `available_currencies` | Available currencies for currency conversion previews              |
| `modules`              | Pre-rendered HTML for all active modules                           |
| `favicon`              | URL of the favicon image for the webstore                          |

#### Page-Specific Variables

**`index.html`**

| Variable Name | Description                        |
| ------------- | ---------------------------------- |
| `products`    | An array of all available products |

**`category.html`**

| Variable Name   | Description                                    |
| --------------- | ---------------------------------------------- |
| `products`      | Products matching the active tag/category      |
| `activeTag`     | Currently active filtering tag                 |
| `activeTags`    | Array of active filtering tags                 |
| `activeNavlink` | Detailed object for the active navigation link |

**`product.html`**

| Variable Name           | Description                            |
| ----------------------- | -------------------------------------- |
| `product`               | Details of the selected product        |
| `available_gameservers` | Optional list of gameserver selections |

**`complete.html`**

| Variable Name | Description                           |
| ------------- | ------------------------------------- |
| `complete`    | Information about the completed order |

**`subscriptions.html`**

| Variable Name   | Description                          |
| --------------- | ------------------------------------ |
| `subscriptions` | List of the customer’s subscriptions |

***

### 📦 Object Definitions

#### Available Game Server Object

| Field  | Description              |
| ------ | ------------------------ |
| `id`   | Unique server identifier |
| `name` | Display name of server   |

***

#### Webstore Object

| Field                    | Description                     |
| ------------------------ | ------------------------------- |
| `id`                     | Unique webstore ID              |
| `slug`                   | Friendly URL slug               |
| `is_active`              | Webstore active status          |
| `custom_domain`          | Custom domain, if set           |
| `custom_domain_verified` | Domain verification status      |
| `current_template_id`    | Active template ID              |
| `custom_templates`       | Any associated custom templates |

***

#### Checkout Complete Object

| Field  | Description                       |
| ------ | --------------------------------- |
| `text` | Completion message or status text |

***

#### Notification Object

| Field     | Description                                |
| --------- | ------------------------------------------ |
| `message` | Notification message content               |
| `type`    | Type of notification (e.g., `error`, etc.) |

***

#### Request Details Object

| Field         | Description                                      |
| ------------- | ------------------------------------------------ |
| `url`         | Full current URL                                 |
| `path`        | URL path component                               |
| `query`       | Query parameters from the URL                    |
| `country`     | IP-based country code                            |
| `countryName` | Human-readable country name                      |
| `region`      | Geographical region of the user                  |
| `city`        | City of origin                                   |
| `isEUCountry` | Boolean indicating if the request is from the EU |

***

For further details on template syntax and filters, refer to the official Twig documentation.


# Modules

### Module Placement in Template

To incorporate any module into your webstore template:

```
{{ modules | raw }}
```

This placeholder auto-populates with modules you’ve configured in the module section.

***

## 🎁 Gift Card Balance Module

**File Name:** `module.giftcard_balance.html`\
**Directory:** Root

#### Fields

| Name              | Type                     | Description                        |
| ----------------- | ------------------------ | ---------------------------------- |
| `settings.header` | `string`                 | Header of the module               |
| `error`           | `string`                 | Error text if something went wrong |
| `giftCard`        | `giftcard lookup object` | Gift card data object              |

#### Giftcard Lookup Object

| Name               | Type   | Description           |
| ------------------ | ------ | --------------------- |
| `code`             | string | Code of the gift card |
| `balance`          | int64  | Current balance       |
| `starting_balance` | int64  | Starting balance      |
| `expires_at`       | string | Expiration date       |

***

## 💳 Recent Payments Module

**File Name:** `module.recent_payments.html`\
**Directory:** Root

#### Fields

| Name                               | Type     | Description                       |
| ---------------------------------- | -------- | --------------------------------- |
| `settings.header`                  | string   | Header of the module              |
| `settings.displayLimit`            | int64    | Number of payments to display     |
| `settings.displayFreePayments`     | bool     | Display free payments             |
| `settings.displayTimeOfPurchase`   | bool     | Display time of payment           |
| `settings.displayPriceOfPurchase`  | bool     | Display price of purchase         |
| `settings.displayPurchasedProduct` | bool     | Display purchased product details |
| `orders`                           | order\[] | List of recent orders             |

#### Order Object

| Name           | Type     | Description                              |
| -------------- | -------- | ---------------------------------------- |
| `total_amount` | number   | Total amount of the order                |
| `completed_at` | string   | Completion date of the order             |
| `customer`     | customer | Customer who made the payment            |
| `lines`        | line\[]  | Order lines (if product display enabled) |

#### Customer Object

| Name               | Type   | Description      |
| ------------------ | ------ | ---------------- |
| `id`               | flake  | Customer ID      |
| `steam.name`       | string | Steam name       |
| `steam.avatar_url` | string | Steam avatar URL |
| `name`             | string | Customer name    |

#### Order Line Object

| Name                | Type   | Description          |
| ------------------- | ------ | -------------------- |
| `product_id`        | flake  | Product ID           |
| `product_name`      | string | Product name         |
| `product_image_url` | string | Product image URL    |
| `gift`              | bool   | Was it a gift?       |
| `price`             | int64  | Price of the product |
| `total_amount`      | int64  | Total paid amount    |
| `quantity`          | int64  | Quantity ordered     |

***

## 📝 Text Box Module

**File Name:** `module.text_box.html`\
**Directory:** Root

#### Fields

| Name              | Type   | Description             |
| ----------------- | ------ | ----------------------- |
| `settings.header` | string | Header of the module    |
| `content`         | string | HTML content of the box |

***

## 🎯 Payment Goal Module

**File Name:** `module.payment_goal.html`\
**Directory:** Root

#### Fields

| Name                                 | Type    | Description                             |
| ------------------------------------ | ------- | --------------------------------------- |
| `settings.header`                    | string  | Header of the module                    |
| `settings.period`                    | string  | Time period for the goal                |
| `settings.goalTarget`                | int64   | Goal amount in store’s default currency |
| `settings.displayAbsoluteGoalAmount` | boolean | Display the absolute goal amount        |
| `settings.allowPercentageOverflow`   | boolean | Allow % to go above 100%                |
| `settings.animateGoalBar`            | boolean | Animate the progress bar                |
| `settings.barStyle`                  | string  | `striped` or `normal`                   |
| `revenue`                            | string  | Current revenue value toward the goal   |

***

## 🏆 Top Customer Module

**File Name:** `module.top_customers.html`\
**Directory:** Root

#### Fields

| Name                                  | Type        | Description                                 |
| ------------------------------------- | ----------- | ------------------------------------------- |
| `settings.header`                     | string      | Header of the module                        |
| `settings.period`                     | string      | Time period used to calculate top customers |
| `settings.field`                      | enum        | Field to sort customers by                  |
| `settings.limit`                      | int64       | Max number of customers to display          |
| `settings.displayCustomerSpendAmount` | bool        | Show spend amount per customer              |
| `customers`                           | customer\[] | List of top customers                       |

**Allowed Enum Values**

* `total_spend_amount_gross`
* `total_spend_amount_net`
* `average_spend_amount_gross`
* `average_spend_amount_net`
* `total_payments`

#### Top Customer Object

| Name                               | Type   | Description              |
| ---------------------------------- | ------ | ------------------------ |
| `id`                               | flake  | Customer ID              |
| `steam.name`                       | string | Steam name               |
| `steam.avatar_url`                 | string | Steam avatar             |
| `name`                             | string | Customer name            |
| `stats.total_spend_amount_gross`   | int64  | Total gross spend amount |
| `stats.total_spend_amount_net`     | int64  | Total net spend amount   |
| `stats.average_spend_amount_gross` | int64  | Average gross spend      |
| `stats.average_spend_amount_net`   | int64  | Average net spend        |
| `stats.total_payments`             | int64  | Total number of payments |

## 📦 Featured Product Module

**File Name:** `module.featured_product.html`\
**Directory:** Root

#### Fields

| Name              | Type                                                               | Description                 |
| ----------------- | ------------------------------------------------------------------ | --------------------------- |
| `settings.header` | string                                                             | Header of the module        |
| `product`         | [StorefrontProductDto](/storefront-headless/storefront-api/models) | The featured product object |


