Validate bank account and routing number ( STABLE )
curl --request POST \
--url https://api.grailpay.com/3p/api/v2/bank-accounts/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_number": "1234567890123456",
"routing_number": "123456789",
"billing_merchant_user_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"billing_processor_mid": "123456789"
}
'import requests
url = "https://api.grailpay.com/3p/api/v2/bank-accounts/validate"
payload = {
"account_number": "1234567890123456",
"routing_number": "123456789",
"billing_merchant_user_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"billing_processor_mid": "123456789"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_number: '1234567890123456',
routing_number: '123456789',
billing_merchant_user_uuid: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
billing_processor_mid: '123456789'
})
};
fetch('https://api.grailpay.com/3p/api/v2/bank-accounts/validate', 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.grailpay.com/3p/api/v2/bank-accounts/validate",
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_number' => '1234567890123456',
'routing_number' => '123456789',
'billing_merchant_user_uuid' => '3fa85f64-5717-4562-b3fc-2c963f66afa6',
'billing_processor_mid' => '123456789'
]),
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.grailpay.com/3p/api/v2/bank-accounts/validate"
payload := strings.NewReader("{\n \"account_number\": \"1234567890123456\",\n \"routing_number\": \"123456789\",\n \"billing_merchant_user_uuid\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"billing_processor_mid\": \"123456789\"\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))
}HttpResponse<String> response = Unirest.post("https://api.grailpay.com/3p/api/v2/bank-accounts/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_number\": \"1234567890123456\",\n \"routing_number\": \"123456789\",\n \"billing_merchant_user_uuid\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"billing_processor_mid\": \"123456789\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/3p/api/v2/bank-accounts/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_number\": \"1234567890123456\",\n \"routing_number\": \"123456789\",\n \"billing_merchant_user_uuid\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"billing_processor_mid\": \"123456789\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Validation processed successfully",
"data": {
"uuid": "<string>",
"account_number": "<string>",
"routing_number": "<string>",
"version": "<string>",
"validity": true,
"validated_at": "2023-11-07T05:31:56Z",
"risk_score": 123,
"confidence_level": "<string>"
},
"errors": null,
"error_code": null
}{
"status": false,
"message": "Invalid Token",
"data": null,
"errors": null,
"error_code": null
}Bank Accounts
Validate bank account and routing number ( STABLE )
GrailPay provides a standalone Account and Routing Number Validation API, allowing businesses to verify bank account details before onboarding an entity or processing transactions. Using this validation helps prevent failed transactions, failed payouts, and other payment issues by ensuring that the account and routing numbers provided are legitimate.
POST
/
3p
/
api
/
v2
/
bank-accounts
/
validate
Validate bank account and routing number ( STABLE )
curl --request POST \
--url https://api.grailpay.com/3p/api/v2/bank-accounts/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_number": "1234567890123456",
"routing_number": "123456789",
"billing_merchant_user_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"billing_processor_mid": "123456789"
}
'import requests
url = "https://api.grailpay.com/3p/api/v2/bank-accounts/validate"
payload = {
"account_number": "1234567890123456",
"routing_number": "123456789",
"billing_merchant_user_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"billing_processor_mid": "123456789"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_number: '1234567890123456',
routing_number: '123456789',
billing_merchant_user_uuid: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
billing_processor_mid: '123456789'
})
};
fetch('https://api.grailpay.com/3p/api/v2/bank-accounts/validate', 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.grailpay.com/3p/api/v2/bank-accounts/validate",
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_number' => '1234567890123456',
'routing_number' => '123456789',
'billing_merchant_user_uuid' => '3fa85f64-5717-4562-b3fc-2c963f66afa6',
'billing_processor_mid' => '123456789'
]),
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.grailpay.com/3p/api/v2/bank-accounts/validate"
payload := strings.NewReader("{\n \"account_number\": \"1234567890123456\",\n \"routing_number\": \"123456789\",\n \"billing_merchant_user_uuid\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"billing_processor_mid\": \"123456789\"\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))
}HttpResponse<String> response = Unirest.post("https://api.grailpay.com/3p/api/v2/bank-accounts/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_number\": \"1234567890123456\",\n \"routing_number\": \"123456789\",\n \"billing_merchant_user_uuid\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"billing_processor_mid\": \"123456789\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/3p/api/v2/bank-accounts/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_number\": \"1234567890123456\",\n \"routing_number\": \"123456789\",\n \"billing_merchant_user_uuid\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"billing_processor_mid\": \"123456789\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Validation processed successfully",
"data": {
"uuid": "<string>",
"account_number": "<string>",
"routing_number": "<string>",
"version": "<string>",
"validity": true,
"validated_at": "2023-11-07T05:31:56Z",
"risk_score": 123,
"confidence_level": "<string>"
},
"errors": null,
"error_code": null
}{
"status": false,
"message": "Invalid Token",
"data": null,
"errors": null,
"error_code": null
}Authorizations
Token-based authentication using Authorization: Bearer <YOUR_API_KEY> provided by the GrailPay Support Team.
Body
application/json
Example:
"1234567890123456"
Example:
"123456789"
Available options:
1, 2 (optional) The UUID of the merchant user to be billed for this account validation.
Example:
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
(optional) The processor MID to be billed for this account validation.
Example:
"123456789"
⌘I
