curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X POST https://api.razorpay.com/v1/customers/:customer_id/bank_account \
-H "Content-Type: application/json" \
-d '{
"ifsc_code" : "UTIB0000194",
"account_number" :"916010080000000",
"beneficiary_name" : "Gaurav Kumar",
"beneficiary_address1" : "address 1",
"beneficiary_address2" : "address 2",
"beneficiary_address3" : "address 3",
"beneficiary_address4" : "address 4",
"beneficiary_email" : "gaurav.kumar@example.com",
"beneficiary_mobile" : "1234567890",
"beneficiary_city" :"Bangalore",
"beneficiary_state" : "KA",
"beneficiary_country" : "IN"
}'
```java: Java
RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");
String customerId = "cust_N5mywh91sXB69O"
JSONObject customerRequest = new JSONObject();
customerRequest.put("ifsc_code","UTIB0000194");
customerRequest.put("account_number","916010080000000");
customerRequest.put("beneficiary_name","Gaurav Kumar");
customerRequest.put("beneficiary_address1","address 1");
customerRequest.put("beneficiary_address2","address 2");
customerRequest.put("beneficiary_address3","address 3");
customerRequest.put("beneficiary_address4","address 4");
customerRequest.put("beneficiary_email","gaurav.kumar@example.com");
customerRequest.put("beneficiary_mobile","1234567890");
customerRequest.put("beneficiary_city","Bangalore");
customerRequest.put("beneficiary_state","KA");
customerRequest.put("beneficiary_country","IN");
BankAccount bankaccount = instance.customers.addBankAccount(customerId, customerRequest)
```python: Python
import razorpay
client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))
customerId = "cust_N5mywh91sXB69O"
client.customer.addBankAccount(customerId, {
"ifsc_code" : "UTIB0000194",
"account_number" :"916010080000000",
"beneficiary_name" : "Gaurav Kumar",
"beneficiary_address1" : "address 1",
"beneficiary_address2" : "address 2",
"beneficiary_address3" : "address 3",
"beneficiary_address4" : "address 4",
"beneficiary_email" : "gaurav.kumar@example.com",
"beneficiary_mobile" : "1234567890",
"beneficiary_city" :"Bangalore",
"beneficiary_state" : "KA",
"beneficiary_country" : "IN"
})
```php: PHP
$api = new Api($key_id, $secret);
$customerId = "cust_N5mywh91sXB69O"
$api->customer->fetch($customerId)->addBankAccount([
"ifsc_code" => "UTIB0000194",
"account_number" => "916010080000000",
"beneficiary_name" => "Gaurav Kumar",
"beneficiary_address1" => "address 1",
"beneficiary_address2" => "address 2",
"beneficiary_address3" => "address 3",
"beneficiary_address4" => "address 4",
"beneficiary_email" => "gaurav.kumar@example.com",
"beneficiary_mobile" => "1234567890",
"beneficiary_city" => "Bangalore",
"beneficiary_state" => "KA",
"beneficiary_country" => "IN",
]);
```csharp: .NET
RazorpayClient client = new RazorpayClient(your_key_id, your_secret);
string customerId = "cust_N5mywh91sXB69O";
Dictionary customerRequest = new Dictionary();
customerRequest.Add("ifsc_code", "UTIB0000194");
customerRequest.Add("account_number", "916010080000000");
customerRequest.Add("beneficiary_name", "Gaurav Kumar");
customerRequest.Add("beneficiary_address1", "address 1");
customerRequest.Add("beneficiary_address2", "address 2");
customerRequest.Add("beneficiary_address3", "address 3");
customerRequest.Add("beneficiary_address4", "address 4");
customerRequest.Add("beneficiary_email", "gaurav.kumar@example.com");
customerRequest.Add("beneficiary_mobile", "1234567890");
customerRequest.Add("beneficiary_city", "Bangalore");
customerRequest.Add("beneficiary_state", "KA");
customerRequest.Add("beneficiary_country", "IN");
BankAccount refund = client.Customer.Fetch(customerId).AddBankAccount(customerRequest);
```ruby: Ruby
require "razorpay"
Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')
customerId = "cust_N5mywh91sXB69O"
Razorpay::Customer.add_bank_account(customerId,{
"ifsc_code": "UTIB0000194",
"account_number": "916010080000000",
"beneficiary_name": "Gaurav Kumar",
"beneficiary_address1": "address 1",
"beneficiary_address2": "address 2",
"beneficiary_address3": "address 3",
"beneficiary_address4": "address 4",
"beneficiary_email": "gaurav.kumar@example.com",
"beneficiary_mobile": "1234567890",
"beneficiary_city": "Bangalore",
"beneficiary_state": "KA",
"beneficiary_country": "IN"
})
```javascript: Node.js
var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })
var customerId = "cust_N5mywh91sXB69O"
instance.customers.addBankAccount(customerId, {
"ifsc_code" : "UTIB0000194",
"account_number" :"916010080000000",
"beneficiary_name" : "Gaurav Kumar",
"beneficiary_address1" : "address 1",
"beneficiary_address2" : "address 2",
"beneficiary_address3" : "address 3",
"beneficiary_address4" : "address 4",
"beneficiary_email" : "gaurav.kumar@example.com",
"beneficiary_mobile" : "1234567890",
"beneficiary_city" :"Bangalore",
"beneficiary_state" : "KA",
"beneficiary_country" : "IN"
});
```go: Go
import ( razorpay "github.com/razorpay/razorpay-go" )
client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")
customerId := "cust_N5mywh91sXB69O"
body, err := client.Customer.AddBankAccount(customerId, data, nil)