verifyCoupon( )


Verifies a ticket coupon.

If the coupon has been verified, the VerifyCouponResponse contains an invoice property with an invoice that includes the coupon discounts.

If the coupon fails verification, the VerifyCouponResponse contains a discountErrors property including information about why the verification failed.

You may want to call verifyCoupon() in an input element's onCustomValidation() to validate a coupon code while the form is being filled out.

Note: The frontend Events APIs aren't functional when previewing a site. View a published version of a site to see their complete functionality

Method Declaration
Copy
Method Parameters
eventIdstringRequired

ID of the event that the ticket coupon is for.


reservationIdstringRequired

ID of the reservation that the ticket coupon is for.


couponstringRequired

Code of the coupon to verify.

Returns
Return Type:Promise<VerifyCouponResponse>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?