Lists the payment methods the site accepts at checkout, each with a hosted logo. Accessible via lynkow.paymentMethods, for a row of logos in a footer or next to the checkout button.

Requires a publishable key: pass publishableKey to createClient(), or every call throws LynkowError UNAUTHORIZED. With cache: true, responses are cached for 5 minutes.

Access via: lynkow.paymentMethods

Methods

1 method

list

TypeScript
list(options?: BaseRequestOptions): Promise<PaymentMethodList>

Lists the payment methods the site accepts for online payment at checkout, card brands first, without pagination. The list does not depend on the locale or on the visitor. It is empty, never an error, when the site does not take online payment.

Parameter

Type

Description

options

BaseRequestOptions

Optional fetchOptions, such as an AbortSignal.

Returns: Promise<PaymentMethodList>

TypeScript
const { data: methods } = await lynkow.paymentMethods.list()

if (methods.length > 0) {
  // Render one logo per method, its name as the alt text.
  for (const method of methods) console.log(method.name, method.logoUrl)
}