Validate a coupon
POST
/api/v1/business/website/coupon/validate/
Check a coupon code against the current subtotal. Identifies the store via the X-Subdomain header. Invalid coupons still return 200 with valid: false and a human-readable message. A logged-in shopper's Bearer token (optional) enables one-use-per-customer checks.
Authorizations
apiKey
Your business API key (sb_live_*) — identifies which store the request is for. Required on every /api/v1/business/website/ request.
Type
API Key (header: X-Periscale-Key)
Request Body
application/json
JSON "coupon_code": "string", "subtotal": 0
{
}
Responses
Validation result (valid or invalid).
application/json
JSON "status": true, "status_code": 200, "message": "", "data": { "valid": true, "offer_id": 12, "discount_type": "percentage", "discount_value": "10.00", "discount_amount": "150.00", "offer_name": "10% Off Sale", "coupon_code": "SAVE10" }
{
}