Get all bank accounts for a user ( STABLE )
curl --request GET \
--url https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts', 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/users/{uuid}/bank-accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "",
"data": [
{
"uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"user_uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"account_number": "12345678901234",
"routing_number": "056008849",
"account_name": "Jack Jones",
"account_type": "savings",
"aggregator_type": "manual",
"created_at": "2023-10-16 16:19:42",
"is_default": true
},
{
"uuid": "9abaa7dc-b31d-4fdf-b8a5-e62c8a582c9b",
"user_uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"account_number": "1111222233330000",
"routing_number": "011401533",
"account_name": "Jack Jones",
"account_type": "savings",
"aggregator_type": "plaid",
"created_at": "2023-11-29 13:31:48",
"is_default": false
}
],
"errors": null,
"error_code": null
}{
"status": false,
"message": "Invalid Token",
"data": null,
"errors": null,
"error_code": null
}{
"status": true,
"message": "User not found",
"data": null,
"statusCode": 404,
"errorCode": {
"type": "client_error",
"subType": "uuid_not_found"
}
}Bank Accounts
Get all bank accounts for a user ( STABLE )
This API retrieves a list of all bank accounts associated with a business or person. The response includes details such as the account number, routing number, account holder’s name, account type, and other relevant information.
GET
/
3p
/
api
/
v2
/
users
/
{uuid}
/
bank-accounts
Get all bank accounts for a user ( STABLE )
curl --request GET \
--url https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts', 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/users/{uuid}/bank-accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/3p/api/v2/users/{uuid}/bank-accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "",
"data": [
{
"uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"user_uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"account_number": "12345678901234",
"routing_number": "056008849",
"account_name": "Jack Jones",
"account_type": "savings",
"aggregator_type": "manual",
"created_at": "2023-10-16 16:19:42",
"is_default": true
},
{
"uuid": "9abaa7dc-b31d-4fdf-b8a5-e62c8a582c9b",
"user_uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"account_number": "1111222233330000",
"routing_number": "011401533",
"account_name": "Jack Jones",
"account_type": "savings",
"aggregator_type": "plaid",
"created_at": "2023-11-29 13:31:48",
"is_default": false
}
],
"errors": null,
"error_code": null
}{
"status": false,
"message": "Invalid Token",
"data": null,
"errors": null,
"error_code": null
}{
"status": true,
"message": "User not found",
"data": null,
"statusCode": 404,
"errorCode": {
"type": "client_error",
"subType": "uuid_not_found"
}
}Authorizations
Token-based authentication using Authorization: Bearer <YOUR_API_KEY> provided by the GrailPay Support Team.
Path Parameters
UUID of the user
Response
Successful response
Example:
true
Example:
""
Show child attributes
Show child attributes
Example:
[
{
"uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"user_uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"account_number": "12345678901234",
"routing_number": "056008849",
"account_name": "Jack Jones",
"account_type": "savings",
"aggregator_type": "manual",
"created_at": "2023-10-16 16:19:42",
"is_default": true
},
{
"uuid": "9abaa7dc-b31d-4fdf-b8a5-e62c8a582c9b",
"user_uuid": "f7a809c8-1987-4627-b1ab-885550cbbb5a",
"account_number": "1111222233330000",
"routing_number": "011401533",
"account_name": "Jack Jones",
"account_type": "savings",
"aggregator_type": "plaid",
"created_at": "2023-11-29 13:31:48",
"is_default": false
}
]
Example:
null
Example:
null
⌘I
