The "Create Coupon" API allows you to create a new promotional coupon with customizable parameters such as discount amount, validity period, usage limits, and applicable products. Use this endpoint to
The "Create Coupon" API allows you to create a new promotional coupon with customizable parameters such as discount amount, validity period, usage limits, and applicable products. Use this endpoint to set up promotional offers and special discounts for your customers.
http
POST https://services.leadconnectorhq.com/payments/coupon
Authorization
Name
Type
Required
Example
Description
Authorization
string
Yes
Bearer token generated from the Leadway portal. See Authentication.
Version
string
Yes
2021-07-28
API version.
Body
Name
Type
Required
Example
Description
altId
string
Yes
BQdAwxa0ky1iK2sstLGJ
Account Id
altType
string
Yes
account
Alt Type Possible values: 'account'
name
string
Yes
New Year Sale
Coupon Name
code
string
Yes
LEVELUPDAY2022
Coupon Code
discountType
string
Yes
amount
Discount Type Possible values: 'percentage', 'amount'
discountValue
number
Yes
10
Discount Value
startDate
string
Yes
2023-01-01T22:45:00.000Z
Start date in YYYY-MM-DDTHH:mm:ssZ format
endDate
string
No
2023-01-31T22:45:00.000Z
End date in YYYY-MM-DDTHH:mm:ssZ format
usageLimit
number
No
10
Max number of times coupon can be used
productIds
string[]
No
Product Ids
applyToFuturePayments
boolean
No
True
Is Coupon applicable on upcoming subscription transactions
applyToFuturePaymentsConfig
object
No
If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
limitPerCustomer
boolean
No
True
Limits whether a coupon can be redeemed only once per customer.
Responses
201 - Successful response
_id (string, required): Unique MongoDB identifier for the coupon Example: 67f6c132d9485f9dacd5f123
usageCount (number, required): Number of times the coupon has been used Example: 12
limitPerCustomer (number, required): Maximum number of times a customer can use this coupon (0 for unlimited) Example: 5
altId (string, required): Account Id Example: 79t07PzK8Tvf73d12312
altType (string, required): Type of entity Example: account
name (string, required): Display name of the coupon Example: NEWT6
code (string, required): Redemption code for the coupon Example: NEWT6
discountType (string, required): Type of discount (percentage or amount) Possible values: 'percentage', 'amount' Example: percentage
discountValue (number, required): Value of the discount (percentage or fixed amount) Example: 25
status (string, required): Current status of the coupon Possible values: 'scheduled', 'active', 'expired' Example: scheduled
startDate (string, required): Date when the coupon becomes active Example: 2025-04-30T18:30:00.000Z
endDate (string): End date when the coupon expires Example: 2025-05-30T18:30:00.000Z
applyToFuturePayments (boolean, required): Indicates if the coupon applies to future recurring payments Example: True
applyToFuturePaymentsConfig (object, required): Configuration for how the coupon applies to future payments
userId (string): User ID associated with the coupon (if applicable) Example: q0m15dTLGeiGOXG123123