Function: applyDiscountToCharge()
applyDiscountToCharge(
session,id,discountCode):Promise<Charge>
You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one. If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.
Parameters
| Parameter | Type |
|---|---|
session | Session |
id | string | number |
discountCode | string |
Returns
Promise<Charge>