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

# ramps.noah.getPaymentMethods

> List the stored Noah payment methods for the current customer.

## Function Signature

```dart theme={null}
Future<NoahGetPaymentMethodsResponse> getPaymentMethods({
  NoahGetPaymentMethodsRequest? request,
})
```

## Description

Returns the payment methods available to the current customer — cards, bank rails, or identifier-based rails — with a pagination token when more results exist.

`request` and all of its fields are optional. Omitting them lets the server fall back to its own defaults.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `request.pageSize` | `int?` | No | Maximum number of payment methods to return. Must be an integer between 1 and 100 — validated server-side, and out-of-range values are rejected with a `400` rather than clamped. |
| `request.pageToken` | `String?` | No | Cursor from a previous response's `data.pageToken`. |
| `request.capability` | `String?` | No | Filter by what the method can be used for — a `NoahPaymentMethodCapability` value: `payoutFrom.value`, `payinTo.value`, or `payoutTo.value`. |

## Returns

**`NoahGetPaymentMethodsResponse`** - An envelope containing:

| Property | Type | Description |
| - | - | - |
| `data` | `NoahGetPaymentMethodsData` | The response payload. |
| `metadataJson` | `String?` | JSON-encoded response metadata. Read it decoded through the `metadata` getter. |

`NoahGetPaymentMethodsData`:

| Property | Type | Description |
| - | - | - |
| `paymentMethods` | `List<NoahPaymentMethod?>` | The customer's stored payment methods. |
| `pageToken` | `String?` | Cursor for the next page, when more results exist. |

`NoahPaymentMethod`:

| Property | Type | Description |
| - | - | - |
| `id` | `String` | Payment method identifier. |
| `paymentMethodCategory` | `String` | Broad grouping such as `Bank`, `Card`, or `Identifier`. |
| `country` | `String` | ISO country code. |
| `displayDetails` | `NoahPaymentMethodDisplayDetails` | Display fields: `type`, plus optional `accountNumber`, `bankCode`, `bankAddress`, `last4`, `scheme`, `identifierType`, `identifier`. |
| `customerId` | `String?` | Owning Noah customer id. |
| `capabilities` | `NoahPaymentMethodCapabilities?` | Flags — `payoutFrom`, `payinTo`, `payoutTo`, all `bool`. |
| `accountHolderDetails` | `NoahAccountHolderDetails?` | Holder's structured `name` (`firstName`, `lastName`, optional `middleName`). |
| `issuerDetails` | `NoahIssuerDetails?` | Issuer's optional `name`. |

## Example

```dart theme={null}
import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

try {
  final response = await portal.ramps.noah.getPaymentMethods(
    request: NoahGetPaymentMethodsRequest(
      pageSize: 10,
      capability: NoahPaymentMethodCapability.payoutTo.value,
    ),
  );

  for (final method in response.data.paymentMethods.whereType<NoahPaymentMethod>()) {
    print('${method.id} ${method.paymentMethodCategory} ${method.displayDetails.last4 ?? ''}');
  }

  final next = response.data.pageToken;
  if (next != null) {
    print('Next page token: $next');
  }
} on PortalException catch (e) {
  print('getPaymentMethods failed: [${e.code}] ${e.message}');
}
```

Using server-side defaults:

```dart theme={null}
final response = await portal.ramps.noah.getPaymentMethods();
print(response.data.paymentMethods.length);
```

## Errors

| Code | Description |
| - | - |
| `NOT_INITIALIZED` | Portal was not initialized |
| `NOAH_GET_PAYMENT_METHODS_ERROR` | Failed to get payment methods — for example an invalid `pageSize` or `pageToken` |

## Related

* [Noah virtual accounts and payouts guide](../guide/noah)
* [ramps.noah.getPayoutChannels](./noah-getpayoutchannels)
* [Noah payouts workflow](/integrations/On-Off-Ramp/noah-payouts)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.