PayNow

Coupons

Fetches all coupons for a store id

GEThttps://api.paynow.gg/v1/stores/{storeId}/coupons
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
Query parameters
limitintegerOptional
The maximum number of items to return in a single request.
afterFlakeIdOptional
Returns items after the specified ID. Used for forward pagination through results.
beforeFlakeIdOptional
Returns items before the specified ID. Used for backward pagination through results.
ascbooleanOptional
Determines the sort order of returned items. When true, items are returned in ascending order. When false, items are returned in descending order.
statusenumOptional
Filter by status
typeenumOptional
Filter by creation type of coupons.
usable_by_customer_idFlakeIdOptional
Filter by ID of the customer this coupon is assigned to.
Response
200OKCouponDto[]
Represents a detailed view of a coupon, including configuration and audit information.
Show fields
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount in the smallest currency unit (e.g., cents).
discount_apply_before_salesbooleanRequired
Indicates whether the discount is applied before existing sales.
discount_apply_individuallybooleanRequired
Indicates whether the discount should be applied individually to required tags or products.
discount_typeenumRequired
Specifies the type of discount applied by a coupon.
Possible enum values
  • unspecified

    No discount type specified. This value is typically used as a default or uninitialized state.

  • percent

    A percentage-based discount (e.g., 10% off).

  • amount

    A fixed amount discount (e.g., $5 off).

durationenumRequired
Defines the duration for which a coupon remains valid.
Possible enum values
  • once

    The coupon can be used only once.

  • forever

    The coupon remains valid indefinitely (no expiration).

  • repeating

    The coupon is valid for a repeating period, typically specified in months.

enabledbooleanRequired
Indicates whether the coupon is enabled.
idFlakeIdRequired
minimum_order_valueintegerRequired
The minimum order value required to use the coupon.
redeem_limit_customer_amountintegerRequired
The maximum number of times the coupon can be redeemed per customer.
redeem_limit_customer_enabledbooleanRequired
Indicates whether a per-customer redemption limit is enabled.
redeem_limit_store_amountintegerRequired
The maximum number of times the coupon can be redeemed across the store.
redeem_limit_store_enabledbooleanRequired
Indicates whether a global redemption limit is enabled.
store_idFlakeIdRequired
usable_on_one_time_purchasebooleanRequired
Indicates whether the coupon can be used for one-time purchases.
usable_on_subscriptionbooleanRequired
Indicates whether the coupon can be used for subscriptions.
version_idFlakeIdRequired
apply_to_productsFlakeId[]Optional
A list of product IDs the coupon applies to.
apply_to_tagsFlakeId[]Optional
A list of tag IDs the coupon applies to.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
duration_in_intervalsintegerOptional
The number of subscription renewals the coupon is valid for, used if the duration is repeating.
duration_in_monthsintegerOptional
The number of months the coupon is valid for, used if the duration is repeating.
expires_atstringOptional
The date and time when the coupon expires.
notestringOptional
A note or internal description of the coupon.
updated_atstringOptional
The date and time when the coupon was last updated.
updated_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
usable_atstringOptional
The date and time when the coupon becomes valid.
usable_by_customer_idFlakeIdOptional

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/coupons" \
  -H "Authorization: APIKey TOKEN"
Response200
[
  {
    "code": "string",
    "created_at": "2024-01-01T00:00:00Z",
    "discount_amount": 0,
    "discount_apply_before_sales": true,
    "discount_apply_individually": true,
    "discount_type": "unspecified",
    "duration": "once",
    "enabled": true,
    "id": "411486491630370816",
    "minimum_order_value": 0,
    "redeem_limit_customer_amount": 0,
    "redeem_limit_customer_enabled": true,
    "redeem_limit_store_amount": 0,
    "redeem_limit_store_enabled": true,
    "store_id": "411486491630370816",
    "usable_on_one_time_purchase": true,
    "usable_on_subscription": true,
    "version_id": "411486491630370816",
    "note": "string",
    "duration_in_months": 0,
    "duration_in_intervals": 0,
    "apply_to_products": [
      "411486491630370816"
    ],
    "apply_to_tags": [
      "411486491630370816"
    ],
    "usable_by_customer_id": "411486491630370816",
    "usable_at": "2024-01-01T00:00:00Z",
    "expires_at": "2024-01-01T00:00:00Z",
    "created_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    },
    "updated_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    },
    "updated_at": "2024-01-01T00:00:00Z"
  }
]

Create Coupon For Store

POSThttps://api.paynow.gg/v1/stores/{storeId}/coupons
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
Request body
codestringRequired
discount_amountintegerRequired
discount_apply_before_salesbooleanRequired
discount_apply_individuallybooleanRequired
discount_typeenumRequired
Specifies the type of discount applied by a coupon.
Possible enum values
  • unspecified

    No discount type specified. This value is typically used as a default or uninitialized state.

  • percent

    A percentage-based discount (e.g., 10% off).

  • amount

    A fixed amount discount (e.g., $5 off).

