Skip to content

@swapped/connect-sdk / core / PaymentMethods

Interface: PaymentMethods

Defined in: src/modules/payment-methods/payment-methods.module.ts:34

Fetches and filters payment methods for the loaded session.

Available on the client as client.paymentMethods.

Methods

get()

get(filter?): Promise<IntegrationPaymentMethod[]>

Defined in: src/modules/payment-methods/payment-methods.module.ts:60

Return payment methods for the current session, optionally filtered. Methods whose module was omitted from modules are never included.

Parameters

filter?

PaymentMethodFilter

Returns

Promise<IntegrationPaymentMethod[]>


getOne()

getOne(filter?): Promise<IntegrationPaymentMethod | null>

Defined in: src/modules/payment-methods/payment-methods.module.ts:69

Return the first payment method matching the filter, or null.

Prefer this when you expect a single method (for example Cash App).

Parameters

filter?

PaymentMethodFilter

Returns

Promise<IntegrationPaymentMethod | null>


refetch()

refetch(filter?): Promise<IntegrationPaymentMethod[]>

Defined in: src/modules/payment-methods/payment-methods.module.ts:77

Force-refetch payment methods from the API.

Parameters

filter?

PaymentMethodFilter

Returns

Promise<IntegrationPaymentMethod[]>