Skip to main content
POST
Verify coupon

Request

Headers

This endpoint supports both authenticated and unauthenticated requests. Authentication is optional but recommended to validate user-specific coupon usage limits.

Body parameters

Successful response

Response fields

Validation checks

The endpoint performs the following validations:
Coupon exists and is active
Coupon belongs to the specified shop
Coupon is within valid date range (between start and end dates)
Global usage limit has not been exceeded
Per-user usage limit has not been exceeded (for authenticated users)
Order meets minimum amount requirement (if orderId provided)

Error responses

Invalid coupon code

Coupon expired

Minimum order not met

Usage limit reached

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Body

application/json
code
string
required

Coupon code to verify (case-insensitive).

Example:

"SUMMER20"

orderId
string

Optional order ID to validate coupon against order total.

Example:

"67890abcdef1234567890abc"

Response

Coupon is valid.

status
integer
required
Example:

200

success
boolean
required
Example:

true

message
string
required
Example:

"Coupon is valid"

data
object
required