Payments
Some accounts require online payment for some or all services. This page describes how payment fits into the booking flow at an overview level. The payment endpoints are tightly coupled to the payment providers and to Cliento's own widget, so contact Cliento before you build a custom client for an account that uses online payments.
How payment appears in the flow
Payment requirements show up in the response from confirmation-options:
confirmationMethodisPaymentpaymentAmountIncVatholds the amount to paypaymentProviderslists the available providers:Stripe(card),SwishandKlarnasaleItemsholds the line items behind the amount
The booking is then completed with POST /booking/pay instead of
/booking/confirm. The request body depends on the provider, and each provider
has its own client side steps:
| Provider | Client side steps |
|---|---|
Stripe | Create a payment method with the Stripe SDK, handle 3D Secure challenges |
Swish | The customer approves in the Swish app. Poll POST /booking/{cbUuid}/status until the payment completes |
Klarna | Create a Klarna session with POST /klarna/session and run the Klarna SDK flow |
These flows also require provider configuration on the Cliento side, which is why we ask you to contact us first.
Discount vouchers and gift cards
When allowDiscountVoucher is true in the confirmation options, the customer
may enter a code before paying:
POST /booking/validate-voucherwith{cbUuid, voucherCode}checks if the code is validPOST /booking/voucherwith{cbUuid, voucherCode}applies it to the booking and returns the updated payment details. SendvoucherCodeasnullto remove it