Skip to main content
PUT
/
payments
/
coupon
Update Coupon
curl --request PUT \
  --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",
  "id": "6241712be68f7a98102ba272",
  "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"
}

Authorizations

Authorization
string
header
required

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.

Headers

Version
enum<string>
required

API Version

Available options:
2021-07-28

Body

application/json
altId
string
required

Location Id

Example:

"BQdAwxa0ky1iK2sstLGJ"

altType
enum<string>
required

Alt Type

Available options:
location
Example:

"location"

name
string
required

Coupon Name

Example:

"New Year Sale"

code
string
required

Coupon Code

Example:

"LEVELUPDAY2022"

discountType
enum<string>
required

Discount Type

Available options:
percentage,
amount
Example:

"amount"

discountValue
number
required

Discount Value

Example:

10

startDate
string
required

Start date in YYYY-MM-DDTHH:mm:ssZ format

Example:

"2023-01-01T22:45:00.000Z"

id
string
required

Coupon Id

Example:

"6241712be68f7a98102ba272"

endDate
string

End date in YYYY-MM-DDTHH:mm:ssZ format

Example:

"2023-01-31T22:45:00.000Z"

usageLimit
number

Max number of times coupon can be used

Example:

10

productIds
string[]

Product Ids

Example:
["6241712be68f7a98102ba272"]
applyToFuturePayments
boolean
default:true

Is Coupon applicable on upcoming subscription transactions

Example:

true

applyToFuturePaymentsConfig
object

If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription

Example:
[
{
"type": "fixed",
"duration": 5,
"durationType": "months"
},
{ "type": "forever" }
]
limitPerCustomer
boolean
default:false

Limits whether a coupon can be redeemed only once per customer.

Example:

true

Response

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

Location Id

Example:

"79t07PzK8Tvf73d12312"

altType
string
required

Type of entity

Example:

"location"

name
string
required

Display name of the coupon

Example:

"NEWT6"

code
string
required

Redemption code for the coupon

Example:

"NEWT6"

discountType
enum<string>
required

Type of discount (percentage or amount)

Available options:
percentage,
amount
Example:

"percentage"

discountValue
number
required

Value of the discount (percentage or fixed amount)

Example:

25

status
enum<string>
required

Current status of the coupon

Available options:
scheduled,
active,
expired
Example:

"scheduled"

startDate
string
required

Date when the coupon becomes active

Example:

"2025-04-30T18:30:00.000Z"

applyToFuturePayments
boolean
required

Indicates if the coupon applies to future recurring payments

Example:

true

applyToFuturePaymentsConfig
object
required
createdAt
string
required

Creation timestamp

Example:

"2025-04-09T18:49:22.026Z"

updatedAt
string
required

Last update timestamp

Example:

"2025-04-09T18:49:22.026Z"

traceId
string
required

Unique identifier for tracing this API request

Example:

"c667b18d-8f5e-44cf-a914"

endDate
string

End date when the coupon expires

Example:

"2025-05-30T18:30:00.000Z"

userId
string

User ID associated with the coupon (if applicable)

Example:

"q0m15dTLGeiGOXG123123"

Last modified on March 4, 2026