# Billing

# Payment Gateway

Payment Gateways can be enabled and configured through the back office and then used to for carts checkouts or recurring payments. They can be retrieved through billing.paymentGateways.

# Cart Checkout

To checkout a cart, you will have to supply a CheckoutProcess and PaymentGateway when required. The user also needs to have an account and be authenticated, if an AnonymousSession was used to fill the Cart, you should signup or signin to transfer the cart to an account (see Authentication).

# Checkout Process

Depending on the cart's content, different CheckoutProcess (a way to pay for the cart) can be available.

CheckoutProcess Gateway Managed Description
FREE None Yes Nothing to pay and no recurring payments.
URL Any Yes Payment made through a provided url for any gateway.
PAYMENT_INTENT Stripe No Generates a PaymentIntent usable in your custom payment process. The order will be acknowledged with a webhook.
PAYMENT_AUTHORIZATION Stripe No Supply a payment method token to authorize recurring payments.

Valid CheckoutProcesses can be retrieved through cart.availableCheckoutProcesses.

TIP

By default, you can use CheckoutProcess.URL if available, since it works with any PaymentGateway.

# CheckoutProcess.FREE

In this process there is nothing to pay, the checkout is directly validated.

# CheckoutProcess.URL

In this process, an URL for the supplied paymentGateway will be generated to pay for the cart. When the user ends the process, a webhook from the PaymentGateway is received and the order is validated on the server-side.

# CheckoutProcess.PAYMENT_INTENT

Limitation

Currently Stripe only.

If you want to implement your own custom process (using the SDK of a PaymentGateway), you can request for a PaymentIntent object that you can fulfill through your implementation and will trigger the validation using a webhook from the PaymentGateway on the server side.

# CheckoutProcess.PAYMENT_AUTHORIZATION

Limitation

Currently Stripe only.

Provide a payment method token to authorize recurring payments. This is mostly used when you want to create a custom payment process and have to manipulate credit card tokens on your own.