durationenumRequired
Defines the duration for which a coupon remains valid.
Possible enum values
  • once

    The coupon can be used only once.

  • forever

    The coupon remains valid indefinitely (no expiration).

  • repeating

    The coupon is valid for a repeating period, typically specified in months.

enabledbooleanRequired
minimum_order_valueintegerRequired
redeem_limit_customer_amountintegerRequired
redeem_limit_customer_enabledbooleanRequired
redeem_limit_store_amountintegerRequired
redeem_limit_store_enabledbooleanRequired
usable_on_one_time_purchasebooleanRequired
usable_on_subscriptionbooleanRequired
apply_to_productsFlakeId[]Optional
apply_to_tagsFlakeId[]Optional
duration_in_intervalsintegerOptional
duration_in_monthsintegerOptional
expires_atstringOptional
notestringOptional
usable_atstringOptional
usable_by_customer_idFlakeIdOptional
Response
200OKCouponDto
Represents a detailed view of a coupon, including configuration and audit information.
Show fields
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount in the smallest currency unit (e.g., cents).
discount_apply_before_salesbooleanRequired
Indicates whether the discount is applied before existing sales.
discount_apply_individuallybooleanRequired
Indicates whether the discount should be applied individually to required tags or products.
discount_typeenumRequired
Specifies the type of discount applied by a coupon.
Possible enum values
  • unspecified

    No discount type specified. This value is typically used as a default or uninitialized state.

  • percent

    A percentage-based discount (e.g., 10% off).

  • amount

    A fixed amount discount (e.g., $5 off).

durationenumRequired
Defines the duration for which a coupon remains valid.
Possible enum values
  • once

    The coupon can be used only once.

  • forever

    The coupon remains valid indefinitely (no expiration).

  • repeating

    The coupon is valid for a repeating period, typically specified in months.

enabledbooleanRequired
Indicates whether the coupon is enabled.
idFlakeIdRequired
minimum_order_valueintegerRequired
The minimum order value required to use the coupon.
redeem_limit_customer_amountintegerRequired
The maximum number of times the coupon can be redeemed per customer.
redeem_limit_customer_enabledbooleanRequired
Indicates whether a per-customer redemption limit is enabled.
redeem_limit_store_amountintegerRequired
The maximum number of times the coupon can be redeemed across the store.
redeem_limit_store_enabledbooleanRequired
Indicates whether a global redemption limit is enabled.
store_idFlakeIdRequired
usable_on_one_time_purchasebooleanRequired
Indicates whether the coupon can be used for one-time purchases.
usable_on_subscriptionbooleanRequired
Indicates whether the coupon can be used for subscriptions.
version_idFlakeIdRequired
apply_to_productsFlakeId[]Optional
A list of product IDs the coupon applies to.
apply_to_tagsFlakeId[]Optional
A list of tag IDs the coupon applies to.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
duration_in_intervalsintegerOptional
The number of subscription renewals the coupon is valid for, used if the duration is repeating.
duration_in_monthsintegerOptional
The number of months the coupon is valid for, used if the duration is repeating.
expires_atstringOptional
The date and time when the coupon expires.
notestringOptional
A note or internal description of the coupon.
updated_atstringOptional
The date and time when the coupon was last updated.
updated_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
usable_atstringOptional
The date and time when the coupon becomes valid.
usable_by_customer_idFlakeIdOptional

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

curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/coupons" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true,
  "code": "string",
  "duration": "once",
  "discount_type": "unspecified",
  "discount_amount": 0,
  "discount_apply_individually": true,
  "discount_apply_before_sales": true,
  "minimum_order_value": 0,
  "redeem_limit_store_enabled": true,
  "redeem_limit_store_amount": 0,
  "redeem_limit_customer_enabled": true,
  "redeem_limit_customer_amount": 0,
  "usable_on_one_time_purchase": true,
  "usable_on_subscription": true,
  "note": "string",
  "duration_in_months": 0,
  "duration_in_intervals": 0,
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "usable_by_customer_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-01-01T00:00:00Z"
}'
Response200
{
  "code": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "discount_amount": 0,
  "discount_apply_before_sales": true,
  "discount_apply_individually": true,
  "discount_type": "unspecified",
  "duration": "once",
  "enabled": true,
  "id": "411486491630370816",
  "minimum_order_value": 0,
  "redeem_limit_customer_amount": 0,
  "redeem_limit_customer_enabled": true,
  "redeem_limit_store_amount": 0,
  "redeem_limit_store_enabled": true,
  "store_id": "411486491630370816",
  "usable_on_one_time_purchase": true,
  "usable_on_subscription": true,
  "version_id": "411486491630370816",
  "note": "string",
  "duration_in_months": 0,
  "duration_in_intervals": 0,
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "usable_by_customer_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2024-01-01T00:00:00Z"
}

