Create an External Account
curl --request POST \
--url https://api.zerocash.tech/api/b2b/external-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"currency": "<string>",
"type": "<string>",
"payload": {
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"destination": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: '<string>',
currency: '<string>',
type: '<string>',
payload: {
firstName: '<string>',
lastName: '<string>',
phoneNumber: '<string>',
destination: '<string>'
}
})
};
fetch('https://api.zerocash.tech/api/b2b/external-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerocash.tech/api/b2b/external-accounts"
payload = {
"country": "<string>",
"currency": "<string>",
"type": "<string>",
"payload": {
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"destination": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerocash.tech/api/b2b/external-accounts",
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([
'country' => '<string>',
'currency' => '<string>',
'type' => '<string>',
'payload' => [
'firstName' => '<string>',
'lastName' => '<string>',
'phoneNumber' => '<string>',
'destination' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.zerocash.tech/api/b2b/external-accounts"
payload := strings.NewReader("{\n \"country\": \"<string>\",\n \"currency\": \"<string>\",\n \"type\": \"<string>\",\n \"payload\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"destination\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"success": true,
"message": "Successfully saved account.",
"data": {
"id": "8VzVZP82mQjA8AOynzal"
}
}{
"success": false,
"message": "Validation error: Branch code is required for UG and TZ.",
"errorCode": "VALIDATION_ERROR"
}Payouts
Create an External Account
External accounts, also known as beneficiaries, are records of accounts where funds can be sent (payouts) or from which funds can be initiated (deposits). This can represent an individual’s bank account, a business account, or a mobile mone
POST
/
api
/
b2b
/
external-accounts
Create an External Account
curl --request POST \
--url https://api.zerocash.tech/api/b2b/external-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"currency": "<string>",
"type": "<string>",
"payload": {
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"destination": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: '<string>',
currency: '<string>',
type: '<string>',
payload: {
firstName: '<string>',
lastName: '<string>',
phoneNumber: '<string>',
destination: '<string>'
}
})
};
fetch('https://api.zerocash.tech/api/b2b/external-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerocash.tech/api/b2b/external-accounts"
payload = {
"country": "<string>",
"currency": "<string>",
"type": "<string>",
"payload": {
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"destination": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerocash.tech/api/b2b/external-accounts",
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([
'country' => '<string>',
'currency' => '<string>',
'type' => '<string>',
'payload' => [
'firstName' => '<string>',
'lastName' => '<string>',
'phoneNumber' => '<string>',
'destination' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.zerocash.tech/api/b2b/external-accounts"
payload := strings.NewReader("{\n \"country\": \"<string>\",\n \"currency\": \"<string>\",\n \"type\": \"<string>\",\n \"payload\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"destination\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"success": true,
"message": "Successfully saved account.",
"data": {
"id": "8VzVZP82mQjA8AOynzal"
}
}{
"success": false,
"message": "Validation error: Branch code is required for UG and TZ.",
"errorCode": "VALIDATION_ERROR"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
⌘I