> ## Documentation Index
> Fetch the complete documentation index at: https://dev.moonpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# client.getPaymentMethods()

> List payment methods available for the connected customer.

Use this method to list the customer's available payment methods, plus any cards they have on file. For request and response details, see the [List payment methods API](/api-reference/platform/endpoints/payment-methods/list).

```tsx Get payment methods focus={5-16} theme={null}
import { useMoonPay } from "@moonpay/platform-sdk-react-native";

export function PaymentMethodsList() {
  const { client } = useMoonPay();

  const load = async () => {
    // Call this after the client has an active connection (for example, after
    // `client.getConnection()` returns `status: "active"` or after `client.connect()`
    // completes).
    const result = await client.getPaymentMethods();

    if (!result.ok) {
      // Handle error
      console.error(result.error.code, result.error.message);
      return;
    }

    console.log(result.value.data.paymentMethodConfigs); // Available payment-method configs
    console.log(result.value.data.paymentMethods); // Stored payment methods, such as saved cards (if any)
  };

  // ...
}
```

***

## Result

`client.getPaymentMethods()` returns a `Result<{ data: ListPaymentMethodsResponse }, GetPaymentMethodsError>`.

### Result envelope

`Result<{ data: ListPaymentMethodsResponse }, GetPaymentMethodsError>`

| Field   | Type                                                                      | Required | Description                      |
| ------- | ------------------------------------------------------------------------- | -------- | -------------------------------- |
| `ok`    | `boolean`                                                                 | ✅        | Whether the operation succeeded. |
| `value` | `{ data:` [`ListPaymentMethodsResponse`](#listpaymentmethodsresponse) `}` |          | Present when `ok` is `true`.     |
| `error` | [`GetPaymentMethodsError`](#getpaymentmethodserror)                       |          | Present when `ok` is `false`.    |

### `ListPaymentMethodsResponse`

| Field                  | Type                                              | Required | Description                                                                                                             |
| ---------------------- | ------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| `paymentMethodConfigs` | [`PaymentMethodConfig`](#paymentmethodconfig)`[]` |          | Payment methods (Apple Pay, Google Pay, card, etc.) available to the customer with their capabilities and availability. |
| `paymentMethods`       | [`StoredPaymentMethod`](#storedpaymentmethod)`[]` |          | Payment methods the customer has stored on file, such as saved cards.                                                   |

#### `PaymentMethodConfig`

| Field          | Type                                                      | Required | Description                                                                     |
| -------------- | --------------------------------------------------------- | -------- | ------------------------------------------------------------------------------- |
| `type`         | `PaymentMethodType`                                       | ✅        | The payment method type (for example, `"apple_pay"`, `"google_pay"`, `"card"`). |
| `capabilities` | [`PaymentMethodCapabilities`](#paymentmethodcapabilities) | ✅        | Details about how this payment method can be used.                              |
| `availability` | [`PaymentMethodAvailability`](#paymentmethodavailability) | ✅        | Whether this payment method is available for the current session.               |

#### `PaymentMethodCapabilities`

| Field                       | Type       | Required | Description                                                                                                                 |
| --------------------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| `supportedCurrencies`       | `string[]` | ✅        | A list of [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) fiat currency codes that this payment method can be used with. |
| `supportedTransactionTypes` | `string[]` | ✅        | The kinds of transactions this payment method can be used for.                                                              |
| `allowsDeletion`            | `boolean`  | ✅        | Whether this payment method can be deleted via `client.deletePaymentMethod()`.                                              |
| `requiresWidget`            | `boolean`  | ✅        | Whether this payment method requires the MoonPay widget to complete the payment flow.                                       |

#### `PaymentMethodAvailability`

| Field     | Type       | Required | Description                                                               |
| --------- | ---------- | -------- | ------------------------------------------------------------------------- |
| `active`  | `boolean`  | ✅        | Whether this payment method is available for the current session.         |
| `reasons` | `string[]` |          | If the payment method is unavailable, a list of machine-readable reasons. |

#### `StoredPaymentMethod`

A payment method the customer has stored on file. Use the `id` directly in `client.getQuote()` to quote against a specific stored payment method. Stored cards extend the base shape with card details — see the [API reference](/api-reference/platform/endpoints/payment-methods/list) for the full shape, including network brand, expiry, and `last4`.

| Field  | Type     | Required | Description                                                                                             |
| ------ | -------- | -------- | ------------------------------------------------------------------------------------------------------- |
| `id`   | `string` | ✅        | The stored payment method identifier. Pass this to `getQuote({ paymentMethod: { type: "card", id } })`. |
| `type` | `string` | ✅        | The payment method type, typically `"card"`.                                                            |

### `GetPaymentMethodsError`

`GetPaymentMethodsError` is the standard MoonPay Platform API error shape, `DevPlatformApiError`.

| Field     | Type                          | Required | Description                                                                                                                                                                     |
| --------- | ----------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `code`    | `DevPlatformApiErrorCode`     | ✅        | A machine-readable error code (for example, `"unauthorized"`, `"not_found"`). See the [error reference](/api-reference/platform/documentation/using-the-api) for the full list. |
| `message` | `string`                      | ✅        | A developer-friendly message.                                                                                                                                                   |
| `errors`  | `DevPlatformApiErrorDetail[]` |          | Optional list of field-level errors.                                                                                                                                            |

<Accordion title="TS Definition">
  ```ts types.ts theme={null}
  type ListPaymentMethodsResponse = {
    paymentMethodConfigs?: PaymentMethodConfig[];
    paymentMethods?: StoredPaymentMethod[];
  };

  type StoredPaymentMethod = {
    id: string;
    type: PaymentMethodType;
  };

  type PaymentMethodConfig = {
    type: PaymentMethodType;
    capabilities: PaymentMethodCapabilities;
    availability: PaymentMethodAvailability;
  };

  type PaymentMethodCapabilities = {
    supportedCurrencies: string[];
    supportedTransactionTypes: string[];
    allowsDeletion: boolean;
    requiresWidget: boolean;
  };

  type PaymentMethodAvailability = {
    active: boolean;
    reasons?: string[];
  };

  type GetPaymentMethodsError = {
    code: DevPlatformApiErrorCode;
    message: string;
    errors?: DevPlatformApiErrorDetail[];
  };
  ```
</Accordion>