Retrieves a coupon by ID

GEThttps://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
couponIdFlakeIdRequired
Response
200OKCouponDto
Represents a detailed view of a coupon, including configuration and audit information.
Show fields
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount in the smallest currency unit (e.g., cents).
discount_apply_before_salesbooleanRequired
Indicates whether the discount is applied before existing sales.
discount_apply_individuallybooleanRequired
Indicates whether the discount should be applied individually to required tags or products.
discount_typeenumRequired
Specifies the type of discount applied by a coupon.
Possible enum values
  • unspecified

    No discount type specified. This value is typically used as a default or uninitialized state.

  • percent

    A percentage-based discount (e.g., 10% off).

  • amount

    A fixed amount discount (e.g., $5 off).

durationenumRequired
Defines the duration for which a coupon remains valid.
Possible enum values
  • once

    The coupon can be used only once.

  • forever

    The coupon remains valid indefinitely (no expiration).

  • repeating

    The coupon is valid for a repeating period, typically specified in months.

enabledbooleanRequired
Indicates whether the coupon is enabled.
idFlakeIdRequired
minimum_order_valueintegerRequired
The minimum order value required to use the coupon.
redeem_limit_customer_amountintegerRequired
The maximum number of times the coupon can be redeemed per customer.
redeem_limit_customer_enabledbooleanRequired
Indicates whether a per-customer redemption limit is enabled.
redeem_limit_store_amountintegerRequired
The maximum number of times the coupon can be redeemed across the store.
redeem_limit_store_enabledbooleanRequired
Indicates whether a global redemption limit is enabled.
store_idFlakeIdRequired
usable_on_one_time_purchasebooleanRequired
Indicates whether the coupon can be used for one-time purchases.
usable_on_subscriptionbooleanRequired
Indicates whether the coupon can be used for subscriptions.
version_idFlakeIdRequired
apply_to_productsFlakeId[]Optional
A list of product IDs the coupon applies to.
apply_to_tagsFlakeId[]Optional
A list of tag IDs the coupon applies to.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
duration_in_intervalsintegerOptional
The number of subscription renewals the coupon is valid for, used if the duration is repeating.
duration_in_monthsintegerOptional
The number of months the coupon is valid for, used if the duration is repeating.
expires_atstringOptional
The date and time when the coupon expires.
notestringOptional
A note or internal description of the coupon.
updated_atstringOptional
The date and time when the coupon was last updated.
updated_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
usable_atstringOptional
The date and time when the coupon becomes valid.
usable_by_customer_idFlakeIdOptional

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

curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}" \
  -H "Authorization: APIKey TOKEN"
Response200
{
  "code": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "discount_amount": 0,
  "discount_apply_before_sales": true,
  "discount_apply_individually": true,
  "discount_type": "unspecified",
  "duration": "once",
  "enabled": true,
  "id": "411486491630370816",
  "minimum_order_value": 0,
  "redeem_limit_customer_amount": 0,
  "redeem_limit_customer_enabled": true,
  "redeem_limit_store_amount": 0,
  "redeem_limit_store_enabled": true,
  "store_id": "411486491630370816",
  "usable_on_one_time_purchase": true,
  "usable_on_subscription": true,
  "version_id": "411486491630370816",
  "note": "string",
  "duration_in_months": 0,
  "duration_in_intervals": 0,
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "usable_by_customer_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2024-01-01T00:00:00Z"
}

Performs a Delta Update of a Coupon

PATCHhttps://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
couponIdFlakeIdRequired
Request body
apply_to_productsFlakeId[]Optional
apply_to_tagsFlakeId[]Optional
codestringOptional
discount_amountintegerOptional
discount_apply_before_salesbooleanOptional
discount_apply_individuallybooleanOptional
discount_typeenumOptional
Specifies the type of discount applied by a coupon.
Possible enum values
  • unspecified

    No discount type specified. This value is typically used as a default or uninitialized state.

  • percent

    A percentage-based discount (e.g., 10% off).

  • amount

    A fixed amount discount (e.g., $5 off).

durationenumOptional
Defines the duration for which a coupon remains valid.
Possible enum values
  • once

    The coupon can be used only once.

  • forever

    The coupon remains valid indefinitely (no expiration).

  • repeating

    The coupon is valid for a repeating period, typically specified in months.

