listPaymentMethods method

Future<List<PaymentMethod>> listPaymentMethods()

Lists all payment methods for the authenticated user.

This endpoint retrieves all payment methods (currently cards) that have been saved by the user through the payment provider. Each payment method includes details such as card brand, last 4 digits, expiry date, etc.

Returns a list of PaymentMethod objects, which may be empty if no payment methods have been set up.

Throws NotFoundException if the user is not found or has no payment customer.

Implementation

_i2.Future<List<_i17.PaymentMethod>> listPaymentMethods() =>
    caller.callServerEndpoint<List<_i17.PaymentMethod>>(
      'billing',
      'listPaymentMethods',
      {},
    );