> ## Documentation Index
> Fetch the complete documentation index at: https://wpay-feat-edp-guide.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List payment methods for a buyer

> List all stored payment methods for a customer record.

To list all the vaulted payment methods for a buyer, call the
[`GET /buyers/payment-methods`][api] API with the `buyer_id` and/or
`buyer_external_identifier` as a query parameter.

## List by buyer ID

<CodeGroup>
  ```bash cURL
  curl -i -X GET "https://api.example.gr4vy.app/buyers/payment-methods?buyer_id=fe26475d-ec3e-4884-9553-f7356683f7f9" \
      -H "Authorization: Bearer [JWT_TOKEN]"
  ```

  ```js Node
  const paymentMethods = await client.listBuyerPaymentMethods(
    "fe26475d-ec3e-4884-9553-f7356683f7f9"
  );
  console.log(paymentMethods.body);
  ```
</CodeGroup>

## List by external ID

<CodeGroup>
  ```bash cURL
  curl -i -X GET "https://api.example.gr4vy.app/buyers/payment-methods?buyer_external_identifier=user-1234" \
      -H "Authorization: Bearer [JWT_TOKEN]"
  ```

  ```js Node
  const paymentMethods = await client.listBuyerPaymentMethods(null, "user-1234");
  console.log(paymentMethods.body);
  ```
</CodeGroup>

## Response

The response is a [list of all the previously stored payment methods][api] for
that buyer in a mini format.

```json GET /buyers/payment-methods?buyer_id=fe26475d-ec3e-4884-9553-f7356683f7f9
{
  "items": [
    {
      "type": "payment-method",
      "id": "77a76f7e-d2de-4bbc-ada9-d6a0015e6bd5",
      "method": "card",
      "details": {
        "suffix": "1111",
        "scheme": "visa",
        "expiration_date": "11/25"
      }
    }
  ],
  "limit": 20,
  "next_cursor": null,
  "previous_cursor": null
}
```

[api]: /reference/payment-methods/list-buyer-payment-methods
