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

Checkout Booking

Developer Preview

Checkout a booking. When invoking this method the following takes place:

  • The availability of the requested slot/session/schedule is validated.
  • The Booking is charged, by creating a new order in Wix Payment Service, or by redeem the given paid plan.
  • (Can happen asynchronously) On payment complete and according to the request and the current booking's state,
    A new session is created in the calendar, Or a participant is added to the selected session/schedule.
    Note: In case the requested booked session is locked, the session key will be needed in order to Checkout the booking.

Permissions
This endpoint requires the Manage Bookings permission scope.

Authorization

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

POST

https://www.wixapis.com/bookings/v1/bookings/{bookingId}/checkout

Path Params

NAME
TYPE
DESCRIPTION
bookingId
Required

string

The booking identifier to pay.

Body Params

NAME
TYPE
DESCRIPTION
lockedSessionKey

string

optional. The locked session key.

couponCode

string

optional. Coupon code to use. (cannot be used with a paid plan)

notifyParticipants

boolean

A field We pass forward when publishing a booking notification

planSelection

object

Paid plan to use.

Response Object

NAME
TYPE
DESCRIPTION
booking

object

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Checkout Booking

Checks out a booking

Request

curl

Copy Code
1curl -X POST \
2 'http://www.wixapis.com/bookings/v1/bookings/ceea2e96-4b64-48ce-92d6-70e4033cfaaf/checkout' \
3 -H 'Authorization: <AUTH>'
4 --data '{
5 "bookingId": "ceea2e96-4b64-48ce-92d6-70e4033cfaaf",
6 }'

Response

json

1
2{"booking": {
3 "id": "ceea2e96-4b64-48ce-92d6-70e4033cfaaf",
4 "bookedEntity": {
5 "serviceId": "f9969221-88b0-442d-9bfa-b7f0b739b0fc",
6 "scheduleId": "a1239c6f-5984-4e2e-af5d-fa54726c63a5",
7 "singleSession": {
8 "sessionId": "193ZPR9ppP9emJUCLevcLf6orynNEIDt5nc0520xjGQILnPPaF5s62yK3BWz7ExgIRM1U16wP6xWxScBjow6BsCpOlYupqA0QEQ9iVUZQC7LnzPEwgmdkeL2mPMg4UEDj7PK4pWOmHDGvYT1V4YoaQZGKCE7RDgcqiLqLdiiQfitxaB0qCTHkDsdele0v9SX7ceywcLnNV3t1qxRCMaNPvdxWAeLVFm0JndxF1yAU5Bqf6ucyw4sSBvLQVjFEjfZVd3HqkYhTPoPz9Xy7TOGhFKWS7wX905vWYKWWt9L6NSqAocAGzIbRQWNnGpaKlJBnBjwcqGq8axwbt",
9 "start": "2020-04-29T07:00:00Z",
10 "end": "2020-04-29T08:00:00Z"
11 },
12 "title": "Yoga class over Zoom",
13 "location": {"locationType": "OWNER_BUSINESS"},
14 "rate": {
15 "labeledPriceOptions": {"general": {
16 "amount": "14",
17 "currency": "USD",
18 "downPayAmount": "0"
19 }},
20 "priceText": ""
21 },
22 "tags": ["GROUP"]
23 },
24 "bookedResources": [ {
25 "id": "936d2078-79ba-49ca-b82d-8f12b8a050ac",
26 "name": "Dorgal",
27 "email": "dorga@wix.com"
28 }],
29 "formInfo": {
30 "contactDetails": {
31 "contactId": "b9388c66-29c3-4719-997c-7440c5530e4b",
32 "firstName": "Homer",
33 "lastName": "Simpson",
34 "email": "Doh@Doh.com",
35 "phone": "5558707",
36 "timeZone": "Asia/Jerusalem",
37 "countryCode": "IL"
38 },
39 "paymentSelection": [ {
40 "rateLabel": "general",
41 "numberOfParticipants": 1
42 }]
43 },
44 "paymentDetails": {
45 "balance": {
46 "finalPrice": {
47 "amount": "14",
48 "currency": "USD",
49 "downPayAmount": "0"
50 },
51 "amountReceived": "0"
52 },
53 "state": "READY"
54 },
55 "status": "CONFIRMED",
56 "created": "2020-04-28T09:02:13.592Z"
57}}