Search.../

getCheckoutOptions( )

Developer Preview

Returns checkout meta data used in checkout UX.

Note: This function is restricted and only runs if you elevate permissions using the wix-auth.elevate() function.

Syntax

function getCheckoutOptions(): Promise<GetCheckoutOptionsResponse>

getCheckoutOptions Parameters

This function does not take any parameters.

Returns

Return Type:

Promise<
GetCheckoutOptionsResponse
>
NAME
TYPE
DESCRIPTION
acceptCoupons
boolean

Whether coupons are accepted at checkout.

paidTickets
boolean

Whether there are any paid tickets available for sale.

paymentMethodConfigured
boolean

Whether any payment method is configured and available for payment.

premiumServices
boolean

Whether premium services are enabled. Enabled for free if site does not sell any paid tickets. Selling tickets for a fee requires a premium feature "events_sell_tickets".

Was this helpful?

getCheckoutOptions example

Copy Code
1import { checkout } from 'wix-events.v2';
2
3 async function getCheckoutOptions() {
4 try {
5 const result = await checkout.getCheckoutOptions();
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13