Skip to main content

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

ParameterType
sessionSession
idstring | number
discountCodestring

Returns

Promise<Charge>