Discounts
Apply discounts to invoices and recurring plans
A discount reduces the amount on an invoice or a recurring contract — a percentage or a fixed amount, applied to the whole order or a specific item, automatically or with a coupon code. Discounts travel on the Invoicing and Recurring Billing requests. For the full field list, jump to the Discount fields.
Common use cases
- Apply a percentage discount to an order
- Give a fixed-amount credit on a specific line item
- Accept a coupon code at checkout or on a recurring plan
How discounts are applied
A discount is defined by three choices:
- What it reduces (
discountType): the wholeOrder, a singleItem, aCollection, or aTag. - How it's valued (
discountRateType): aPercent(userate, e.g.0.13for 13%) or a fixedAmount. - How it's triggered (
discountApplicationType):Automatic,Manual, or byCoupon(with acode).
Add the discount to the discounts[] array on the invoice or contract; PCE applies it and reflects the result in discountAmount and totalAmount on the response.
Apply a discount to a recurring plan
List the discount in the contract-level discounts[] array.
POST /checkout/v3/contractsubscription
{
"contract": {
"merchantId": 1000157980,
"type": "Recurring",
"interval": "Monthly",
"frequency": 1,
"discounts": [
{
"name": "Loyalty 13%",
"discountType": "Order",
"discountRateType": "Percent",
"discountApplicationType": "Automatic",
"rate": "0.13",
"code": "LOYAL13"
}
],
"subTotalAmount": "24.95",
"discountAmount": "3.24",
"totalAmount": 21.71
},
"subscription": {
"customerId": 10000001524400,
"cardAccountId": 10000001225823,
"invoiceMethod": "Autopay",
"status": "Active",
"startDate": "2026-02-01"
}
}The plan is created via POST /checkout/v3/contractsubscription. See Recurring Billing for the full request.
Apply a discount to an invoice
Reduce a line item with the discount field on a purchases[] entry, or read the discounts already applied to an invoice.
- Read the discounts on an invoice:
GET/checkout/v3/invoice/{invoiceId}/discount/ - Read a specific applied discount:
GET/checkout/v3/invoice/{invoiceId}/discount/{discountId}
See Invoicing for the full create-invoice request.
Discount fields
Each item in discounts[]:
| Field | Description |
|---|---|
name | Display name of the discount. |
discountType | What the discount applies to. Possible values: Order, Item, Collection, Tag. |
discountRateType | How the discount is valued. Possible values: Percent, Amount. |
discountApplicationType | How the discount is triggered. Possible values: Manual, Automatic, Coupon. |
rate | Percentage value used to calculate the discount (for Percent), as a decimal. |
code | Code used to apply the discount (for Coupon). |
isExclusive | Whether the discount can be combined with others. |
isApprovalRequired | Whether the discount requires approval before it applies. |
startDate | When the discount becomes effective. |
See also
- Invoicing: apply a discount to an invoice
- Recurring Billing: apply a discount to a recurring plan
- Sales Tax: tax is applied after discounts
Updated about 4 hours ago