Booxi allows you to capture payments via shopping cart through your e-commerce platform. If you are using Shopify as your e-commerce platform, see here.
How it works
Whenever your clients book a service via the booking widget, they will be immediately redirected to their shopping cart with the listed service added as an item.
Once paid, you can adjust the booking status to paid, or cancel it if the cart is abandoned.
Advantages
This feature affords you the following advantages:
Because services will be automatically added to the shopping cart, clients can pay for any/all items (e.g. services, products, etc.) at the same time.
You can make use of the payment methods your e-commerce solution already supports such as payment processors, loyalty points, gift cards, promotions, etc.
You do not need to reconcile payments between Booxi and a third-party payment provider since the payments are collected directly in your e-commerce platform.
Setup
Activate the shopping cart setting in your account ("My Business" > Booking Rules).
Enter a functional callback URL (see here for more info).
For each service you want to enable shopping cart payment for, set their online payment method to "Shopping Cart" : go to the "Services" tab > {select a service} > Service Details. Under "Online payment", select "Shopping Cart" and set a fixed amount to be paid.
Enter the appropriate product ID for each service.
*Note: if your service does not yet exist as a product in your e-commerce platform, add it.
We recommend setting your appointment and group reservation approval mode to "Automatic (after online payment completed)" (My Business" > Booking Rules) ; this will ensure that bookings will be approved only AFTER clients successfully provide payment. Once provided, they will receive an appointment confirmation email and/or SMS.
Required development
*IMPORTANT: To make use of the shopping cart feature, you must develop a page (i.e. URL) in your e-commerce platform that adds the booking to your shopping cart. This URL must be able to retrieve the booking_data parameter (a base64 encoded JSON object), decode it and retrieve the information needed to add bookings as an item in your shopping cart; this will require the use of your e-commerce's APIs.
booking_data
If you're using the Booking Widget v2, here is the required information:
apiBookingID
paymentID
productID
Useful link: Test cases
If you're using the Booking Widget v3, here is the required information:
bookingID
onlinePaymentId
productId
Useful link: Booking Widget Implementation Guide (v3)
Currently, the shopping cart integration does not support multi-service booking, since the service ID, service name and service category included in the booking data only reflects the last chosen service.
Using Booxi's endpoints
If you want to automatically mark bookings as paid in Booxi and/or to automatically cancel unpaid bookings, you must use Booxi's API. To do so, you need a partner API key; speak to your Booxi representative to obtain one.
API reference:
If your hosting region is North America
If your hosting region is Europe
Retrieving the onlinePaymentId
Whether you are creating bookings via the widget or via the POST /booking API, you will need the onlinePaymentId to mark a booking as paid. This ID is returned in the booking response under the payment object, provided your service is configured with the Shopping Cart payment type:
"payment": {
"total": "10.00",
"paid": "0.00",
"onlinePaymentId": "P00001234",
"onlinePaymentAmount": "10.00",
"onlinePaymentStatus": "Requested"
}If you are using the booking widget, this ID is also available in the booking_data parameter passed to your shopping cart callback URL. Store this onlinePaymentId — you will need it to update the booking payment status once your client has completed payment on your platform.
Automatically mark bookings as paid in Booxi
Once the client has completed payment on your platform, call PUT /booking/{bookingId}/payment/{paymentId} to set the booking payment status to "Collected". You may also include the amount paid and a reference number to reconcile with your e-commerce transaction.
If your approval mode is set to "Automatic (after online payment completed)", this action will also trigger the approval of the booking and prompt the confirmation message to be sent to the client.
{
"status": "Collected",
"amount": "10.00",
"referenceNumber": "YOUR_REFERENCE_NUMBER"
}Automatically cancel unpaid bookings
To automatically cancel unpaid bookings, you can either:
Activate the "Auto-cancel unpaid booking" setting ("My Business" > Booking Rules). Unpaid bookings will be automatically cancelled if payment is not received within 15 minutes.
Configure a rule in your e-commerce platform to cancel bookings in certain situations (e.g. abandoned cart, expired items, items removed by the client). If the item is removed from the cart or the cart is abandoned, call
PUT /booking/{bookingId}to set the booking status to"Cancelled".
{
"status": "Cancelled"
}
