Docs

Coupons

Manage Stripe coupons via the Admin API

Coupons API

Manage discount coupons for your Stripe integration. Coupons provide discounts on subscriptions or invoice items.

Endpoints

GET /api/admin/stripe/coupons

List all coupons from your Stripe account.

Query Parameters

ParameterTypeDescription
limitnumberMaximum number of coupons to return (default: 10, max: 100)
starting_afterstringCursor for pagination

Response

{
  "data": [
    {
      "id": "coupon_1234567890",
      "object": "coupon",
      "name": "Summer Sale",
      "amount_off": null,
      "percent_off": 20,
      "currency": null,
      "duration": "once",
      "duration_in_months": null,
      "max_redemptions": 100,
      "redeem_by": 1234567890,
      "times_redeemed": 5,
      "valid": true,
      "created": 1234567890
    }
  ],
  "has_more": false
}

POST /api/admin/stripe/coupons

Create a new coupon.

Request Body - Percentage Discount

{
  "id": "SUMMER20",
  "name": "Summer Sale 20%",
  "percent_off": 20,
  "duration": "once",
  "max_redemptions": 100
}

Request Body - Fixed Amount Discount

{
  "id": "SAVE10",
  "name": "$10 Off",
  "amount_off": 1000,
  "currency": "usd",
  "duration": "once"
}

Request Body - Repeating Duration

{
  "id": "3MONTHS50",
  "name": "50% Off for 3 Months",
  "percent_off": 50,
  "duration": "repeating",
  "duration_in_months": 3
}

Parameters

ParameterTypeRequiredDescription
idstringNoUnique identifier for the coupon (auto-generated if not provided)
namestringNoDisplay name for the coupon
percent_offnumber*Percentage discount (required if not using amount_off)
amount_offnumber*Fixed amount discount in cents (required if not using percent_off)
currencystring*Required when using amount_off (e.g., "usd")
durationstringYesDiscount duration: once, forever, or repeating
duration_in_monthsnumber*Required if duration is repeating
max_redemptionsnumberNoMaximum number of times the coupon can be redeemed
redeem_bytimestampNoUnix timestamp after which the coupon expires
metadataobjectNoKey-value pairs for storing additional information

Response

{
  "id": "SUMMER20",
  "object": "coupon",
  "name": "Summer Sale 20%",
  "amount_off": null,
  "percent_off": 20,
  "currency": null,
  "duration": "once",
  "duration_in_months": null,
  "max_redemptions": 100,
  "redeem_by": null,
  "times_redeemed": 0,
  "valid": true,
  "metadata": {},
  "created": 1234567890
}

DELETE /api/admin/stripe/coupons

Delete a coupon. Deleted coupons can no longer be redeemed, but existing subscriptions using the coupon will continue to receive the discount.

Request Body

{
  "id": "SUMMER20"
}

Parameters

ParameterTypeRequiredDescription
idstringYesThe coupon ID to delete

Response

{
  "id": "SUMMER20",
  "object": "coupon",
  "deleted": true
}

Duration Types

DurationDescription
onceDiscount applies only to the first invoice
repeatingDiscount applies for a limited number of months
foreverDiscount applies to all invoices indefinitely

Example Usage

Create a Percentage Coupon

curl -X POST /api/admin/stripe/coupons \
  -H "Content-Type: application/json" \
  -d '{
    "id": "WELCOME25",
    "name": "Welcome 25% Off",
    "percent_off": 25,
    "duration": "once",
    "max_redemptions": 500
  }'

Create a Fixed Amount Coupon

curl -X POST /api/admin/stripe/coupons \
  -H "Content-Type: application/json" \
  -d '{
    "id": "SAVE5",
    "name": "$5 Off",
    "amount_off": 500,
    "currency": "usd",
    "duration": "once"
  }'

Create a Multi-Month Discount

curl -X POST /api/admin/stripe/coupons \
  -H "Content-Type: application/json" \
  -d '{
    "id": "ANNUAL30",
    "name": "30% Off for 12 Months",
    "percent_off": 30,
    "duration": "repeating",
    "duration_in_months": 12
  }'

List All Coupons

curl /api/admin/stripe/coupons?limit=20

Delete a Coupon

curl -X DELETE /api/admin/stripe/coupons \
  -H "Content-Type: application/json" \
  -d '{
    "id": "SUMMER20"
  }'

On this page