HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
API Reference

Create Coupon

Creates a new coupon. Please note: coupons cannot be updated after being created.

DISCOUNT IN DOLLARS
When specifying a discount amount as a flat amount, the currency must be specified with the amount in an array. For example:

<discount_type>dollars</discount_type>
<discount_in_cents>
  <USD>500</USD>
  <EUR>400</EUR>
  <GBP>300</GBP>
</discount_in_cents>

DISCOUNT IN PERCENTAGE
Percentage discounts only need to specify the discount percentage. For example:

<discount_type>percent</discount_type>
<discount_percent>10</discount_percent>

LIMITING TO SPECIFIC PLANS
If a coupon applies to all plans, it will also apply to any plans created in the future. To limit a coupon to specific plans, you may specify an array of plan codes. For example:

<applies_to_all_plans>false</applies_to_all_plans>
<plan_codes>
  <plan_code>silver</plan_code>
  <plan_code>gold</plan_code>
</plan_codes>
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string

Unique code to identify and redeem the coupon. This code may only contain the following characters: [a-z A-Z 0-9 @ - _ .]. Max of 50 characters

string

Coupon name

string

Description of the coupon on the hosted payment pages

string

Description of the coupon on the invoice

date

Last date to redeem the coupon, defaults to no date

boolean

If true, the coupon applies to the first invoice only

integer

Number of months after redemption that the coupon is valid, defaults to no date

string

Maximum number of accounts that may use the coupon before it can no longer be redeemed

boolean

The coupon is valid for all plans if true, defaults to true

string

"percent" or "dollars"

integer

Discount percentage if discount_type is "percent"

integer

Mapping of discount amounts by currency if discount_type is "dollars". Max 10000000.

string

Array of plan_codes the coupon applies to, if applies_to_all_plans is false

Response

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