Coupons

Create a coupon

POST https://api.piriod.com/coupons/

Creates a new Coupon object.

Request Body

NameTypeDescription

amount

number

A positive number representing the amount of the coupon.

apply_on

string

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

currency

string

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

discount_scheme

string

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

duration_scheme

string

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. Default is one_time.

duration_times

number

Determine how many times the coupon should be applied after being added. Works only with duration_scheme=limited.

name

string

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.

valid_until

string

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

Last updated