duration_in_intervalsintegerOptional
duration_in_monthsintegerOptional
enabledbooleanOptional
expires_atstringOptional
minimum_order_valueintegerOptional
notestringOptional
redeem_limit_customer_amountintegerOptional
redeem_limit_customer_enabledbooleanOptional
redeem_limit_store_amountintegerOptional
redeem_limit_store_enabledbooleanOptional
usable_atstringOptional
usable_by_customer_idFlakeIdOptional
usable_on_one_time_purchasebooleanOptional
usable_on_subscriptionbooleanOptional
Response
200OKCouponDto
Represents a detailed view of a coupon, including configuration and audit information.
Show fields
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount in the smallest currency unit (e.g., cents).
discount_apply_before_salesbooleanRequired
Indicates whether the discount is applied before existing sales.
discount_apply_individuallybooleanRequired
Indicates whether the discount should be applied individually to required tags or products.
discount_typeenumRequired
Specifies the type of discount applied by a coupon.
Possible enum values
  • unspecified

    No discount type specified. This value is typically used as a default or uninitialized state.

  • percent

    A percentage-based discount (e.g., 10% off).

  • amount

    A fixed amount discount (e.g., $5 off).

durationenumRequired
Defines the duration for which a coupon remains valid.
Possible enum values
  • once

    The coupon can be used only once.

  • forever

    The coupon remains valid indefinitely (no expiration).

  • repeating

    The coupon is valid for a repeating period, typically specified in months.

enabledbooleanRequired
Indicates whether the coupon is enabled.
idFlakeIdRequired
minimum_order_valueintegerRequired
The minimum order value required to use the coupon.
redeem_limit_customer_amountintegerRequired
The maximum number of times the coupon can be redeemed per customer.
redeem_limit_customer_enabledbooleanRequired
Indicates whether a per-customer redemption limit is enabled.
redeem_limit_store_amountintegerRequired
The maximum number of times the coupon can be redeemed across the store.
redeem_limit_store_enabledbooleanRequired
Indicates whether a global redemption limit is enabled.
store_idFlakeIdRequired
usable_on_one_time_purchasebooleanRequired
Indicates whether the coupon can be used for one-time purchases.
usable_on_subscriptionbooleanRequired
Indicates whether the coupon can be used for subscriptions.
version_idFlakeIdRequired
apply_to_productsFlakeId[]Optional
A list of product IDs the coupon applies to.
apply_to_tagsFlakeId[]Optional
A list of tag IDs the coupon applies to.
created_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
duration_in_intervalsintegerOptional
The number of subscription renewals the coupon is valid for, used if the duration is repeating.
duration_in_monthsintegerOptional
The number of months the coupon is valid for, used if the duration is repeating.
expires_atstringOptional
The date and time when the coupon expires.
notestringOptional
A note or internal description of the coupon.
updated_atstringOptional
The date and time when the coupon was last updated.
updated_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
usable_atstringOptional
The date and time when the coupon becomes valid.
usable_by_customer_idFlakeIdOptional

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

curl -X PATCH "https://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}" \
  -H "Authorization: APIKey TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true,
  "code": "string",
  "note": "string",
  "duration": "once",
  "duration_in_months": 0,
  "duration_in_intervals": 0,
  "discount_type": "unspecified",
  "discount_amount": 0,
  "discount_apply_individually": true,
  "discount_apply_before_sales": true,
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "usable_by_customer_id": "411486491630370816",
  "minimum_order_value": 0,
  "redeem_limit_store_enabled": true,
  "redeem_limit_store_amount": 0,
  "redeem_limit_customer_enabled": true,
  "redeem_limit_customer_amount": 0,
  "usable_on_one_time_purchase": true,
  "usable_on_subscription": true,
  "usable_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-01-01T00:00:00Z"
}'
Response200
{
  "code": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "discount_amount": 0,
  "discount_apply_before_sales": true,
  "discount_apply_individually": true,
  "discount_type": "unspecified",
  "duration": "once",
  "enabled": true,
  "id": "411486491630370816",
  "minimum_order_value": 0,
  "redeem_limit_customer_amount": 0,
  "redeem_limit_customer_enabled": true,
  "redeem_limit_store_amount": 0,
  "redeem_limit_store_enabled": true,
  "store_id": "411486491630370816",
  "usable_on_one_time_purchase": true,
  "usable_on_subscription": true,
  "version_id": "411486491630370816",
  "note": "string",
  "duration_in_months": 0,
  "duration_in_intervals": 0,
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "usable_by_customer_id": "411486491630370816",
  "usable_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2024-01-01T00:00:00Z"
}

Deletes a coupon

DELETEhttps://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}
Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
couponIdFlakeIdRequired
Response
204No Content

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

curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}" \
  -H "Authorization: APIKey TOKEN"