curl --request POST \
--url https://qa-api.endl.xyz/api/v0/recipients/{userId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-SECRET: <api-key>' \
--data '
{
"alias": "Acme Corp",
"type": "BUSINESS",
"currency": "INR",
"payoutRail": "IMPS",
"bankName": "HDFC",
"bankAccountNumber": "1234567890",
"ifsc": "HDFC0001234",
"recipientCountry": "IND"
}
'import requests
url = "https://qa-api.endl.xyz/api/v0/recipients/{userId}"
payload = {
"alias": "Acme Corp",
"type": "BUSINESS",
"currency": "INR",
"payoutRail": "IMPS",
"bankName": "HDFC",
"bankAccountNumber": "1234567890",
"ifsc": "HDFC0001234",
"recipientCountry": "IND"
}
headers = {
"X-API-KEY": "<api-key>",
"X-API-SECRET": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'X-API-SECRET': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
alias: 'Acme Corp',
type: 'BUSINESS',
currency: 'INR',
payoutRail: 'IMPS',
bankName: 'HDFC',
bankAccountNumber: '1234567890',
ifsc: 'HDFC0001234',
recipientCountry: 'IND'
})
};
fetch('https://qa-api.endl.xyz/api/v0/recipients/{userId}', 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://qa-api.endl.xyz/api/v0/recipients/{userId}",
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([
'alias' => 'Acme Corp',
'type' => 'BUSINESS',
'currency' => 'INR',
'payoutRail' => 'IMPS',
'bankName' => 'HDFC',
'bankAccountNumber' => '1234567890',
'ifsc' => 'HDFC0001234',
'recipientCountry' => 'IND'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-API-SECRET: <api-key>"
],
]);
$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://qa-api.endl.xyz/api/v0/recipients/{userId}"
payload := strings.NewReader("{\n \"alias\": \"Acme Corp\",\n \"type\": \"BUSINESS\",\n \"currency\": \"INR\",\n \"payoutRail\": \"IMPS\",\n \"bankName\": \"HDFC\",\n \"bankAccountNumber\": \"1234567890\",\n \"ifsc\": \"HDFC0001234\",\n \"recipientCountry\": \"IND\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-API-SECRET", "<api-key>")
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://qa-api.endl.xyz/api/v0/recipients/{userId}")
.header("X-API-KEY", "<api-key>")
.header("X-API-SECRET", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"alias\": \"Acme Corp\",\n \"type\": \"BUSINESS\",\n \"currency\": \"INR\",\n \"payoutRail\": \"IMPS\",\n \"bankName\": \"HDFC\",\n \"bankAccountNumber\": \"1234567890\",\n \"ifsc\": \"HDFC0001234\",\n \"recipientCountry\": \"IND\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/recipients/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-API-SECRET"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alias\": \"Acme Corp\",\n \"type\": \"BUSINESS\",\n \"currency\": \"INR\",\n \"payoutRail\": \"IMPS\",\n \"bankName\": \"HDFC\",\n \"bankAccountNumber\": \"1234567890\",\n \"ifsc\": \"HDFC0001234\",\n \"recipientCountry\": \"IND\"\n}"
response = http.request(request)
puts response.read_body{
"code": 201,
"message": "Recipient created",
"status": "SUCCESS",
"data": {},
"errors": []
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}Add recipient
Creates a recipient the user can pay out to. Requires the recipients permission.
Required fields vary by currency and rail — call Get recipient required fields first. The example below is an INR bank recipient on the IMPS rail.
curl --request POST \
--url https://qa-api.endl.xyz/api/v0/recipients/{userId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-SECRET: <api-key>' \
--data '
{
"alias": "Acme Corp",
"type": "BUSINESS",
"currency": "INR",
"payoutRail": "IMPS",
"bankName": "HDFC",
"bankAccountNumber": "1234567890",
"ifsc": "HDFC0001234",
"recipientCountry": "IND"
}
'import requests
url = "https://qa-api.endl.xyz/api/v0/recipients/{userId}"
payload = {
"alias": "Acme Corp",
"type": "BUSINESS",
"currency": "INR",
"payoutRail": "IMPS",
"bankName": "HDFC",
"bankAccountNumber": "1234567890",
"ifsc": "HDFC0001234",
"recipientCountry": "IND"
}
headers = {
"X-API-KEY": "<api-key>",
"X-API-SECRET": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'X-API-SECRET': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
alias: 'Acme Corp',
type: 'BUSINESS',
currency: 'INR',
payoutRail: 'IMPS',
bankName: 'HDFC',
bankAccountNumber: '1234567890',
ifsc: 'HDFC0001234',
recipientCountry: 'IND'
})
};
fetch('https://qa-api.endl.xyz/api/v0/recipients/{userId}', 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://qa-api.endl.xyz/api/v0/recipients/{userId}",
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([
'alias' => 'Acme Corp',
'type' => 'BUSINESS',
'currency' => 'INR',
'payoutRail' => 'IMPS',
'bankName' => 'HDFC',
'bankAccountNumber' => '1234567890',
'ifsc' => 'HDFC0001234',
'recipientCountry' => 'IND'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-API-SECRET: <api-key>"
],
]);
$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://qa-api.endl.xyz/api/v0/recipients/{userId}"
payload := strings.NewReader("{\n \"alias\": \"Acme Corp\",\n \"type\": \"BUSINESS\",\n \"currency\": \"INR\",\n \"payoutRail\": \"IMPS\",\n \"bankName\": \"HDFC\",\n \"bankAccountNumber\": \"1234567890\",\n \"ifsc\": \"HDFC0001234\",\n \"recipientCountry\": \"IND\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-API-SECRET", "<api-key>")
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://qa-api.endl.xyz/api/v0/recipients/{userId}")
.header("X-API-KEY", "<api-key>")
.header("X-API-SECRET", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"alias\": \"Acme Corp\",\n \"type\": \"BUSINESS\",\n \"currency\": \"INR\",\n \"payoutRail\": \"IMPS\",\n \"bankName\": \"HDFC\",\n \"bankAccountNumber\": \"1234567890\",\n \"ifsc\": \"HDFC0001234\",\n \"recipientCountry\": \"IND\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/recipients/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-API-SECRET"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alias\": \"Acme Corp\",\n \"type\": \"BUSINESS\",\n \"currency\": \"INR\",\n \"payoutRail\": \"IMPS\",\n \"bankName\": \"HDFC\",\n \"bankAccountNumber\": \"1234567890\",\n \"ifsc\": \"HDFC0001234\",\n \"recipientCountry\": \"IND\"\n}"
response = http.request(request)
puts response.read_body{
"code": 201,
"message": "Recipient created",
"status": "SUCCESS",
"data": {},
"errors": []
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}Authorizations
Your partner API key.
Your partner API secret.
Path Parameters
Identifier of the end user the resource belongs to.
"8f14e45f-ceea-467a-9a3f-1b2c0d4e5f60"
Body
Label for the recipient.
BUSINESS or INDIVIDUAL.
Currency the recipient is paid in.
Rail used to reach the recipient.
ISO-3166 alpha-3 country code.
Receiving bank name.
Receiving account number.
Rail-specific bank code — IFSC for Indian rails.
Response
Recipient created
201
"Recipient created"
SUCCESS, ERROR "SUCCESS"
Successful responses share the standard envelope. The shape of data for this endpoint is not yet captured in this specification — see the note on the API reference overview.
Show child attributes
Show child attributes
[]