Skip to main content
GET
/
promo-code
Validate Promo Code
curl --request GET \
  --url https://api.dontdie.com/promo-code \
  --header 'Authorization: Bearer <token>' \
  --header 'x-dd-client-id: <api-key>'
{
  "code": "SUMMER2024",
  "couponId": "coupon_1234567890",
  "percentOff": 20,
  "amountOff": 1000,
  "currency": "usd",
  "valid": true
}

Authorizations

Authorization
string
header
required

Enter your Bearer token in the format: Bearer

x-dd-client-id
string
header
required

Your API client ID for the request

Query Parameters

promoCode
string
required

The promo code to validate

Response

OK

Promotion validation response

code
string

The promo code

Example:

"SUMMER2024"

couponId
string

The Stripe coupon ID

Example:

"coupon_1234567890"

percentOff
number | null

The percentage discount (if applicable)

Example:

20

amountOff
number | null

The amount discount in cents (if applicable)

Example:

1000

currency
string | null

The currency for the amount discount (if applicable)

Example:

"usd"

valid
boolean

Whether the promo code is valid

Example:

true