Early access. Write to hello@bouclay.com to have it turned on for your account.
What a discount can be
Proration lines never take a discount. Tax is worked out on the discounted amount.
Apply a code when someone subscribes
Pass the code the customer typed. It is matched without regard to case:422 on discountCode that says why. With a trial, the discount starts on the invoice the trial converts to. You can pass discount (a disc_… id) instead of a code.
Apply or remove one later
For a code entered after signing up, or one your support team gives:DELETE /subscriptions/{id}/discount takes it off. Invoices already issued keep theirs.
Read discounts
GET /discounts and GET /discounts/{id} return your discounts with timesRedeemed, so you can show what a code gives before the customer applies it.