Zum Hauptinhalt springen

Checkout

The checkout is the process where the user can buy a subscription or a product.

Checkout cart

Create a cart

The checkout cart can be created by using the API, see Create product cart.

Generate a checkout URL

The checkout URL can be generated by calling the generateCartLink method of the CartProductService class:

<?php

use Fynn\Sdk\V1\Checkout\CartProductService;

$cartProductService = new CartProductService($client);

[...]

$checkoutUrl = $cartProductService->generateCartLink($createCartResponse, 'tenant-username');

The checkout URL can be used to redirect the user to the checkout process. After the checkout process is completed, the subscription will be created and the user will be redirected to the success page, which is configured in the administration Configuration.

Use custom checkout-flow

Instead of using the checkout URL, you can also use the checkout flow in your own application, paired with our Fynn.JS SDK.

See Checkout flow for more information.