PayNow

Coupons

Get coupons

GEThttps://api.paynow.gg/v1/stores/{storeId}/coupons

Retrieves all coupons for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to retrieve coupons for.
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
idFlakeIdRequired
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount, interpreted based on discount type: for a fixed-amount discount, this is in the smallest currency unit (e.g., cents); for a percentage discount, this is in tenths of a percent (e.g., 100 = 10.0% off).
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.
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
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
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
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
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
[
  {
    "id": "411486491630370816",
    "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,
    "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",
    "apply_to_products": [
      "411486491630370816"
    ],
    "apply_to_tags": [
      "411486491630370816"
    ],
    "created_by": {
      "id": "411486491630370816",
      "type": "anonymous"
    },
    "duration_in_intervals": 0,
    "duration_in_months": 0,
    "expires_at": "2024-01-01T00:00:00Z",
    "note": "string",
    "updated_at": "2024-01-01T00:00:00Z",
    "updated_by": {
      "id": "411486491630370816",
      "type": "anonymous"
    },
    "usable_at": "2024-01-01T00:00:00Z",
    "usable_by_customer_id": "411486491630370816"
  }
]

Create coupon

POSThttps://api.paynow.gg/v1/stores/{storeId}/coupons

Creates a new coupon in the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to create the coupon in.
Request body
codestringRequired
The unique code associated with the coupon.
discount_amountintegerRequired
The discount amount, interpreted based on discount type: for a fixed-amount discount, this is in the smallest currency unit (e.g., cents); for a percentage discount, this is in tenths of a percent (e.g., 100 = 10.0% off).
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.
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.
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.
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.
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.
usable_atstringOptional
The date and time when the coupon becomes valid.
usable_by_customer_idFlakeIdOptional
Response
200OKCouponDto
Represents a detailed view of a coupon, including configuration and audit information.
Show fields
idFlakeIdRequired
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount, interpreted based on discount type: for a fixed-amount discount, this is in the smallest currency unit (e.g., cents); for a percentage discount, this is in tenths of a percent (e.g., 100 = 10.0% off).
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.
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
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
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
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
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 '{
  "code": "string",
  "discount_amount": 0,
  "discount_apply_before_sales": true,
  "discount_apply_individually": true,
  "discount_type": "unspecified",
  "duration": "once",
  "enabled": true,
  "minimum_order_value": 0,
  "redeem_limit_customer_amount": 0,
  "redeem_limit_customer_enabled": true,
  "redeem_limit_store_amount": 0,
  "redeem_limit_store_enabled": true,
  "usable_on_one_time_purchase": true,
  "usable_on_subscription": true,
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "duration_in_intervals": 0,
  "duration_in_months": 0,
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "usable_at": "2024-01-01T00:00:00Z",
  "usable_by_customer_id": "411486491630370816"
}'
Response200
{
  "id": "411486491630370816",
  "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,
  "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",
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "duration_in_intervals": 0,
  "duration_in_months": 0,
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "usable_at": "2024-01-01T00:00:00Z",
  "usable_by_customer_id": "411486491630370816"
}

Get coupon by ID

GEThttps://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}

Retrieves a coupon by the ID for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to retrieve the coupon for.
couponIdFlakeIdRequired
The ID of the coupon.
Response
200OKCouponDto
Represents a detailed view of a coupon, including configuration and audit information.
Show fields
idFlakeIdRequired
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount, interpreted based on discount type: for a fixed-amount discount, this is in the smallest currency unit (e.g., cents); for a percentage discount, this is in tenths of a percent (e.g., 100 = 10.0% off).
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.
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
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
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
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
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
{
  "id": "411486491630370816",
  "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,
  "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",
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "duration_in_intervals": 0,
  "duration_in_months": 0,
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "usable_at": "2024-01-01T00:00:00Z",
  "usable_by_customer_id": "411486491630370816"
}

Update coupon by ID

PATCHhttps://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}

