Coupons
Authorization: APIKey TOKEN.Show fieldsHide fields
unspecifiedNo discount type specified. This value is typically used as a default or uninitialized state.
percentA percentage-based discount (e.g., 10% off).
amountA fixed amount discount (e.g., $5 off).
onceThe coupon can be used only once.
foreverThe coupon remains valid indefinitely (no expiration).
repeatingThe coupon is valid for a repeating period, typically specified in months.
created_byActorDtoOptional
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
updated_byActorDtoOptional
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
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"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.coupons.getCouponsForStore();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/coupons", headers=headers)[
{
"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"
}
]Authorization: APIKey TOKEN.unspecifiedNo discount type specified. This value is typically used as a default or uninitialized state.
percentA percentage-based discount (e.g., 10% off).
amountA fixed amount discount (e.g., $5 off).
onceThe coupon can be used only once.
foreverThe coupon remains valid indefinitely (no expiration).
repeatingThe coupon is valid for a repeating period, typically specified in months.
Show fieldsHide fields
unspecifiedNo discount type specified. This value is typically used as a default or uninitialized state.
percentA percentage-based discount (e.g., 10% off).
amountA fixed amount discount (e.g., $5 off).
onceThe coupon can be used only once.
foreverThe coupon remains valid indefinitely (no expiration).
repeatingThe coupon is valid for a repeating period, typically specified in months.
created_byActorDtoOptional
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
updated_byActorDtoOptional
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
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"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.coupons.createCouponForStore({
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",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"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",
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/coupons", headers=headers, json=payload){
"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"
}Authorization: APIKey TOKEN.Show fieldsHide fields
unspecifiedNo discount type specified. This value is typically used as a default or uninitialized state.
percentA percentage-based discount (e.g., 10% off).
amountA fixed amount discount (e.g., $5 off).
onceThe coupon can be used only once.
foreverThe coupon remains valid indefinitely (no expiration).
repeatingThe coupon is valid for a repeating period, typically specified in months.
created_byActorDtoOptional
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
updated_byActorDtoOptional
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
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"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.coupons.getCouponByIdForStore("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}", headers=headers){
"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
Authorization: APIKey TOKEN.unspecifiedNo discount type specified. This value is typically used as a default or uninitialized state.
percentA percentage-based discount (e.g., 10% off).
amountA fixed amount discount (e.g., $5 off).
onceThe coupon can be used only once.
foreverThe coupon remains valid indefinitely (no expiration).
repeatingThe coupon is valid for a repeating period, typically specified in months.
Show fieldsHide fields
unspecifiedNo discount type specified. This value is typically used as a default or uninitialized state.
percentA percentage-based discount (e.g., 10% off).
amountA fixed amount discount (e.g., $5 off).
onceThe coupon can be used only once.
foreverThe coupon remains valid indefinitely (no expiration).
repeatingThe coupon is valid for a repeating period, typically specified in months.
created_byActorDtoOptional
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
updated_byActorDtoOptional
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
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"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.coupons.updateCouponForStore("411486491630370816", {
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",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"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",
}
response = requests.patch("https://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}", headers=headers, json=payload){
"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"
}Authorization: APIKey TOKEN.curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.coupons.deleteCouponForStore("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/coupons/{couponId}", headers=headers)