@qonto/embed-sdk / paymentLinks

Variable: paymentLinks

const paymentLinks: object

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:
    • items: An array of items to be included in the payment link. Each item must conform to the Item type and will be validated.
    • redirectUrl: The URL to which the user will be redirected after completing the payment link flow. This will be validated for correctness.
  • operationSettings (optional): An object containing:
    • accessToken: The authentication token. If not provided, the function requires that authentication has already been initialized.

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: {
    items: [{ id: '1', title: 'Item 1', type: 'product', quantity: 1, measureUnit: 'unit', unitPrice: { currency: 'EUR', value: 10 }, vatRate: '20' }],
    redirectUrl: 'https://www.example.com',
  },
  operationSettings: {
    accessToken: 'your-access-token',
  },
});

Throws

If the provided items array or redirectUrl is invalid.

Throws

If the access token is missing or invalid, and initialize has not been called.

Remarks

Ensure initialize has been called before calling this function if you do not provide an accessToken.