> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.recurrente.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.recurrente.com/_mcp/server.

# Listar los métodos de pago de un cliente

GET https://app.recurrente.com/api/payment_methods

La misma lista que `GET /customers/{customer_id}/payment_methods`, con el
cliente como parámetro. `customer_id` es obligatorio.

Reference: https://docs.recurrente.com/referencia-api/api-reference/payment-methods/list-payment-methods

## Authentication

- `X-SECRET-KEY` header (required) — Tu clave secreta de API. Una llave de cuenta (`sk_live_...`, `sk_test_...`) opera sobre su propia cuenta y, con `X-ACCOUNT-ID`, sobre sus cuentas conectadas. La llave también fija el ambiente: una `sk_test_` solo lista y resuelve objetos de prueba (`live_mode: false`) y una `sk_live_` solo objetos reales. Un ID del otro ambiente responde `404` (`401` en `/customers`). Una llave de organización (`sk_org_live_...`, `sk_org_test_...`) alcanza todas las cuentas de una organización y solo sirve para leer: saldos, movimientos y reportes. Para operar sobre una cuenta debe nombrarla con `X-ACCOUNT-ID`; omitirlo en una lectura devuelve todas las cuentas de la organización. Cualquier otro endpoint responde `403` con `code: organization_key_unsupported`.

## Request

### Query parameters

- `customer_id` (string, required)
- `type` (enum, optional) — Solo los métodos de este tipo. `card` incluye las tarjetas en Apple Pay. Hoy los métodos que se guardan son tarjetas; los demás tipos responden una lista vacía.
  - Allowed values: `card`, `bank_account`, `bank_transfer_receiver`, `crypto_address`
- `limit` (integer, optional, default: 10) — Elementos por página (igual que `items`).
- `items` (integer, optional, default: 10) — Elementos por página.
- `page` (integer, optional, default: 1) — Página a devolver. La respuesta trae los encabezados `link`, `current-page`, `total-pages` y `total-count`.

## Response

### 200

Los métodos de pago guardados del cliente

- `list of PaymentMethod`

## Errors

### 400 Bad Request Error

Falta `customer_id`, o `type` no es uno de los tipos que acepta

- `message` (string, optional) — Mensaje de error
- `code` (string, optional) — Código estable legible por máquinas, cuando aplica
- `refund_id` (string, optional) — ID del reembolso relacionado cuando aplica
- `endpoint` (string, optional) — Acción de API rechazada, cuando aplica
- `errors` (ErrorErrors, optional) — Detalles de errores por campo

### 404 Not Found Error

El cliente no existe en esta cuenta

- `message` (string, optional) — Mensaje de error
- `code` (string, optional) — Código estable legible por máquinas, cuando aplica
- `refund_id` (string, optional) — ID del reembolso relacionado cuando aplica
- `endpoint` (string, optional) — Acción de API rechazada, cuando aplica
- `errors` (ErrorErrors, optional) — Detalles de errores por campo

## Types

### PaymentMethod

Un método de pago guardado en un cliente de tu cuenta. Su `id` es el `payment_method_id` con el que cobras: envíalo a `POST /one_time_payments` junto con `customer_id` para que el cobro quede en ese cliente. Una tarjeta en Apple Pay (`card.wallet: apple_pay`) se guarda de nuevo en cada pago, así que la misma tarjeta puede aparecer varias veces.

- `id` (string, required)
- `object` (enum, required)
  - Allowed values: `payment_method`
- `type` (enum, required) — Tipo de método. Trae un objeto con el mismo nombre con sus detalles.
  - Allowed values: `card`, `bank_account`, `bank_transfer_receiver`, `crypto_address`
- `customer_id` (string, required) — ID del cliente en el que está guardado. Si se guardó en varios clientes de tu cuenta (alguien pagó el checkout de otro con ella), el primero.
- `status` (enum, required) — Siempre `active`; los métodos anulados no se listan.
  - Allowed values: `active`
- `created_at` (datetime, required) — Cuándo se guardó el método.
- `billing_details` (PaymentMethodBillingDetails, required)
- `metadata` (map from string to string, required, nullable) — Aún no se puede guardar metadata en un método de pago; siempre `null`.
- `card` (PaymentMethodCard, optional, nullable) — Presente cuando `type` es `card`.

### ErrorErrors

Detalles de errores por campo

- map from string to ErrorErrorsOneOf0
- list of string
- string

### PaymentMethodBillingDetails

- `name` (string, optional, nullable) — Nombre del pagador dueño del método.
- `email` (string, optional, nullable) — Email del pagador dueño del método.
- `phone` (string, optional, nullable) — Aún no se registra por método; siempre `null`.
- `address` (Address, optional) — País y código postal de facturación de la tarjeta, los que verificó el procesador; las demás líneas vienen en `null`.

### PaymentMethodCard

Presente cuando `type` es `card`.

- `last4` (string, optional)
- `expiration_month` (integer, optional, nullable) — 1 a 12. Puede faltar en tarjetas en Apple Pay.
- `expiration_year` (integer, optional, nullable)
- `network` (string, optional)
- `issuer_name` (string, optional, nullable) — Banco emisor. No viene en tarjetas en Apple Pay.
- `wallet` (enum, optional) — Solo en tarjetas guardadas desde Apple Pay.
  - Allowed values: `apple_pay`

### ErrorErrorsOneOf0

- list of string
- string

### Address

- `address_line_1` (string, optional, nullable) — Línea de dirección 1
- `address_line_2` (string, optional, nullable) — Línea de dirección 2
- `city` (string, optional, nullable) — Ciudad
- `region` (string, optional, nullable) — Región o departamento
- `country` (string, optional, nullable) — País
- `zip_code` (string, optional, nullable) — Código postal

## Examples

**Response**

```json
[
  {
    "id": "pay_m_7v5ie3pwq2xk9hrt",
    "object": "payment_method",
    "type": "card",
    "customer_id": "cus_ab12cd34",
    "status": "active",
    "created_at": "2024-01-15T09:30:00Z",
    "billing_details": {
      "name": "string",
      "email": "string",
      "phone": "string",
      "address": {
        "address_line_1": "string",
        "address_line_2": "string",
        "city": "string",
        "region": "string",
        "country": "string",
        "zip_code": "string"
      }
    },
    "metadata": {},
    "card": {
      "last4": "4242",
      "expiration_month": 12,
      "expiration_year": 2028,
      "network": "visa",
      "issuer_name": "string",
      "wallet": "apple_pay"
    }
  }
]
```

**SDK Code**

```python
import requests

url = "https://app.recurrente.com/api/payment_methods"

querystring = {"customer_id":"cus_ab12cd34"}

headers = {"X-SECRET-KEY": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://app.recurrente.com/api/payment_methods?customer_id=cus_ab12cd34';
const options = {method: 'GET', headers: {'X-SECRET-KEY': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.recurrente.com/api/payment_methods?customer_id=cus_ab12cd34"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-SECRET-KEY", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.recurrente.com/api/payment_methods?customer_id=cus_ab12cd34")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-SECRET-KEY"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.recurrente.com/api/payment_methods?customer_id=cus_ab12cd34")
  .header("X-SECRET-KEY", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.recurrente.com/api/payment_methods?customer_id=cus_ab12cd34', [
  'headers' => [
    'X-SECRET-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.recurrente.com/api/payment_methods?customer_id=cus_ab12cd34");
var request = new RestRequest(Method.GET);
request.AddHeader("X-SECRET-KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-SECRET-KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.recurrente.com/api/payment_methods?customer_id=cus_ab12cd34")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```