Skip to main content
All CollectionsEnterpriseOthers
Capture payment via shopping cart with your e-commerce website
Capture payment via shopping cart with your e-commerce website
Updated over a month ago

Booxi allows you to capture payments via shopping cart through your e-commerce platform. If you are using Shopify, 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

  1. Activate the shopping cart setting in your account ("My Business" > Booking Rules).

  2. Enter a functional callback URL (see here for more info).

  3. 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.

  4. Enter the appropriate product ID for each service.

    1. *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:

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) - section ”Retrieving Booking Data“

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. The Partner API key must only be used in server side (backend) code to keep it a secret.

API reference:

Automatically mark bookings as paid in Booxi

To automatically mark bookings as paid in Booxi, call the Booxi API to set the payment status of a booking to "Collected"; use the PUT /booking/{bookingId}/payment/{paymentId} endpoint to do so. You may also add the amount paid and a reference number to consolidate with your eCommerce transaction.

If your approval mode is set to "Automatic (after online payment completed), this action will cause the approval of the booking and prompt the appointment confirmation 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:

  1. Setup automatic cancellation of unpaid bookings. Activate the "Auto-cancel unpaid booking" setting ("My Business" > Booking Rules); unpaid bookings will be cancelled if not paid within 15 minutes.

  2. Configure a rule in your e-commerce platform, to cancel certain bookings (e.g. expired items, items removed by the client, abandoned cart, etc.). If the item is removed from the cart or the cart is abandoned, call the Booxi API to set the status of a booking to "Cancelled"; use the PUT /booking/{bookingId} endpoint to do so.

{
"status": "Cancelled",
}
Did this answer your question?