Skip to main content

Taking payments

Checkout links offer the quickest and simplest way to accept payments from your users.

import { getCheckoutLink } from '@salable/js'

const { checkoutUrl } = await getCheckoutLink({
apiKey: 'your-salable-api-key',
planUuid: 'your-salable-plans-uuid',
successUrl: ''
cancelUrl: '',
granteeId: 'your-grantees-id',
member: 'your-purchasers-id',
// 👇 optional, the shortname of the currency to be used - defaults to
// product-wide default currency.
currency: 'EUR',
// 👇 optional, if you're using per-seat billing - this will be the number of
// seats purchased. Defaults to plans minimum seat count.
quantity: 10,

// Now you are free to present this `checkoutLink` to your user however you see
// fit.
For per-seat plans

On successful payment, the first seat will be assigned to the granteeId provided - the rest will be unassigned.

To assign the rest of the seats, you can update the licenses.