v1
latestOpenAPI 3.1.02026-07-241080412.6 KBApply coupon
Use this endpoint to apply coupon on existing subscription. The coupon previously has to be configured in Cleeng Dashboard -> Offers & Coupons -> Coupon Management.
patch/customers/{customerId}/subscriptions/{subscriptionId}
Path parameters
customerIdstring required
Customer identifier at Cleeng
subscriptionIdstring required
Subscription identifier at Cleeng. You can take this param from fetch customer's subscription endpoint.
Request body
Response
200
Example response
{
"responseData": {
"success": true,
"subscription": {
"subscriptionId": 743218705,
"customerId": 264555895,
"status": "active",
"dateTo": 4219655155,
"offerId": "S253647975_PL",
"paymentCountry": "PL",
"couponCode": "test50",
"coupon": {
"discountRate": 0.5,
"usageLeft": 5
}
},
"message": "Coupon applied successfully"
}
}