https://pay.nova.money/api/v1.
Validate a coupon
Check whether a coupon code is valid and retrieve its discount type and value for one or more products.Path parameters
The coupon code to validate (e.g.,
SUMMER20).Query parameters
The product ID (or comma-separated list of product IDs) to validate the coupon against. When multiple IDs are supplied, the coupon must apply to all of them.Examples:
- Single product:
?product_id=101 - Multiple products:
?product_id=101,102,103
Response — 200 OK
The coupon is valid and applies to the given product(s).The validated coupon code, echoed back from the request.
The discount amount. Interpretation depends on
type:price— a fixed monetary amount to subtract from the order total.percentage— a percentage to deduct from the order total.
The discount type. One of:
price— fixed amount off the order total.percentage— percentage off the order total.
Response — 422 Unprocessable Entity
Returned when the coupon code does not exist, has expired, has been exhausted, or does not apply to the specified product(s). The response body contains an error message describing the reason.Example request and response
Once you have validated a coupon, you can pass it in two places:
GET /payment_plans— include the coupon code as a query parameter to receive plan amounts with the discount already applied, so you can display the correct price to the customer before they confirm.- Payment request body — include the coupon code in the
couponfield when callingPOST /ordersorPOST /customers(withcreate_deal: true) to have the discount applied to the created order.