v1
latestOpenAPI 3.0.02026-07-24103118224.7 KBPayment
Apply a coupon to a payment
Applies a coupon to a pending payment before confirmation. The coupon system (one-time vs subscription) is auto-detected from the payment; applying a coupon of the wrong type returns an error. The payment amount is reduced so the discounted total is charged at confirmation.
post/api/server/payment/{paymentId}/coupon
Path parameters
paymentIdstring required
Example:pay_1234567890abcdef
Unique identifier of the payment to apply the coupon to
Request body
Example request
{
"code": "SAVE10"
}Response
Apply a coupon to a payment successful
Example response
{
"paymentId": "pay_1234567890",
"paymentType": "ONE_TIME",
"status": "INITIATION",
"amount": 9000,
"amountTaxesIncluded": 10800,
"currency": "EUR",
"couponDiscountInCents": 1000,
"coupon": {
"code": "SAVE10",
"discountType": "PERCENTAGE",
"discountAmountInCents": 1000,
"finalAmountInCents": 9000
}
}