The "Update Coupon" API enables you to modify existing coupon details such as discount values, validity periods, usage limits, and other promotional parameters. Use this endpoint to adjust or extend promotional offers for your customers.

http
PUT https://services.leadconnectorhq.com/payments/coupon

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Body

NameTypeRequiredExampleDescription
altIdstringYesBQdAwxa0ky1iK2sstLGJAccount Id
altTypestringYesaccountAlt Type Possible values: 'account'
namestringYesNew Year SaleCoupon Name
codestringYesLEVELUPDAY2022Coupon Code
discountTypestringYesamountDiscount Type Possible values: 'percentage', 'amount'
discountValuenumberYes10Discount Value
startDatestringYes2023-01-01T22:45:00.000ZStart date in YYYY-MM-DDTHH:mm:ssZ format
endDatestringNo2023-01-31T22:45:00.000ZEnd date in YYYY-MM-DDTHH:mm:ssZ format
usageLimitnumberNo10Max number of times coupon can be used
productIdsstring[]NoProduct Ids
applyToFuturePaymentsbooleanNoTrueIs Coupon applicable on upcoming subscription transactions
applyToFuturePaymentsConfigobjectNoIf coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
limitPerCustomerbooleanNoTrueLimits whether a coupon can be redeemed only once per customer.
idstringYes6241712be68f7a98102ba272Coupon Id

Responses

200 - 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

  • 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

json
{
  "_id": "67f6c132d9485f9dacd5f123",
  "usageCount": 12,
  "limitPerCustomer": 5,
  "altId": "79t07PzK8Tvf73d12312",
  "altType": "account",
  "name": "NEWT6",
  "code": "NEWT6",
  "discountType": "percentage",
  "discountValue": 25,
  "status": "scheduled",
  "startDate": "2025-04-30T18:30:00.000Z",
  "endDate": "2025-05-30T18:30:00.000Z",
  "applyToFuturePayments": true,
  "userId": "q0m15dTLGeiGOXG123123",
  "createdAt": "2025-04-09T18:49:22.026Z",
  "updatedAt": "2025-04-09T18:49:22.026Z",
  "traceId": "c667b18d-8f5e-44cf-a914"
}
422 - Unprocessable Entity
json
{}

Example

curl -X PUT 'https://services.leadconnectorhq.com/payments/coupon' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "altId": "BQdAwxa0ky1iK2sstLGJ",
  "altType": "account",
  "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": "6241712be68f7a98102ba272"
}'

Last updated October 26, 2026

Was this page helpful?