> This page is for MVS Pay.

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

# List a customer's saved payment methods

GET https://pay.mvscloud.com/api/customers/{id}/payment-methods

Lists the tokenized payment methods saved for a customer. The customer is resolved by org-scoped id; if it has no linked Hyperswitch customer identity an empty list is returned. Otherwise the methods are fetched from the payments engine. As a side effect the server reconciles an owned, masked-metadata record of each saved card (dual-vault Flow B) on a best-effort basis — this never affects the list response.

Reference: https://docs.mvscloud.com/mvs-pay/api/customers/list-customer-payment-methods

## Authentication

- `x-api-key` header (required) — A scoped MvsPayApiKey, e.g. `mvspay_live_…`. Mint and scope keys from the dashboard (Settings → API Keys).

## Request

### Path parameters

- `id` (string, required) — The org-scoped billing customer id.

## Response

### 200

The customer's saved payment methods (empty array if the customer has no linked identity or none saved).

- `paymentMethods` (list of CustomerPaymentMethod, required)

## Errors

### 401 Unauthorized Error

Missing or invalid API key.

- `error` (ErrorResponseError, required)

### 403 Forbidden Error

The key lacks the required scope, or the body references a different organization.

- `error` (ErrorResponseError, required)

### 500 Internal Server Error

Unexpected server error.

- `error` (ErrorResponseError, required)

### 502 Bad Gateway Error

The payments engine (Hyperswitch/connector) returned an error.

- `error` (ErrorResponseError, required)

## Types

### CustomerPaymentMethod

A saved (tokenized) payment method as returned by the payments engine. Loosely typed; extra fields pass through. PAN is never exposed — only masked metadata.

- `payment_method_id` (string, optional) — The engine payment-method id.
- `id` (string, optional) — Alternate id field used by some engine responses.
- `brand` (string, optional, nullable) — Card brand, e.g. visa, mastercard.
- `last4` (string, optional, nullable) — Last four digits of the card.
- `card` (map from string to any, optional) — Card metadata (scheme, last4, etc.).

### ErrorResponseError

- `code` (string, required) — e.g. UNAUTHORIZED, FORBIDDEN, ERROR.
- `message` (string, required)
- `details` (map from string to any, optional)

## Examples

**Response**

```json
{
  "paymentMethods": [
    {
      "payment_method_id": "pm_01H8sample456",
      "brand": "visa",
      "last4": "4242",
      "card": {
        "scheme": "visa",
        "last4": "4242"
      }
    }
  ]
}
```

**SDK Code**

```python Customers_listCustomerPaymentMethods_example
import requests

url = "https://pay.mvscloud.com/api/customers/id/payment-methods"

headers = {"x-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript Customers_listCustomerPaymentMethods_example
const url = 'https://pay.mvscloud.com/api/customers/id/payment-methods';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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

```go Customers_listCustomerPaymentMethods_example
package main

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

func main() {

	url := "https://pay.mvscloud.com/api/customers/id/payment-methods"

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

	req.Header.Add("x-api-key", "<apiKey>")

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

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

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

}
```

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

url = URI("https://pay.mvscloud.com/api/customers/id/payment-methods")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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

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

HttpResponse<String> response = Unirest.get("https://pay.mvscloud.com/api/customers/id/payment-methods")
  .header("x-api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://pay.mvscloud.com/api/customers/id/payment-methods', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Customers_listCustomerPaymentMethods_example
using RestSharp;

var client = new RestClient("https://pay.mvscloud.com/api/customers/id/payment-methods");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Customers_listCustomerPaymentMethods_example
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://pay.mvscloud.com/api/customers/id/payment-methods")! 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()
```