Performs a delta update of a coupon by the ID for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to update the coupon for.
couponIdFlakeIdRequired
The ID of the coupon.
Request body
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.
codestringOptional
The unique code associated with the coupon.
discount_amountintegerOptional
The discount amount, interpreted based on discount type: for a fixed-amount discount, this is in the smallest currency unit (e.g., cents); for a percentage discount, this is in tenths of a percent (e.g., 100 = 10.0% off).
discount_apply_before_salesbooleanOptional
Indicates whether the discount is applied before existing sales.
discount_apply_individuallybooleanOptional
Indicates whether the discount should be applied individually to required tags or products.
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
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.
enabledbooleanOptional
Indicates whether the coupon is enabled.
expires_atstringOptional
The date and time when the coupon expires.
minimum_order_valueintegerOptional
The minimum order value required to use the coupon.
notestringOptional
A note or internal description of the coupon.
redeem_limit_customer_amountintegerOptional
The maximum number of times the coupon can be redeemed per customer.
redeem_limit_customer_enabledbooleanOptional
Indicates whether a per-customer redemption limit is enabled.
redeem_limit_store_amountintegerOptional
The maximum number of times the coupon can be redeemed across the store.
redeem_limit_store_enabledbooleanOptional
Indicates whether a global redemption limit is enabled.
usable_atstringOptional
The date and time when the coupon becomes valid.
usable_by_customer_idFlakeIdOptional
usable_on_one_time_purchasebooleanOptional
Indicates whether the coupon can be used for one-time purchases.
usable_on_subscriptionbooleanOptional
Indicates whether the coupon can be used for subscriptions.
Response
200OKCouponDto
Represents a detailed view of a coupon, including configuration and audit information.
Show fields
idFlakeIdRequired
codestringRequired
The unique code associated with the coupon.
created_atstringRequired
The date and time when the coupon was created.
discount_amountintegerRequired
The discount amount, interpreted based on discount type: for a fixed-amount discount, this is in the smallest currency unit (e.g., cents); for a percentage discount, this is in tenths of a percent (e.g., 100 = 10.0% off).
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.
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
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
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
Represents the actor that performed an action, such as the user, API key or game server that created or changed a record.
idFlakeIdOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
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 '{
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "code": "string",
  "discount_amount": 0,
  "discount_apply_before_sales": true,
  "discount_apply_individually": true,
  "discount_type": "unspecified",
  "duration": "once",
  "duration_in_intervals": 0,
  "duration_in_months": 0,
  "enabled": true,
  "expires_at": "2024-01-01T00:00:00Z",
  "minimum_order_value": 0,
  "note": "string",
  "redeem_limit_customer_amount": 0,
  "redeem_limit_customer_enabled": true,
  "redeem_limit_store_amount": 0,
  "redeem_limit_store_enabled": true,
  "usable_at": "2024-01-01T00:00:00Z",
  "usable_by_customer_id": "411486491630370816",
  "usable_on_one_time_purchase": true,
  "usable_on_subscription": true
}'
Response200
{
  "id": "411486491630370816",
  "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,
  "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",
  "apply_to_products": [
    "411486491630370816"
  ],
  "apply_to_tags": [
    "411486491630370816"
  ],
  "created_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "duration_in_intervals": 0,
  "duration_in_months": 0,
  "expires_at": "2024-01-01T00:00:00Z",
  "note": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "updated_by": {
    "id": "411486491630370816",
    "type": "anonymous"
  },
  "usable_at": "2024-01-01T00:00:00Z",
  "usable_by_customer_id": "411486491630370816"
}

Delete coupon by ID

DELETEhttps://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}

Deletes a coupon by the ID for the specified store.

Headers
AuthorizationAPI KeyRequired
Authentication token for this request, sent as Authorization: APIKey TOKEN.
Path parameters
storeIdFlakeIdRequired
The ID of the store to delete the coupon for.
couponIdFlakeIdRequired
The ID of the coupon.
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"