Validate a coupon code against a specific product and quantity, and get the calculated discount amount.Documentation Index
Fetch the complete documentation index at: https://docs.rmz.gg/llms.txt
Use this file to discover all available pages before exploring further.
Apply Coupon
This is a public endpoint. It requires the
X-Embed-Key header but no customer authentication.Headers
| Header | Required | Description |
|---|---|---|
X-Embed-Key | Yes | Your store’s embed public key |
Content-Type | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Yes | The coupon code to validate |
product_id | integer | Yes | The product ID to apply the coupon to |
quantity | integer | Yes | The purchase quantity (min: 1) |
Example Request
Success Response (200)
Response Fields
| Field | Type | Description |
|---|---|---|
coupon_id | integer | Internal coupon ID |
code | string | The coupon code |
type | string | Coupon type: percentage or fixed |
amount | float | The coupon value (percentage or fixed amount) |
discount_amount | float | The calculated discount for the given product and quantity |
payment_restrictions | array | List of payment methods this coupon is restricted to (empty array = no restrictions) |

