verifyCoupon( )


Verifies a ticket coupon.

The verifyCoupon() function returns a Promise that resolves to an VerifyCouponResponse when the ticket coupon has been updated.

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

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

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

Note: To work with the Wix Events API, you need to publish your site.

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>
Was this helpful?
Yes
No