Update coupon

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Update an existing coupon's name, code, expiration, redemption limits, plan restrictions, or metadata.

What can be updated

Only the following fields can be changed after creation:

  • name — display name
  • code — redemption code (must remain unique within the site, alphanumeric only)
  • redeem_by — expiration date (YYYY-MM-DD, must be a future date). Set to null to remove expiration
  • max_redemptions — usage limit. Cannot be set lower than current redemption count
  • plans — plan restrictions
  • metadata — custom key-value pairs

amount_off, percent_off, duration, and currency are set at creation and cannot be changed. If passed, they are silently ignored.

Behavior

  • Metadata is merged, not replaced. New keys are added to existing metadata. To clear metadata, pass an empty object.
  • Plans are replaced. If plans is provided, the coupon's plan restrictions are updated to match. If plans is omitted, all existing plan restrictions are removed.
Path Params
int32
required
Query Params
int32
required
Body Params
string
required
length between 3 and 40
string
required
length between 3 and 255
date
integer
≥ 1
plans
array of integers
plans
metadata
object
Headers
string
required
Defaults to Bearer eyJ***
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json