API Reference

Create a coupons

Creates a new Coupon object.

Body Params
float
required

A positive number representing the amount of the coupon.

string
Defaults to invoice

Can be line or invoice. Line allow apply the coupon only to Subscription Line objects. Invoice allow apply the coupon only to Subscription objects.

string
required

Three-letter ISO code for the currency of the coupon.

string
Defaults to %

Can be $ or %. $ apply amount as discount. % apply percentage as discount.

string
Defaults to one_time

Can be one_time, forever or limited. One time will apply the coupon on the first subscription billing after adding the coupon. Forever will apply the coupon to all subscription billing after adding the coupon. Limited will apply the coupon to subscription billing according to value specified in duration_times attribute.

int32

Required if duration_scheme attribute is limited. Determines how many times the coupon should be applied after being added.

string
required

A human identifier for the coupon with a 56 characters as max length. This is used to help you to manage coupons in your account.

date

Date that determines until when the coupon can be applied to new subscriptions.

Response

Language
Credentials
Choose an example:
application/json