Skip to main content

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:

  • confirmationMethod is Payment
  • paymentAmountIncVat holds the amount to pay
  • paymentProviders lists the available providers: Stripe (card), Swish and Klarna
  • saleItems holds 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:

ProviderClient side steps
StripeCreate a payment method with the Stripe SDK, handle 3D Secure challenges
SwishThe customer approves in the Swish app. Poll POST /booking/{cbUuid}/status until the payment completes
KlarnaCreate 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-voucher with {cbUuid, voucherCode} checks if the code is valid
  • POST /booking/voucher with {cbUuid, voucherCode} applies it to the booking and returns the updated payment details. Send voucherCode as null to remove it