> ## 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.

# getPaymentMethods

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

## Function Signature

```swift theme={null}
public func getPaymentMethods(request: NoahGetPaymentMethodsRequest) async throws -> NoahGetPaymentMethodsResponse
```

A no-argument convenience overload is provided on `NoahProtocol` for calling with default request values:

```swift theme={null}
public func getPaymentMethods() async throws -> NoahGetPaymentMethodsResponse
```

## 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.

All request parameters 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` | `NoahPaymentMethodCapability?` | No       | Filter by what the method can be used for — `.payoutFrom`, `.payinTo`, or `.payoutTo`.                                                                                            |

## Returns

**`NoahGetPaymentMethodsResponse`** — an envelope containing:

| Property   | Type                        | Description                 |
| ---------- | --------------------------- | --------------------------- |
| `data`     | `NoahGetPaymentMethodsData` | The response payload.       |
| `metadata` | `NoahResponseMetadata?`     | Freeform response metadata. |

`NoahGetPaymentMethodsData`:

| Property         | Type                  | Description                                        |
| ---------------- | --------------------- | -------------------------------------------------- |
| `paymentMethods` | `[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

```swift theme={null}
import PortalSwift

do {
  let response = try await portal.ramps.noah.getPaymentMethods(
    request: NoahGetPaymentMethodsRequest(
      pageSize: 10,
      capability: .payoutTo
    )
  )

  for method in response.data.paymentMethods {
    print(method.id, method.paymentMethodCategory, method.displayDetails.last4 ?? "")
  }

  if let next = response.data.pageToken {
    print("Next page token: \(next)")
  }
} catch {
  print("getPaymentMethods failed: \(error)")
}
```

Using the no-argument overload:

```swift theme={null}
let response = try await portal.ramps.noah.getPaymentMethods()
print(response.data.paymentMethods.count)
```

## Errors

| Error                                           | Description                                               |
| ----------------------------------------------- | --------------------------------------------------------- |
| `PortalRequestsError.unauthorized`              | Authentication failed (401).                              |
| `PortalRequestsError.clientError`               | Client error (4xx). An invalid `pageSize` or `pageToken`. |
| `PortalRequestsError.internalServerError`       | Server error (5xx).                                       |
| `PortalRequestsError.couldNotParseHttpResponse` | The response could not be parsed.                         |
| `URLError.badURL`                               | The request URL could not be built.                       |

## Related

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