curl --request POST \
--url https://services.leadconnectorhq.com/payments/coupon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"altId": "BQdAwxa0ky1iK2sstLGJ",
"altType": "location",
"name": "New Year Sale",
"code": "LEVELUPDAY2022",
"discountType": "amount",
"discountValue": 10,
"startDate": "2023-01-01T22:45:00.000Z",
"endDate": "2023-01-31T22:45:00.000Z",
"usageLimit": 10,
"productIds": [
"6241712be68f7a98102ba272"
],
"applyToFuturePayments": true,
"applyToFuturePaymentsConfig": [
{
"type": "fixed",
"duration": 5,
"durationType": "months"
},
{
"type": "forever"
}
],
"limitPerCustomer": true
}
'{
"_id": "67f6c132d9485f9dacd5f123",
"usageCount": 12,
"limitPerCustomer": 5,
"altId": "79t07PzK8Tvf73d12312",
"altType": "location",
"name": "NEWT6",
"code": "NEWT6",
"discountType": "percentage",
"discountValue": 25,
"status": "scheduled",
"startDate": "2025-04-30T18:30:00.000Z",
"applyToFuturePayments": true,
"applyToFuturePaymentsConfig": {
"type": "fixed",
"duration": 3,
"durationType": "months"
},
"createdAt": "2025-04-09T18:49:22.026Z",
"updatedAt": "2025-04-09T18:49:22.026Z",
"traceId": "c667b18d-8f5e-44cf-a914",
"endDate": "2025-05-30T18:30:00.000Z",
"userId": "q0m15dTLGeiGOXG123123"
}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.
curl --request POST \
--url https://services.leadconnectorhq.com/payments/coupon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"altId": "BQdAwxa0ky1iK2sstLGJ",
"altType": "location",
"name": "New Year Sale",
"code": "LEVELUPDAY2022",
"discountType": "amount",
"discountValue": 10,
"startDate": "2023-01-01T22:45:00.000Z",
"endDate": "2023-01-31T22:45:00.000Z",
"usageLimit": 10,
"productIds": [
"6241712be68f7a98102ba272"
],
"applyToFuturePayments": true,
"applyToFuturePaymentsConfig": [
{
"type": "fixed",
"duration": 5,
"durationType": "months"
},
{
"type": "forever"
}
],
"limitPerCustomer": true
}
'{
"_id": "67f6c132d9485f9dacd5f123",
"usageCount": 12,
"limitPerCustomer": 5,
"altId": "79t07PzK8Tvf73d12312",
"altType": "location",
"name": "NEWT6",
"code": "NEWT6",
"discountType": "percentage",
"discountValue": 25,
"status": "scheduled",
"startDate": "2025-04-30T18:30:00.000Z",
"applyToFuturePayments": true,
"applyToFuturePaymentsConfig": {
"type": "fixed",
"duration": 3,
"durationType": "months"
},
"createdAt": "2025-04-09T18:49:22.026Z",
"updatedAt": "2025-04-09T18:49:22.026Z",
"traceId": "c667b18d-8f5e-44cf-a914",
"endDate": "2025-05-30T18:30:00.000Z",
"userId": "q0m15dTLGeiGOXG123123"
}Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
API Version
2021-07-28 Location Id
"BQdAwxa0ky1iK2sstLGJ"
Alt Type
location "location"
Coupon Name
"New Year Sale"
Coupon Code
"LEVELUPDAY2022"
Discount Type
percentage, amount "amount"
Discount Value
10
Start date in YYYY-MM-DDTHH:mm:ssZ format
"2023-01-01T22:45:00.000Z"
End date in YYYY-MM-DDTHH:mm:ssZ format
"2023-01-31T22:45:00.000Z"
Max number of times coupon can be used
10
Product Ids
["6241712be68f7a98102ba272"]Is Coupon applicable on upcoming subscription transactions
true
If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
Show child attributes
[
{
"type": "fixed",
"duration": 5,
"durationType": "months"
},
{ "type": "forever" }
]Limits whether a coupon can be redeemed only once per customer.
true
Successful response
Unique MongoDB identifier for the coupon
"67f6c132d9485f9dacd5f123"
Number of times the coupon has been used
12
Maximum number of times a customer can use this coupon (0 for unlimited)
5
Location Id
"79t07PzK8Tvf73d12312"
Type of entity
"location"
Display name of the coupon
"NEWT6"
Redemption code for the coupon
"NEWT6"
Type of discount (percentage or amount)
percentage, amount "percentage"
Value of the discount (percentage or fixed amount)
25
Current status of the coupon
scheduled, active, expired "scheduled"
Date when the coupon becomes active
"2025-04-30T18:30:00.000Z"
Indicates if the coupon applies to future recurring payments
true
Show child attributes
Creation timestamp
"2025-04-09T18:49:22.026Z"
Last update timestamp
"2025-04-09T18:49:22.026Z"
Unique identifier for tracing this API request
"c667b18d-8f5e-44cf-a914"
End date when the coupon expires
"2025-05-30T18:30:00.000Z"
User ID associated with the coupon (if applicable)
"q0m15dTLGeiGOXG123123"
Was this page helpful?