Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Checkout Options

Developer Preview

Calculates checkout options available to book and check out the given session/schedule.

Permissions
This endpoint requires the Read Bookings - Public Data, Read Bookings - Including Participants or Manage Bookings permission scope.
To calculate the Wix Paid Plans available for a site member using the contactId field, the Manage Bookings permission scope is required.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

POST

https://www.wixapis.com/bookings/v1/checkout/checkoutOptions

Body Params

NAME
TYPE
DESCRIPTION
couponCode

string

Coupon to apply to price calculations. An error will be thrown if given coupon is invalid.

contactId

string

Member ID for which paid plans will be accessed.

paymentSelection

object

Selected rate label (optional) to be used, and number of participants.

ONE OF:
createSession

object

A session that will be created for this booking. schedule_id, schedule_owner_id, start, and rate are used to calculate the checkout options. Start is used to access the relevant paid plans.

scheduleId

string

Existing schedule ID. Will be used to access service properties including payment options, rate, and first session start time that will be used to access relevant plans.

sessionId

string

Existing session ID.

Response Object

NAME
TYPE
DESCRIPTION
checkoutOptions

object

Checkout options.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Checkout Options for a schedule

Returns the checkout options for the given schedule id.

Request

curl

Copy Code
1curl -X POST \
2 'http://www.wixapis.com/bookings/v1/checkout/checkoutOptions' \
3 -H "Content-Type: application/json" \
4 -H 'Authorization: <AUTH>' \
5 --data '{
6 "paymentSelection": {
7 "numberOfParticipants": 1,
8 "rateLabel": "general"
9 },
10 "createSession": {
11 "rate": {
12 "labeledPriceOptions": {
13 "general": {
14 "downPayAmount": "0",
15 "currency": "USD",
16 "amount": "40"
17 }
18 }
19 },
20 "scheduleOwnerId": "64325419-f22c-4e55-9a63-692a500f8343",
21 "scheduleId": "95bbd03f-82b9-4ae8-a7b5-3c901f79e93c",
22 "end": {
23 "timestamp": "2020-05-05T13:00:00.000+03:00"
24 },
25 "title": "Corona Vaccines",
26 "start": {
27 "timestamp": "2020-05-05T12:00:00.000+03:00"
28 }
29 }
30 }'

Response

json

1
2{"checkoutOptions": {
3 "payments": {
4 "finalPrice": {
5 "amount": "20.0",
6 "currency": "USD",
7 "downPayAmount": "0.0"
8 },
9 "couponDetails": {
10 "couponName": "DISCOUNT2020",
11 "couponCode": "DISCOUNT2020",
12 "couponDiscount": "20.0",
13 "couponId": "babaf846-b923-4d61-84c7-d3ba145d06f0"
14 },
15 "paymentOptions": {
16 "wixPayOnline": true,
17 "wixPayInPerson": false
18 }
19 },
20 "paidPlans": {"plans": []}
21}}
Checkout Options for a session
Checkout Options for a session