Register a bank account
curl --request POST \
--url https://api.paj.cash/pub/v2/bank-account \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"bankCode": "000016",
"accountNumber": "0025635480"
}
'import requests
url = "https://api.paj.cash/pub/v2/bank-account"
payload = {
"bankCode": "000016",
"accountNumber": "0025635480"
}
headers = {
"x-api-key": "<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>', 'Content-Type': 'application/json'},
body: JSON.stringify({bankCode: '000016', accountNumber: '0025635480'})
};
fetch('https://api.paj.cash/pub/v2/bank-account', 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://api.paj.cash/pub/v2/bank-account",
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([
'bankCode' => '000016',
'accountNumber' => '0025635480'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://api.paj.cash/pub/v2/bank-account"
payload := strings.NewReader("{\n \"bankCode\": \"000016\",\n \"accountNumber\": \"0025635480\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.paj.cash/pub/v2/bank-account")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bankCode\": \"000016\",\n \"accountNumber\": \"0025635480\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paj.cash/pub/v2/bank-account")
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["Content-Type"] = 'application/json'
request.body = "{\n \"bankCode\": \"000016\",\n \"accountNumber\": \"0025635480\"\n}"
response = http.request(request)
puts response.read_body{
"id": "someRANDOMid",
"accountName": "John Doe",
"accountNumber": "0025635480",
"bank": "First Bank",
"address": "FsXpXq8wVTM13NDXxrf2X6PpgJWg9jCxRVuHhtfnojUa"
}Bank accounts
Register a bank account
Registers a bank account for the API key’s business using a bank code and account number. The account is confirmed with the provider and an on-chain address is assigned. If the account already exists it is returned as-is.
POST
/
pub
/
v2
/
bank-account
Register a bank account
curl --request POST \
--url https://api.paj.cash/pub/v2/bank-account \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"bankCode": "000016",
"accountNumber": "0025635480"
}
'import requests
url = "https://api.paj.cash/pub/v2/bank-account"
payload = {
"bankCode": "000016",
"accountNumber": "0025635480"
}
headers = {
"x-api-key": "<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>', 'Content-Type': 'application/json'},
body: JSON.stringify({bankCode: '000016', accountNumber: '0025635480'})
};
fetch('https://api.paj.cash/pub/v2/bank-account', 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://api.paj.cash/pub/v2/bank-account",
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([
'bankCode' => '000016',
'accountNumber' => '0025635480'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://api.paj.cash/pub/v2/bank-account"
payload := strings.NewReader("{\n \"bankCode\": \"000016\",\n \"accountNumber\": \"0025635480\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.paj.cash/pub/v2/bank-account")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bankCode\": \"000016\",\n \"accountNumber\": \"0025635480\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paj.cash/pub/v2/bank-account")
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["Content-Type"] = 'application/json'
request.body = "{\n \"bankCode\": \"000016\",\n \"accountNumber\": \"0025635480\"\n}"
response = http.request(request)
puts response.read_body{
"id": "someRANDOMid",
"accountName": "John Doe",
"accountNumber": "0025635480",
"bank": "First Bank",
"address": "FsXpXq8wVTM13NDXxrf2X6PpgJWg9jCxRVuHhtfnojUa"
}Registration does three things in one call: it confirms the account number with
the bank, stores the account against your business, and derives the on-chain
address that pays it.
The call is idempotent per bank account. If the same bank code and account
number have already been registered — by you or by anyone else on Paj — the
existing record is returned unchanged, with the same
Use the returned
address. There is no
error and no duplicate.
Confirmation is a live call to the banking rail, so this endpoint is slower
than the other two. Register accounts ahead of time rather than in a hot path
like a checkout screen.
accountName — it comes from the bank, not from your input —
to let the user confirm they typed the right account number before you show them
an address to pay.
See Bank account addresses for what happens
once funds reach the address.Authorizations
Body
application/json
Response
The registered bank account
id
Example:
"someRANDOMid"
User's bank acount name
Example:
"John Doe"
User's bank account number
Example:
"0025635480"
Bank name
Example:
"First Bank"
Bank Account Address
Example:
"FsXpXq8wVTM13NDXxrf2X6PpgJWg9jCxRVuHhtfnojUa"