curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens
```java: Java
RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");
String customerId = "cust_1Aa00000000002";
Customer customer = razorpay.customers.fetchTokens(customerId);
```php: PHP
$api = new Api($key_id, $secret);
$api->customer->fetch($customerId)->tokens()->all();
```javascript: Node.js
var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })
instance.customers.fetchTokens(customerId)
```python: Python
client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))
client.token.all(customerId)
```ruby: Ruby
require "razorpay"
Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')
customerId = "cust_1Aa00000000002 "
Razorpay::Customer.fetchTokens(customerId)
```go: Go
import ( razorpay "github.com/razorpay/razorpay-go" )
client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")
body, err := client.Token.All("", nil, nil)
```csharp: .NET
RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");
string customerId = "cust_1Aa00000000001";
List token = client.Customer.Fetch(customerId).Tokens();
```json: Response
{
"entity": "collection",
"count": 2,
"items": [
{
"id": "token_FHf94Uym9tdYFJ",
"entity": "token",
"token": "2wDPM7VAlXtjAR",
"bank": "HDFC",
"wallet": null,
"method": "emandate",
"vpa": null,
"recurring": true,
"recurring_details": {
"status": "confirmed",
"failure_reason": null
},
"auth_type": "netbanking",
"mrn": null,
"used_at": 1595447381,
"created_at": 1595447381,
"bank_details": {
"beneficiary_name": "Gaurav Kumar",
"account_number": "1121431121541121",
"ifsc": "HDFC0000001",
"account_type": "savings"
},
"max_amount": 9999900,
"expired_at": 1689971140,
"dcc_enabled": false
},
{
"id": "token_FHf9aAZR9hWJkq",
"entity": "token",
"token": "AwAwIFBmDSJ4p6",
"bank": "HDFC",
"wallet": null,
"method": "emandate",
"vpa": null,
"recurring": true,
"recurring_details": {
"status": "confirmed",
"failure_reason": null
},
"auth_type": "debitcard",
"mrn": null,
"used_at": 1595447410,
"created_at": 1595447410,
"bank_details": {
"beneficiary_name": "Gaurav Kumar",
"account_number": "1121431121541121",
"ifsc": "HDFC0000001",
"account_type": "savings"
},
"max_amount": 9999900,
"expired_at": 4102444799,
"dcc_enabled": false
}
]
}