Coupons
Verify / preview coupon
POST
Permission: billing.manage
apiTokenheader
AuthorizationBearer <token>An API token (mwp_…) from Settings → API tokens. Only accepted on this host.
application/json- body
code*CodeCoupon code to validate.
plan_id?|If set, validates plan restriction and fills plan_price / discount_preview / final_price.
billing_cycle?Billing Cycle"monthly" or "yearly" — used with plan_id to compute price preview.
Default
"monthly"Successful Response
application/json- response
success*booleandata*The result; on an error, details such as code and permission.
message*stringstatus_code*integertimestamp*stringFormat
date-timemeta?|nullcurl -X POST "https://example.com/v1/coupons/verify" \ -H "Content-Type: application/json" \ -d '{ "billing_cycle": "monthly", "code": "FIRST50", "plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }'{ "message": "string", "status_code": 0, "timestamp": "2019-08-24T14:15:22Z", "meta": {}, "success": true, "data": { "valid": true, "code": "string", "type": "string", "value": "string", "duration": "string", "duration_months": null, "applicable_plan_ids": null, "billing_cycle": "both", "discount_preview": null, "plan_price": null, "final_price": null, "message": "" }}