Integrate booxi with your e-commerce Shopping Cart

Product Features    |   Oct 02, 2020

 

You can now capture online payment for appointment booking using your eCom site. The advantage is that you can use the payment methods your eCom already supports, such as payment processors, loyalty points, gift cards, promotions, etc. 

This article lists what you can do, explains how to configure booxi for the integration, and which API to use to complete the integration.

What you can do:

  • Offer services that have matching eCom products, and allow customers to book those services. They can then pay using your eCom shopping cart. Once paid, you can adjust the booking status to paid, or cancel it if the cart is abandoned.
  • Use your eCom site to list parts and add them in a shopping cart at the same time as you add the service. Customers can then book an appointment for the repair and pay for the part and service in advance using your shopping cart.

How to Implement the shopping cart option

1.Log in in your booxi account and go to the My Business section. Click on Booking Rules.

2.Enable the Online Payment via Shopping Cart (scroll down toward the end of the settings list). This will allow you to set a product ID for each service set to be paid online using your shopping cart.

 a) You must provide a callback URL which will be called with the booking data  (which will contain the product ID) to allow you to add a line to your shopping cart.

 b) Click on Save.

3. Go to the Services section, select a service and click on Details. Scroll down to the online payment option, then select the method Shopping Cart and set a fixed amount to be paid.

a) You can provide a product ID that you will use to add the associated product to your shopping cart.

b) Remember to click on Save.

4.You can customize your Cancellation Policy Text to inform the user that a payment is required and that payment will have to be completed in the shopping cart. If not, booxi will provide a similar text by default.

5.It is recommended to set your Approval Mode to delay the confirmation message once the payment is  completed. If not, your customer may receive a confirmation followed by a cancellation message if the booking is     not completed in time.

a) Go back to My Business, go to Booking Rules and scroll down to Reservation Approval Modes. Set it to Automatic (after online payment completed).

In the event that the shopping cart payment was never completed, you can: 

A) ensure your eCOM cancels the booking, or B) set booxi to Auto-Cancel the booking within 15 minutes.

6.Make sure the callback URL you provided can retrieve the booking_data parameter (a base64 encoded JSON object), decode it and retrieve the information you need (the booking ID, payment ID and the product ID) to add that booking as a product in your shopping cart.

7.Once checkout is complete and paid, make sure to call the booxi API with the booking ID and payment ID to mark the booking as paid (Collected). This  will automatically approve the booking and send the customer’s confirmation.

8.If the item is removed from the cart or the cart is abandoned, you should call the booxi API with the booking ID to cancel that booking.

API to Use

The eCOM page that adds the booking to your shopping cart must be developed by you and also using your eCOM’s API. However, in order to mark a booking as paid and track payments in booxi, or to cancel a booking that was not paid, you must use booxi’s API.

  • You will need to decode the booking data (base64 encoded JSON object – see booking data below)
    • Use apiBookingId, productId, and paymentId
  • You will need to use your booxi partner API key to use this API.
    • This is a different API key from the one provided in your booxi account, so please contact us to get this key.
  • You will need to use this API at the server level.
  • Use PUT /booking/{bookingId}/payment/{paymentId}, providing status=Collected, and optionally the amount paid and a reference number (to consolidate with your eCOM transaction).
  • Use PUT /booking/{bookingId}, providing status=Cancelled to cancel the booking if it was not paid.

API documentation:

booking_data:

                

 

 

Nastassia Steavu
Nastassia Steavu
Let Your Business Thrive with Agile Marketing
Business Tips   |   Oct 13, 2020
Remote Retail
Business Tips   |   Sep 21, 2020
Ready to grow your business?
14 day free trial|No credit card required
Get Started