@qonto/embed-sdk / paymentLinks

Variable: paymentLinks

const paymentLinks: object = paymentLinksNamespace.paymentLinks
The paymentLinks namespace contains all the functions related to paymentLinks operations such as starting the payment link creation flow. It can be accessed like this:
import { paymentLinks } from '@qonto/embed-sdk/paymentLinks';
const url = paymentLinks.getPaymentLinkCreationFlowUrl({accessToken, items, redirectUrl});
window.open(url, '_blank');

Type declaration

getPaymentLinkCreationFlowUrl()

getPaymentLinkCreationFlowUrl: (params) => string
Generates the URL for initiating a payment link creation flow with specified items.

Parameters

params
PaymentLinkParams<CreatePaymentLinkSettings> An object containing:
  • paymentLinkSettings: An object containing:
    • authUrl: The embed auth link retrieved from the Qonto API. Must be a valid URL.
    • items: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.

Returns

string The full URL as a string, which can be used to launch the payment link creation flow in an iframe or browser.

Example

const url = getPaymentLinkCreationFlowUrl({
  paymentLinkSettings: {
    authUrl: 'https://embed.qonto.co/embed-auth-link/:uuid',
    items: [{ id: '1', title: 'Item 1', type: 'product', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: 10 }, vatRate: '20' }],
  }
});

Throws

InvalidParametersError If the provided authUrl or items array is invalid.