Create Beneficiary
curl --request POST \
--url https://service-sandbox.tazapay.com/v3/beneficiary \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "acc_cr83unf7j0t2odh9ioc0",
"name": "test",
"type": "individual",
"email": "test@example.com",
"tax_id": "",
"destination_details": {
"type": "bank",
"bank": {
"country": "IN",
"currency": "INR",
"bank_codes": {
"swift_code": "Test",
"ifsc_code": "Test"
},
"bank_name": "hdfc",
"account_number": "Test",
"firc_required": true,
"purpose_code": "Test"
}
},
"address": {
"line1": "Test",
"line2": "Test",
"city": "Test",
"state": "Test",
"country": "IN",
"postal_code": "110017"
},
"phone": {
"number": "",
"calling_code": "91"
},
"nationality": "IN"
}
'import requests
url = "https://service-sandbox.tazapay.com/v3/beneficiary"
payload = {
"account_id": "acc_cr83unf7j0t2odh9ioc0",
"name": "test",
"type": "individual",
"email": "test@example.com",
"tax_id": "",
"destination_details": {
"type": "bank",
"bank": {
"country": "IN",
"currency": "INR",
"bank_codes": {
"swift_code": "Test",
"ifsc_code": "Test"
},
"bank_name": "hdfc",
"account_number": "Test",
"firc_required": True,
"purpose_code": "Test"
}
},
"address": {
"line1": "Test",
"line2": "Test",
"city": "Test",
"state": "Test",
"country": "IN",
"postal_code": "110017"
},
"phone": {
"number": "",
"calling_code": "91"
},
"nationality": "IN"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: 'acc_cr83unf7j0t2odh9ioc0',
name: 'test',
type: 'individual',
email: 'test@example.com',
tax_id: '',
destination_details: {
type: 'bank',
bank: {
country: 'IN',
currency: 'INR',
bank_codes: {swift_code: 'Test', ifsc_code: 'Test'},
bank_name: 'hdfc',
account_number: 'Test',
firc_required: true,
purpose_code: 'Test'
}
},
address: {
line1: 'Test',
line2: 'Test',
city: 'Test',
state: 'Test',
country: 'IN',
postal_code: '110017'
},
phone: {number: '', calling_code: '91'},
nationality: 'IN'
})
};
fetch('https://service-sandbox.tazapay.com/v3/beneficiary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://service-sandbox.tazapay.com/v3/beneficiary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => 'acc_cr83unf7j0t2odh9ioc0',
'name' => 'test',
'type' => 'individual',
'email' => 'test@example.com',
'tax_id' => '',
'destination_details' => [
'type' => 'bank',
'bank' => [
'country' => 'IN',
'currency' => 'INR',
'bank_codes' => [
'swift_code' => 'Test',
'ifsc_code' => 'Test'
],
'bank_name' => 'hdfc',
'account_number' => 'Test',
'firc_required' => true,
'purpose_code' => 'Test'
]
],
'address' => [
'line1' => 'Test',
'line2' => 'Test',
'city' => 'Test',
'state' => 'Test',
'country' => 'IN',
'postal_code' => '110017'
],
'phone' => [
'number' => '',
'calling_code' => '91'
],
'nationality' => 'IN'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://service-sandbox.tazapay.com/v3/beneficiary"
payload := strings.NewReader("{\n \"account_id\": \"acc_cr83unf7j0t2odh9ioc0\",\n \"name\": \"test\",\n \"type\": \"individual\",\n \"email\": \"test@example.com\",\n \"tax_id\": \"\",\n \"destination_details\": {\n \"type\": \"bank\",\n \"bank\": {\n \"country\": \"IN\",\n \"currency\": \"INR\",\n \"bank_codes\": {\n \"swift_code\": \"Test\",\n \"ifsc_code\": \"Test\"\n },\n \"bank_name\": \"hdfc\",\n \"account_number\": \"Test\",\n \"firc_required\": true,\n \"purpose_code\": \"Test\"\n }\n },\n \"address\": {\n \"line1\": \"Test\",\n \"line2\": \"Test\",\n \"city\": \"Test\",\n \"state\": \"Test\",\n \"country\": \"IN\",\n \"postal_code\": \"110017\"\n },\n \"phone\": {\n \"number\": \"\",\n \"calling_code\": \"91\"\n },\n \"nationality\": \"IN\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://service-sandbox.tazapay.com/v3/beneficiary")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"acc_cr83unf7j0t2odh9ioc0\",\n \"name\": \"test\",\n \"type\": \"individual\",\n \"email\": \"test@example.com\",\n \"tax_id\": \"\",\n \"destination_details\": {\n \"type\": \"bank\",\n \"bank\": {\n \"country\": \"IN\",\n \"currency\": \"INR\",\n \"bank_codes\": {\n \"swift_code\": \"Test\",\n \"ifsc_code\": \"Test\"\n },\n \"bank_name\": \"hdfc\",\n \"account_number\": \"Test\",\n \"firc_required\": true,\n \"purpose_code\": \"Test\"\n }\n },\n \"address\": {\n \"line1\": \"Test\",\n \"line2\": \"Test\",\n \"city\": \"Test\",\n \"state\": \"Test\",\n \"country\": \"IN\",\n \"postal_code\": \"110017\"\n },\n \"phone\": {\n \"number\": \"\",\n \"calling_code\": \"91\"\n },\n \"nationality\": \"IN\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service-sandbox.tazapay.com/v3/beneficiary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"acc_cr83unf7j0t2odh9ioc0\",\n \"name\": \"test\",\n \"type\": \"individual\",\n \"email\": \"test@example.com\",\n \"tax_id\": \"\",\n \"destination_details\": {\n \"type\": \"bank\",\n \"bank\": {\n \"country\": \"IN\",\n \"currency\": \"INR\",\n \"bank_codes\": {\n \"swift_code\": \"Test\",\n \"ifsc_code\": \"Test\"\n },\n \"bank_name\": \"hdfc\",\n \"account_number\": \"Test\",\n \"firc_required\": true,\n \"purpose_code\": \"Test\"\n }\n },\n \"address\": {\n \"line1\": \"Test\",\n \"line2\": \"Test\",\n \"city\": \"Test\",\n \"state\": \"Test\",\n \"country\": \"IN\",\n \"postal_code\": \"110017\"\n },\n \"phone\": {\n \"number\": \"\",\n \"calling_code\": \"91\"\n },\n \"nationality\": \"IN\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "",
"data": {
"address": {
"city": "Test",
"country": "IN",
"line1": "Test",
"line2": "Test",
"postal_code": "110017",
"state": "Test"
},
"created_at": "2024-10-03T11:03:40.326462Z",
"destination": "bnk_crv7k337eoqgk10pqp40",
"destination_details": {
"bank": {
"account_number": "Test",
"account_type": "",
"bank_codes": {
"ifsc_code": "Test",
"swift_code": "Test"
},
"bank_name": "hdfc",
"branch_name": "",
"country": "IN",
"currency": "INR",
"firc_required": true,
"purpose_code": "Test"
},
"type": "bank"
},
"documents": [],
"email": "test@example.com",
"id": "bnf_crv7k31h1l071n2fkbjg",
"metadata": null,
"name": "test",
"object": "beneficiary",
"phone": {
"calling_code": "91",
"number": "9362987920"
},
"tax_id": "",
"type": "individual"
}
}"{}"Beneficiary
Create Beneficiary
This lets you create a beneficiary
POST
/
v3
/
beneficiary
Create Beneficiary
curl --request POST \
--url https://service-sandbox.tazapay.com/v3/beneficiary \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "acc_cr83unf7j0t2odh9ioc0",
"name": "test",
"type": "individual",
"email": "test@example.com",
"tax_id": "",
"destination_details": {
"type": "bank",
"bank": {
"country": "IN",
"currency": "INR",
"bank_codes": {
"swift_code": "Test",
"ifsc_code": "Test"
},
"bank_name": "hdfc",
"account_number": "Test",
"firc_required": true,
"purpose_code": "Test"
}
},
"address": {
"line1": "Test",
"line2": "Test",
"city": "Test",
"state": "Test",
"country": "IN",
"postal_code": "110017"
},
"phone": {
"number": "",
"calling_code": "91"
},
"nationality": "IN"
}
'import requests
url = "https://service-sandbox.tazapay.com/v3/beneficiary"
payload = {
"account_id": "acc_cr83unf7j0t2odh9ioc0",
"name": "test",
"type": "individual",
"email": "test@example.com",
"tax_id": "",
"destination_details": {
"type": "bank",
"bank": {
"country": "IN",
"currency": "INR",
"bank_codes": {
"swift_code": "Test",
"ifsc_code": "Test"
},
"bank_name": "hdfc",
"account_number": "Test",
"firc_required": True,
"purpose_code": "Test"
}
},
"address": {
"line1": "Test",
"line2": "Test",
"city": "Test",
"state": "Test",
"country": "IN",
"postal_code": "110017"
},
"phone": {
"number": "",
"calling_code": "91"
},
"nationality": "IN"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: 'acc_cr83unf7j0t2odh9ioc0',
name: 'test',
type: 'individual',
email: 'test@example.com',
tax_id: '',
destination_details: {
type: 'bank',
bank: {
country: 'IN',
currency: 'INR',
bank_codes: {swift_code: 'Test', ifsc_code: 'Test'},
bank_name: 'hdfc',
account_number: 'Test',
firc_required: true,
purpose_code: 'Test'
}
},
address: {
line1: 'Test',
line2: 'Test',
city: 'Test',
state: 'Test',
country: 'IN',
postal_code: '110017'
},
phone: {number: '', calling_code: '91'},
nationality: 'IN'
})
};
fetch('https://service-sandbox.tazapay.com/v3/beneficiary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://service-sandbox.tazapay.com/v3/beneficiary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => 'acc_cr83unf7j0t2odh9ioc0',
'name' => 'test',
'type' => 'individual',
'email' => 'test@example.com',
'tax_id' => '',
'destination_details' => [
'type' => 'bank',
'bank' => [
'country' => 'IN',
'currency' => 'INR',
'bank_codes' => [
'swift_code' => 'Test',
'ifsc_code' => 'Test'
],
'bank_name' => 'hdfc',
'account_number' => 'Test',
'firc_required' => true,
'purpose_code' => 'Test'
]
],
'address' => [
'line1' => 'Test',
'line2' => 'Test',
'city' => 'Test',
'state' => 'Test',
'country' => 'IN',
'postal_code' => '110017'
],
'phone' => [
'number' => '',
'calling_code' => '91'
],
'nationality' => 'IN'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://service-sandbox.tazapay.com/v3/beneficiary"
payload := strings.NewReader("{\n \"account_id\": \"acc_cr83unf7j0t2odh9ioc0\",\n \"name\": \"test\",\n \"type\": \"individual\",\n \"email\": \"test@example.com\",\n \"tax_id\": \"\",\n \"destination_details\": {\n \"type\": \"bank\",\n \"bank\": {\n \"country\": \"IN\",\n \"currency\": \"INR\",\n \"bank_codes\": {\n \"swift_code\": \"Test\",\n \"ifsc_code\": \"Test\"\n },\n \"bank_name\": \"hdfc\",\n \"account_number\": \"Test\",\n \"firc_required\": true,\n \"purpose_code\": \"Test\"\n }\n },\n \"address\": {\n \"line1\": \"Test\",\n \"line2\": \"Test\",\n \"city\": \"Test\",\n \"state\": \"Test\",\n \"country\": \"IN\",\n \"postal_code\": \"110017\"\n },\n \"phone\": {\n \"number\": \"\",\n \"calling_code\": \"91\"\n },\n \"nationality\": \"IN\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://service-sandbox.tazapay.com/v3/beneficiary")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"acc_cr83unf7j0t2odh9ioc0\",\n \"name\": \"test\",\n \"type\": \"individual\",\n \"email\": \"test@example.com\",\n \"tax_id\": \"\",\n \"destination_details\": {\n \"type\": \"bank\",\n \"bank\": {\n \"country\": \"IN\",\n \"currency\": \"INR\",\n \"bank_codes\": {\n \"swift_code\": \"Test\",\n \"ifsc_code\": \"Test\"\n },\n \"bank_name\": \"hdfc\",\n \"account_number\": \"Test\",\n \"firc_required\": true,\n \"purpose_code\": \"Test\"\n }\n },\n \"address\": {\n \"line1\": \"Test\",\n \"line2\": \"Test\",\n \"city\": \"Test\",\n \"state\": \"Test\",\n \"country\": \"IN\",\n \"postal_code\": \"110017\"\n },\n \"phone\": {\n \"number\": \"\",\n \"calling_code\": \"91\"\n },\n \"nationality\": \"IN\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service-sandbox.tazapay.com/v3/beneficiary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"acc_cr83unf7j0t2odh9ioc0\",\n \"name\": \"test\",\n \"type\": \"individual\",\n \"email\": \"test@example.com\",\n \"tax_id\": \"\",\n \"destination_details\": {\n \"type\": \"bank\",\n \"bank\": {\n \"country\": \"IN\",\n \"currency\": \"INR\",\n \"bank_codes\": {\n \"swift_code\": \"Test\",\n \"ifsc_code\": \"Test\"\n },\n \"bank_name\": \"hdfc\",\n \"account_number\": \"Test\",\n \"firc_required\": true,\n \"purpose_code\": \"Test\"\n }\n },\n \"address\": {\n \"line1\": \"Test\",\n \"line2\": \"Test\",\n \"city\": \"Test\",\n \"state\": \"Test\",\n \"country\": \"IN\",\n \"postal_code\": \"110017\"\n },\n \"phone\": {\n \"number\": \"\",\n \"calling_code\": \"91\"\n },\n \"nationality\": \"IN\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "",
"data": {
"address": {
"city": "Test",
"country": "IN",
"line1": "Test",
"line2": "Test",
"postal_code": "110017",
"state": "Test"
},
"created_at": "2024-10-03T11:03:40.326462Z",
"destination": "bnk_crv7k337eoqgk10pqp40",
"destination_details": {
"bank": {
"account_number": "Test",
"account_type": "",
"bank_codes": {
"ifsc_code": "Test",
"swift_code": "Test"
},
"bank_name": "hdfc",
"branch_name": "",
"country": "IN",
"currency": "INR",
"firc_required": true,
"purpose_code": "Test"
},
"type": "bank"
},
"documents": [],
"email": "test@example.com",
"id": "bnf_crv7k31h1l071n2fkbjg",
"metadata": null,
"name": "test",
"object": "beneficiary",
"phone": {
"calling_code": "91",
"number": "9362987920"
},
"tax_id": "",
"type": "individual"
}
}"{}"Authorizations
Body
application/json
Response
200
Represents a payout beneficiary with personal, contact, and destination details.
Was this page helpful?