Skip to main content
PATCH
/
v1
/
coupons
/
{id}
Update
curl --request PATCH \
  --url https://{defaultHost}/v1/coupons/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "coupon": {
    "name": "Updated Coupon"
  }
}
'
{
  "id": "2e0e2c44-f430-49c2-b8af-d809b6b61049",
  "object": "coupon",
  "archived": false,
  "archived_at": null,
  "amount_off": 500,
  "currency": "usd",
  "duration": "once",
  "duration_in_months": null,
  "expired": false,
  "metadata": {},
  "max_redemptions": null,
  "max_redemptions_per_customer": null,
  "max_subtotal_amount": null,
  "min_subtotal_amount": null,
  "name": "Updated Coupon",
  "percent_off": null,
  "product_ids": [],
  "redeem_by": null,
  "times_redeemed": 0,
  "discarded_at": null,
  "created_at": 1767909689,
  "updated_at": 1767909689
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
coupon
object

Response

200 - application/json

Success

id
string | null

The UUID of the specific object.

object
string

A string describing the object type returned.

archived
boolean

Whether or not this coupon is archived.

amount_off
integer | null

Amount (in the currency specified) that will be taken off the subtotal of any checkout.

duration
string
default:once

One of forever, once, and repeating. Describes how long a discount with this coupon will be applied. (The repeating and forever values only apply to subscriptions.)

duration_in_months
integer | null

If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.

max_redemptions
integer | null

Maximum number of times this coupon can be redeemed in total across all customers.

max_redemptions_per_customer
integer | null

Maximum number of times this coupon can be redeemed per customer.

max_subtotal_amount
integer | null

The maximum subtotal_amount that is allowed for the coupon to be applicable to a checkout or subscription.

min_subtotal_amount
integer | null

The minimum subtotal_amount that is required for the coupon to be applicable to a checkout or subscription.

name
string

Name of the coupon displayed to customers.

percent_off
number | null

Percent that will be taken off the subtotal of any checkout. For example, a coupon with percent_off of 50 will make a $100 checkout $50 instead.

product_ids
array

An array of product IDs that this coupon applies to.

redeem_by
integer | null

Date after which the coupon can no longer be redeemed.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

archived_at
integer | null

Time at which the object was archived. Measured in seconds since the Unix epoch.

currency
string

Three-letter ISO currency code, in lowercase. This value will match the Account currency.

discounts

Expandable – Property not returned unless expanded.

expired
boolean

Taking into account the above properties, whether this coupon can still be applied to a checkout.

promotions

Expandable – Property not returned unless expanded.

times_redeemed
integer

Number of times this coupon has been applied to a checkout and/or subscription.

discarded_at
integer | null

Time at which the object was discarded. Measured in seconds since the Unix epoch.

created_at
integer | null

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at
integer | null

Time at which the object was last updated. Measured in seconds since the Unix epoch.