Dashboard
APIValidate Coupon API - Check Discount Code | BotSubscription
api.botsubscription.com
GET/v1/endpoint
AuthenticationBearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Mock
curl --request GET \
  --url https://api.botsubscription.com/v1/endpoint \
  --header 'Authorization: Bearer sk_live_•••'

Validate Coupon - Check Discount Code Eligibility via API

Check if a coupon code is valid for a specific user and purchase amount before applying it. The response shows whether the coupon is eligible, the calculated discount, and the final price—or the reasons why the coupon cannot be used.

POST/v2/projects/{project_id}/coupons/validate

Authorization

Bearer TokenRequired

Path Parameters

project_idstringrequired

The unique identifier of the project.

Request Body

codestringrequired

The coupon code to validate.

user_idstringrequired

The user ID attempting to use the coupon.

amountnumberrequired

The original amount before discount.

currencystringrequired

The currency of the amount (e.g., USD).

Last updated: