Onboard a new Merchant into the ACH application ( STABLE )
curl --request POST \
--url https://api.grailpay.com/api/v3/merchants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_reference_id": "reference_12345",
"billing_merchant_uuid": "6a8fc154-1a50-483b-a690-fd1dfaf9408b",
"billing_processor_mid": "12345678",
"payout_type": "batch",
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Doe",
"dob": "2023-04-11",
"ssn9": "123456789",
"address": {
"line_1": "10554 W Quarles Ave",
"city": "Littleton",
"state": "CO",
"zip": "80127",
"line_2": "Suite 123"
},
"is_beneficial_owner": true,
"is_director": false,
"is_significant_control_person": false,
"ownership_percentage": 25,
"email": "owner@test.com",
"phone": "2457856490",
"occupation": "Co-founder"
}
],
"bank_account": {
"plaid_account_id": "<string>",
"plaid_access_token": "<string>",
"account_number": "9876543210",
"routing_number": "021000021",
"account_name": "John Doe",
"account_type": "checking"
},
"actions": {}
}
'import requests
url = "https://api.grailpay.com/api/v3/merchants"
payload = {
"client_reference_id": "reference_12345",
"billing_merchant_uuid": "6a8fc154-1a50-483b-a690-fd1dfaf9408b",
"billing_processor_mid": "12345678",
"payout_type": "batch",
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Doe",
"dob": "2023-04-11",
"ssn9": "123456789",
"address": {
"line_1": "10554 W Quarles Ave",
"city": "Littleton",
"state": "CO",
"zip": "80127",
"line_2": "Suite 123"
},
"is_beneficial_owner": True,
"is_director": False,
"is_significant_control_person": False,
"ownership_percentage": 25,
"email": "owner@test.com",
"phone": "2457856490",
"occupation": "Co-founder"
}
],
"bank_account": {
"plaid_account_id": "<string>",
"plaid_access_token": "<string>",
"account_number": "9876543210",
"routing_number": "021000021",
"account_name": "John Doe",
"account_type": "checking"
},
"actions": {}
}
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({
client_reference_id: 'reference_12345',
billing_merchant_uuid: '6a8fc154-1a50-483b-a690-fd1dfaf9408b',
billing_processor_mid: '12345678',
payout_type: 'batch',
beneficial_owners: [
{
first_name: 'Jane',
last_name: 'Doe',
dob: '2023-04-11',
ssn9: '123456789',
address: {
line_1: '10554 W Quarles Ave',
city: 'Littleton',
state: 'CO',
zip: '80127',
line_2: 'Suite 123'
},
is_beneficial_owner: true,
is_director: false,
is_significant_control_person: false,
ownership_percentage: 25,
email: 'owner@test.com',
phone: '2457856490',
occupation: 'Co-founder'
}
],
bank_account: {
plaid_account_id: '<string>',
plaid_access_token: '<string>',
account_number: '9876543210',
routing_number: '021000021',
account_name: 'John Doe',
account_type: 'checking'
},
actions: {}
})
};
fetch('https://api.grailpay.com/api/v3/merchants', 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/api/v3/merchants",
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([
'client_reference_id' => 'reference_12345',
'billing_merchant_uuid' => '6a8fc154-1a50-483b-a690-fd1dfaf9408b',
'billing_processor_mid' => '12345678',
'payout_type' => 'batch',
'beneficial_owners' => [
[
'first_name' => 'Jane',
'last_name' => 'Doe',
'dob' => '2023-04-11',
'ssn9' => '123456789',
'address' => [
'line_1' => '10554 W Quarles Ave',
'city' => 'Littleton',
'state' => 'CO',
'zip' => '80127',
'line_2' => 'Suite 123'
],
'is_beneficial_owner' => true,
'is_director' => false,
'is_significant_control_person' => false,
'ownership_percentage' => 25,
'email' => 'owner@test.com',
'phone' => '2457856490',
'occupation' => 'Co-founder'
]
],
'bank_account' => [
'plaid_account_id' => '<string>',
'plaid_access_token' => '<string>',
'account_number' => '9876543210',
'routing_number' => '021000021',
'account_name' => 'John Doe',
'account_type' => 'checking'
],
'actions' => [
]
]),
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/api/v3/merchants"
payload := strings.NewReader("{\n \"client_reference_id\": \"reference_12345\",\n \"billing_merchant_uuid\": \"6a8fc154-1a50-483b-a690-fd1dfaf9408b\",\n \"billing_processor_mid\": \"12345678\",\n \"payout_type\": \"batch\",\n \"beneficial_owners\": [\n {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"dob\": \"2023-04-11\",\n \"ssn9\": \"123456789\",\n \"address\": {\n \"line_1\": \"10554 W Quarles Ave\",\n \"city\": \"Littleton\",\n \"state\": \"CO\",\n \"zip\": \"80127\",\n \"line_2\": \"Suite 123\"\n },\n \"is_beneficial_owner\": true,\n \"is_director\": false,\n \"is_significant_control_person\": false,\n \"ownership_percentage\": 25,\n \"email\": \"owner@test.com\",\n \"phone\": \"2457856490\",\n \"occupation\": \"Co-founder\"\n }\n ],\n \"bank_account\": {\n \"plaid_account_id\": \"<string>\",\n \"plaid_access_token\": \"<string>\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"021000021\",\n \"account_name\": \"John Doe\",\n \"account_type\": \"checking\"\n },\n \"actions\": {}\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/api/v3/merchants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_reference_id\": \"reference_12345\",\n \"billing_merchant_uuid\": \"6a8fc154-1a50-483b-a690-fd1dfaf9408b\",\n \"billing_processor_mid\": \"12345678\",\n \"payout_type\": \"batch\",\n \"beneficial_owners\": [\n {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"dob\": \"2023-04-11\",\n \"ssn9\": \"123456789\",\n \"address\": {\n \"line_1\": \"10554 W Quarles Ave\",\n \"city\": \"Littleton\",\n \"state\": \"CO\",\n \"zip\": \"80127\",\n \"line_2\": \"Suite 123\"\n },\n \"is_beneficial_owner\": true,\n \"is_director\": false,\n \"is_significant_control_person\": false,\n \"ownership_percentage\": 25,\n \"email\": \"owner@test.com\",\n \"phone\": \"2457856490\",\n \"occupation\": \"Co-founder\"\n }\n ],\n \"bank_account\": {\n \"plaid_account_id\": \"<string>\",\n \"plaid_access_token\": \"<string>\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"021000021\",\n \"account_name\": \"John Doe\",\n \"account_type\": \"checking\"\n },\n \"actions\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/api/v3/merchants")
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 \"client_reference_id\": \"reference_12345\",\n \"billing_merchant_uuid\": \"6a8fc154-1a50-483b-a690-fd1dfaf9408b\",\n \"billing_processor_mid\": \"12345678\",\n \"payout_type\": \"batch\",\n \"beneficial_owners\": [\n {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"dob\": \"2023-04-11\",\n \"ssn9\": \"123456789\",\n \"address\": {\n \"line_1\": \"10554 W Quarles Ave\",\n \"city\": \"Littleton\",\n \"state\": \"CO\",\n \"zip\": \"80127\",\n \"line_2\": \"Suite 123\"\n },\n \"is_beneficial_owner\": true,\n \"is_director\": false,\n \"is_significant_control_person\": false,\n \"ownership_percentage\": 25,\n \"email\": \"owner@test.com\",\n \"phone\": \"2457856490\",\n \"occupation\": \"Co-founder\"\n }\n ],\n \"bank_account\": {\n \"plaid_account_id\": \"<string>\",\n \"plaid_access_token\": \"<string>\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"021000021\",\n \"account_name\": \"John Doe\",\n \"account_type\": \"checking\"\n },\n \"actions\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "This merchant was onboarded successfully.",
"data": {
"merchant": {
"uuid": "c6bcfbbb-98ff-4d8b-a8f5-1559c3dcb718",
"business_type": "merchant",
"kyb_status": "IN_REVIEW",
"kyb_rejected_reason": null,
"name": "Acme Inc.",
"tin": "123456789",
"trading_name": "Acme Corp",
"entity_type": "Sole Trader",
"incorporation_date": "2024-02-02",
"incorporation_state": "CO",
"address_type": "Registered",
"address": {
"line_1": "10554 W Quarles Ave",
"line_2": "Suite 123",
"city": "Littleton",
"state": "CO",
"zip": "80127"
},
"transaction_fee_percent": 2.5,
"transaction_fee_fixed": 100,
"maximum_transaction_fee": 5000,
"payout_type": "batch",
"client_reference_id": "reference_12345",
"timestamps": {
"created_at": "2024-06-25 13:57:03"
}
},
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Doe",
"dob": "2023-04-11",
"ssn9": "123456789",
"address": {
"line_1": "10554 W Quarles Ave",
"line_2": "Suite 123",
"city": "Littleton",
"state": "CO",
"zip": "80127"
},
"is_beneficial_owner": true,
"is_director": false,
"is_significant_control_person": false,
"ownership_percentage": 25,
"email": "owner@test.com",
"phone": "2457856490",
"occupation": "Co-founder",
"timestamps": {
"created_at": "2024-06-25 13:57:03"
}
}
],
"relations": {
"person": {
"uuid": "7c41f6a2-a4b9-4df8-9225-2c1b7312042e"
}
},
"account_intelligence": {
"confidence_score": 0.81,
"decisioning_insights": {
"account_duplicate": false,
"days_since_first_seen": -1,
"days_since_last_transaction": -1,
"has_negative_transactions": false,
"has_paid_transactions": false,
"has_positive_transactions": true,
"name_match": "yes",
"phone_number_present": false,
"valid_routing_number": true
},
"version": "v3"
}
},
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "Invalid Parameters Received",
"data": null,
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "Invalid token.",
"data": null,
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "The request cannot be executed due to a detected conflict with a duplicate request.",
"data": null,
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "The given data was invalid.",
"data": null,
"errors": {
"client_reference_id": [
"The client reference ID must be a string.",
"The client reference ID may not be greater than 255 characters."
],
"billing_merchant_uuid": [
"The billing merchant UUID must be a valid UUID.",
"The billing merchant UUID does not exist.",
"The billing merchant UUID is deleted and cannot be used for billing purposes."
],
"billing_processor_mid": [
"The billing processor MID must be a string.",
"The billing processor MID does not exist.",
"The billing processor MID is deleted and cannot be used for billing purposes."
],
"payout_type": [
"The payout type must be a string.",
"The payout type must be one of the followings: individual, batch"
],
"bank_account": [
"You cannot provide both plaid details and manual bank account fields.",
"This person did not meet the confidence score threshold of 0.5 and has been rejected.",
"Invalid plaid account ID or access token.",
"The bank routing number is not valid."
],
"bank_account.plaid_account_id": [
"The plaid account ID is required when plaid account details is present.",
"The plaid account ID must be a string."
],
"bank_account.plaid_access_token": [
"The plaid access token is required when plaid account details is present.",
"The plaid access token must be a string."
],
"bank_account.account_number": [
"The bank account number is required when any manual bank account field is provided.",
"The bank account number must be a string.",
"The bank account number may not be greater than 17 characters."
],
"bank_account.routing_number": [
"The bank routing number is required when any manual bank account field is provided.",
"The bank routing number must be 9 digits."
],
"bank_account.account_name": [
"The bank account name is required when any manual bank account field is provided.",
"The bank account name must be a string.",
"The bank account name may not be greater than 255 characters."
],
"bank_account.account_type": [
"The bank account type is required when any manual bank account field is provided.",
"The bank account type must be one of the followings: savings, checking"
],
"actions.account_intelligence": [
"The person first and last name are required when name match is true.",
"Name Match is only available when using Account Intelligence Version 3. Please update your request and try again."
],
"actions.account_intelligence.version": [
"The version is required when account intelligence is present.",
"The version must be a string.",
"The version must be one of the followings: v1, v2, v3"
],
"actions.account_intelligence.name_match": [
"The name match field must be true or false."
],
"person.first_name": [
"The first name must be a string.",
"The first name may not be greater than 56 characters."
],
"person.last_name": [
"The last name must be a string.",
"The last name may not be greater than 56 characters."
],
"person.email": [
"The email must be a valid email address."
],
"person.phone": [
"The phone must be a string.",
"Phone numbers should consist of 10 digits and should not contain the +1 prefix or any special characters."
],
"person.address.line_1": [
"The address line 1 is required when address is present.",
"The address line 1 must be a string.",
"The address line 1 may not be greater than 255 characters."
],
"person.address.line_2": [
"The address line 2 must be a string.",
"The address line 2 may not be greater than 255 characters."
],
"person.address.city": [
"The city name is required when address is present.",
"The city name must be a string.",
"The city name may not be greater than 56 characters.",
"The city name field only accepts letters (a-z, A-Z), numbers (0-9), hyphens (-), periods (.), apostrophes ('), and spaces."
],
"person.address.state": [
"The state is required when address is present.",
"The state must be a string.",
"The state may not be greater than 2 characters.",
"The state must be valid US state."
],
"person.address.zip": [
"The zip code is required when address is present.",
"The zip code must be a string.",
"The zip code must consist of 5 digit."
],
"merchant.name": [
"The name field is required.",
"The name must be a string.",
"The name may not be greater than 255 characters."
],
"merchant.tin": [
"The EIN (TIN) number field is required.",
"The EIN (TIN) number must be a string.",
"The EIN (TIN) number must consist of 9 digits."
],
"merchant.trading_name": [
"The trading name field is required.",
"The trading name must be a string.",
"The trading name may not be greater than 255 characters."
],
"merchant.entity_type": [
"The entity type field is required.",
"The entity type must be a string.",
"The entity type may not be greater than 255 characters."
],
"merchant.incorporation_date": [
"The incorporation date is not a valid date.",
"The incorporation date does not match the format Y-m-d."
],
"merchant.incorporation_state": [
"The incorporation state must be a string.",
"The incorporation state must be valid US state."
],
"merchant.transaction_fee_percent": [
"The transaction fee percent must be a number.",
"The transaction fee percent must be between 0 and 99.99.",
"The transaction fee percent field must have 0-2 decimal places."
],
"merchant.transaction_fee_fixed": [
"The transaction fee fixed must be at least 0.",
"The transaction fee fixed must be an integer."
],
"merchant.maximum_transaction_fee": [
"The maximum transaction fee must be at least 0.",
"The maximum transaction fee must be an integer."
],
"merchant.address_type": [
"The address type must be a string.",
"The address type may not be greater than 255 characters."
],
"merchant.address": [
"The address field is required."
],
"merchant.address.line_1": [
"The address line 1 field is required.",
"The address line 1 must be a string.",
"The address line 1 may not be greater than 255 characters."
],
"merchant.address.line_2": [
"The address line 2 must be a string.",
"The address line 2 may not be greater than 255 characters."
],
"merchant.address.city": [
"The city name field is required.",
"The city name must be a string.",
"The city name may not be greater than 56 characters.",
"The city name field only accepts letters (a-z, A-Z), numbers (0-9), hyphens (-), periods (.), apostrophes ('), and spaces."
],
"merchant.address.state": [
"The state field is required.",
"The state must be a string.",
"The state may not be greater than 2 characters.",
"The state must be valid US state."
],
"merchant.address.zip": [
"The zip code field is required.",
"The zip code must be a string.",
"The zip code must consist of 5 digit."
],
"beneficial_owners": [
"The beneficial owners field is required.",
"The beneficial owners may not have more than 5 items.",
"The total ownership percentage of all beneficial owners cannot exceed 100%."
],
"beneficial_owners.0.first_name": [
"The first name field is required.",
"The first name must be a string.",
"The first name may not be greater than 255 characters."
],
"beneficial_owners.0.last_name": [
"The last name field is required.",
"The last name must be a string.",
"The last name may not be greater than 255 characters."
],
"beneficial_owners.0.dob": [
"The date of birth field is required.",
"The date of birth is not a valid date.",
"The date of birth does not match the format Y-m-d."
],
"beneficial_owners.0.ssn9": [
"The ssn9 field is required.",
"The ssn9 must be a string.",
"The ssn9 must consist of 9 digit.",
"Social security numbers must adhere to the following constraints. The number may not begin with 000 or any value in the range of 900–999. The middle digits cannot be 00, and the ending digits cannot be 0000."
],
"beneficial_owners.0.is_beneficial_owner": [
"The is beneficial owner field is required.",
"The is beneficial owner must be true or false."
],
"beneficial_owners.0.is_director": [
"The is director field is required.",
"The is director must be true or false."
],
"beneficial_owners.0.is_significant_control_person": [
"The is significant control person field is required.",
"The is significant control person must be true or false."
],
"beneficial_owners.0.ownership_percentage": [
"The ownership percent field is required.",
"The ownership percent must be a number.",
"The ownership percent must be between 0 and 99.99.",
"The ownership percent field must have 0-2 decimal places."
],
"beneficial_owners.0.email": [
"The email field is required.",
"The email must be a valid email address."
],
"beneficial_owners.0.phone": [
"The phone field is required.",
"The phone must be a string.",
"Phone numbers should consist of 10 digits and should not contain the +1 prefix or any special characters."
],
"beneficial_owners.0.occupation": [
"The occupation field is required.",
"The occupation must be a string.",
"The occupation may not be greater than 255 characters."
],
"beneficial_owners.0.address": [
"The address field is required."
],
"beneficial_owners.0.address.line_1": [
"The address line 1 field is required.",
"The address line 1 must be a string.",
"The address line 1 may not be greater than 255 characters."
],
"beneficial_owners.0.address.line_2": [
"The address line 2 must be a string.",
"The address line 2 may not be greater than 255 characters."
],
"beneficial_owners.0.address.city": [
"The city name field is required.",
"The city name must be a string.",
"The city name may not be greater than 56 characters.",
"The city name field only accepts letters (a-z, A-Z), numbers (0-9), hyphens (-), periods (.), apostrophes ('), and spaces."
],
"beneficial_owners.0.address.state": [
"The state field is required.",
"The state must be a string.",
"The state may not be greater than 2 characters.",
"The state must be valid US state."
],
"beneficial_owners.0.address.zip": [
"The zip code field is required.",
"The zip code must be a string.",
"The zip code must consist of 5 digit."
]
},
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "There was a problem on the server and the action could not be completed. Please try again.",
"data": null,
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}Users
Onboard a new Merchant into the ACH application ( STABLE )
This endpoint allows for adding a new Merchant to the GrailPay ACH API Ecosystem.
POST
/
api
/
v3
/
merchants
Onboard a new Merchant into the ACH application ( STABLE )
curl --request POST \
--url https://api.grailpay.com/api/v3/merchants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_reference_id": "reference_12345",
"billing_merchant_uuid": "6a8fc154-1a50-483b-a690-fd1dfaf9408b",
"billing_processor_mid": "12345678",
"payout_type": "batch",
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Doe",
"dob": "2023-04-11",
"ssn9": "123456789",
"address": {
"line_1": "10554 W Quarles Ave",
"city": "Littleton",
"state": "CO",
"zip": "80127",
"line_2": "Suite 123"
},
"is_beneficial_owner": true,
"is_director": false,
"is_significant_control_person": false,
"ownership_percentage": 25,
"email": "owner@test.com",
"phone": "2457856490",
"occupation": "Co-founder"
}
],
"bank_account": {
"plaid_account_id": "<string>",
"plaid_access_token": "<string>",
"account_number": "9876543210",
"routing_number": "021000021",
"account_name": "John Doe",
"account_type": "checking"
},
"actions": {}
}
'import requests
url = "https://api.grailpay.com/api/v3/merchants"
payload = {
"client_reference_id": "reference_12345",
"billing_merchant_uuid": "6a8fc154-1a50-483b-a690-fd1dfaf9408b",
"billing_processor_mid": "12345678",
"payout_type": "batch",
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Doe",
"dob": "2023-04-11",
"ssn9": "123456789",
"address": {
"line_1": "10554 W Quarles Ave",
"city": "Littleton",
"state": "CO",
"zip": "80127",
"line_2": "Suite 123"
},
"is_beneficial_owner": True,
"is_director": False,
"is_significant_control_person": False,
"ownership_percentage": 25,
"email": "owner@test.com",
"phone": "2457856490",
"occupation": "Co-founder"
}
],
"bank_account": {
"plaid_account_id": "<string>",
"plaid_access_token": "<string>",
"account_number": "9876543210",
"routing_number": "021000021",
"account_name": "John Doe",
"account_type": "checking"
},
"actions": {}
}
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({
client_reference_id: 'reference_12345',
billing_merchant_uuid: '6a8fc154-1a50-483b-a690-fd1dfaf9408b',
billing_processor_mid: '12345678',
payout_type: 'batch',
beneficial_owners: [
{
first_name: 'Jane',
last_name: 'Doe',
dob: '2023-04-11',
ssn9: '123456789',
address: {
line_1: '10554 W Quarles Ave',
city: 'Littleton',
state: 'CO',
zip: '80127',
line_2: 'Suite 123'
},
is_beneficial_owner: true,
is_director: false,
is_significant_control_person: false,
ownership_percentage: 25,
email: 'owner@test.com',
phone: '2457856490',
occupation: 'Co-founder'
}
],
bank_account: {
plaid_account_id: '<string>',
plaid_access_token: '<string>',
account_number: '9876543210',
routing_number: '021000021',
account_name: 'John Doe',
account_type: 'checking'
},
actions: {}
})
};
fetch('https://api.grailpay.com/api/v3/merchants', 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/api/v3/merchants",
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([
'client_reference_id' => 'reference_12345',
'billing_merchant_uuid' => '6a8fc154-1a50-483b-a690-fd1dfaf9408b',
'billing_processor_mid' => '12345678',
'payout_type' => 'batch',
'beneficial_owners' => [
[
'first_name' => 'Jane',
'last_name' => 'Doe',
'dob' => '2023-04-11',
'ssn9' => '123456789',
'address' => [
'line_1' => '10554 W Quarles Ave',
'city' => 'Littleton',
'state' => 'CO',
'zip' => '80127',
'line_2' => 'Suite 123'
],
'is_beneficial_owner' => true,
'is_director' => false,
'is_significant_control_person' => false,
'ownership_percentage' => 25,
'email' => 'owner@test.com',
'phone' => '2457856490',
'occupation' => 'Co-founder'
]
],
'bank_account' => [
'plaid_account_id' => '<string>',
'plaid_access_token' => '<string>',
'account_number' => '9876543210',
'routing_number' => '021000021',
'account_name' => 'John Doe',
'account_type' => 'checking'
],
'actions' => [
]
]),
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/api/v3/merchants"
payload := strings.NewReader("{\n \"client_reference_id\": \"reference_12345\",\n \"billing_merchant_uuid\": \"6a8fc154-1a50-483b-a690-fd1dfaf9408b\",\n \"billing_processor_mid\": \"12345678\",\n \"payout_type\": \"batch\",\n \"beneficial_owners\": [\n {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"dob\": \"2023-04-11\",\n \"ssn9\": \"123456789\",\n \"address\": {\n \"line_1\": \"10554 W Quarles Ave\",\n \"city\": \"Littleton\",\n \"state\": \"CO\",\n \"zip\": \"80127\",\n \"line_2\": \"Suite 123\"\n },\n \"is_beneficial_owner\": true,\n \"is_director\": false,\n \"is_significant_control_person\": false,\n \"ownership_percentage\": 25,\n \"email\": \"owner@test.com\",\n \"phone\": \"2457856490\",\n \"occupation\": \"Co-founder\"\n }\n ],\n \"bank_account\": {\n \"plaid_account_id\": \"<string>\",\n \"plaid_access_token\": \"<string>\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"021000021\",\n \"account_name\": \"John Doe\",\n \"account_type\": \"checking\"\n },\n \"actions\": {}\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/api/v3/merchants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_reference_id\": \"reference_12345\",\n \"billing_merchant_uuid\": \"6a8fc154-1a50-483b-a690-fd1dfaf9408b\",\n \"billing_processor_mid\": \"12345678\",\n \"payout_type\": \"batch\",\n \"beneficial_owners\": [\n {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"dob\": \"2023-04-11\",\n \"ssn9\": \"123456789\",\n \"address\": {\n \"line_1\": \"10554 W Quarles Ave\",\n \"city\": \"Littleton\",\n \"state\": \"CO\",\n \"zip\": \"80127\",\n \"line_2\": \"Suite 123\"\n },\n \"is_beneficial_owner\": true,\n \"is_director\": false,\n \"is_significant_control_person\": false,\n \"ownership_percentage\": 25,\n \"email\": \"owner@test.com\",\n \"phone\": \"2457856490\",\n \"occupation\": \"Co-founder\"\n }\n ],\n \"bank_account\": {\n \"plaid_account_id\": \"<string>\",\n \"plaid_access_token\": \"<string>\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"021000021\",\n \"account_name\": \"John Doe\",\n \"account_type\": \"checking\"\n },\n \"actions\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/api/v3/merchants")
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 \"client_reference_id\": \"reference_12345\",\n \"billing_merchant_uuid\": \"6a8fc154-1a50-483b-a690-fd1dfaf9408b\",\n \"billing_processor_mid\": \"12345678\",\n \"payout_type\": \"batch\",\n \"beneficial_owners\": [\n {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"dob\": \"2023-04-11\",\n \"ssn9\": \"123456789\",\n \"address\": {\n \"line_1\": \"10554 W Quarles Ave\",\n \"city\": \"Littleton\",\n \"state\": \"CO\",\n \"zip\": \"80127\",\n \"line_2\": \"Suite 123\"\n },\n \"is_beneficial_owner\": true,\n \"is_director\": false,\n \"is_significant_control_person\": false,\n \"ownership_percentage\": 25,\n \"email\": \"owner@test.com\",\n \"phone\": \"2457856490\",\n \"occupation\": \"Co-founder\"\n }\n ],\n \"bank_account\": {\n \"plaid_account_id\": \"<string>\",\n \"plaid_access_token\": \"<string>\",\n \"account_number\": \"9876543210\",\n \"routing_number\": \"021000021\",\n \"account_name\": \"John Doe\",\n \"account_type\": \"checking\"\n },\n \"actions\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "This merchant was onboarded successfully.",
"data": {
"merchant": {
"uuid": "c6bcfbbb-98ff-4d8b-a8f5-1559c3dcb718",
"business_type": "merchant",
"kyb_status": "IN_REVIEW",
"kyb_rejected_reason": null,
"name": "Acme Inc.",
"tin": "123456789",
"trading_name": "Acme Corp",
"entity_type": "Sole Trader",
"incorporation_date": "2024-02-02",
"incorporation_state": "CO",
"address_type": "Registered",
"address": {
"line_1": "10554 W Quarles Ave",
"line_2": "Suite 123",
"city": "Littleton",
"state": "CO",
"zip": "80127"
},
"transaction_fee_percent": 2.5,
"transaction_fee_fixed": 100,
"maximum_transaction_fee": 5000,
"payout_type": "batch",
"client_reference_id": "reference_12345",
"timestamps": {
"created_at": "2024-06-25 13:57:03"
}
},
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Doe",
"dob": "2023-04-11",
"ssn9": "123456789",
"address": {
"line_1": "10554 W Quarles Ave",
"line_2": "Suite 123",
"city": "Littleton",
"state": "CO",
"zip": "80127"
},
"is_beneficial_owner": true,
"is_director": false,
"is_significant_control_person": false,
"ownership_percentage": 25,
"email": "owner@test.com",
"phone": "2457856490",
"occupation": "Co-founder",
"timestamps": {
"created_at": "2024-06-25 13:57:03"
}
}
],
"relations": {
"person": {
"uuid": "7c41f6a2-a4b9-4df8-9225-2c1b7312042e"
}
},
"account_intelligence": {
"confidence_score": 0.81,
"decisioning_insights": {
"account_duplicate": false,
"days_since_first_seen": -1,
"days_since_last_transaction": -1,
"has_negative_transactions": false,
"has_paid_transactions": false,
"has_positive_transactions": true,
"name_match": "yes",
"phone_number_present": false,
"valid_routing_number": true
},
"version": "v3"
}
},
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "Invalid Parameters Received",
"data": null,
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "Invalid token.",
"data": null,
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "The request cannot be executed due to a detected conflict with a duplicate request.",
"data": null,
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "The given data was invalid.",
"data": null,
"errors": {
"client_reference_id": [
"The client reference ID must be a string.",
"The client reference ID may not be greater than 255 characters."
],
"billing_merchant_uuid": [
"The billing merchant UUID must be a valid UUID.",
"The billing merchant UUID does not exist.",
"The billing merchant UUID is deleted and cannot be used for billing purposes."
],
"billing_processor_mid": [
"The billing processor MID must be a string.",
"The billing processor MID does not exist.",
"The billing processor MID is deleted and cannot be used for billing purposes."
],
"payout_type": [
"The payout type must be a string.",
"The payout type must be one of the followings: individual, batch"
],
"bank_account": [
"You cannot provide both plaid details and manual bank account fields.",
"This person did not meet the confidence score threshold of 0.5 and has been rejected.",
"Invalid plaid account ID or access token.",
"The bank routing number is not valid."
],
"bank_account.plaid_account_id": [
"The plaid account ID is required when plaid account details is present.",
"The plaid account ID must be a string."
],
"bank_account.plaid_access_token": [
"The plaid access token is required when plaid account details is present.",
"The plaid access token must be a string."
],
"bank_account.account_number": [
"The bank account number is required when any manual bank account field is provided.",
"The bank account number must be a string.",
"The bank account number may not be greater than 17 characters."
],
"bank_account.routing_number": [
"The bank routing number is required when any manual bank account field is provided.",
"The bank routing number must be 9 digits."
],
"bank_account.account_name": [
"The bank account name is required when any manual bank account field is provided.",
"The bank account name must be a string.",
"The bank account name may not be greater than 255 characters."
],
"bank_account.account_type": [
"The bank account type is required when any manual bank account field is provided.",
"The bank account type must be one of the followings: savings, checking"
],
"actions.account_intelligence": [
"The person first and last name are required when name match is true.",
"Name Match is only available when using Account Intelligence Version 3. Please update your request and try again."
],
"actions.account_intelligence.version": [
"The version is required when account intelligence is present.",
"The version must be a string.",
"The version must be one of the followings: v1, v2, v3"
],
"actions.account_intelligence.name_match": [
"The name match field must be true or false."
],
"person.first_name": [
"The first name must be a string.",
"The first name may not be greater than 56 characters."
],
"person.last_name": [
"The last name must be a string.",
"The last name may not be greater than 56 characters."
],
"person.email": [
"The email must be a valid email address."
],
"person.phone": [
"The phone must be a string.",
"Phone numbers should consist of 10 digits and should not contain the +1 prefix or any special characters."
],
"person.address.line_1": [
"The address line 1 is required when address is present.",
"The address line 1 must be a string.",
"The address line 1 may not be greater than 255 characters."
],
"person.address.line_2": [
"The address line 2 must be a string.",
"The address line 2 may not be greater than 255 characters."
],
"person.address.city": [
"The city name is required when address is present.",
"The city name must be a string.",
"The city name may not be greater than 56 characters.",
"The city name field only accepts letters (a-z, A-Z), numbers (0-9), hyphens (-), periods (.), apostrophes ('), and spaces."
],
"person.address.state": [
"The state is required when address is present.",
"The state must be a string.",
"The state may not be greater than 2 characters.",
"The state must be valid US state."
],
"person.address.zip": [
"The zip code is required when address is present.",
"The zip code must be a string.",
"The zip code must consist of 5 digit."
],
"merchant.name": [
"The name field is required.",
"The name must be a string.",
"The name may not be greater than 255 characters."
],
"merchant.tin": [
"The EIN (TIN) number field is required.",
"The EIN (TIN) number must be a string.",
"The EIN (TIN) number must consist of 9 digits."
],
"merchant.trading_name": [
"The trading name field is required.",
"The trading name must be a string.",
"The trading name may not be greater than 255 characters."
],
"merchant.entity_type": [
"The entity type field is required.",
"The entity type must be a string.",
"The entity type may not be greater than 255 characters."
],
"merchant.incorporation_date": [
"The incorporation date is not a valid date.",
"The incorporation date does not match the format Y-m-d."
],
"merchant.incorporation_state": [
"The incorporation state must be a string.",
"The incorporation state must be valid US state."
],
"merchant.transaction_fee_percent": [
"The transaction fee percent must be a number.",
"The transaction fee percent must be between 0 and 99.99.",
"The transaction fee percent field must have 0-2 decimal places."
],
"merchant.transaction_fee_fixed": [
"The transaction fee fixed must be at least 0.",
"The transaction fee fixed must be an integer."
],
"merchant.maximum_transaction_fee": [
"The maximum transaction fee must be at least 0.",
"The maximum transaction fee must be an integer."
],
"merchant.address_type": [
"The address type must be a string.",
"The address type may not be greater than 255 characters."
],
"merchant.address": [
"The address field is required."
],
"merchant.address.line_1": [
"The address line 1 field is required.",
"The address line 1 must be a string.",
"The address line 1 may not be greater than 255 characters."
],
"merchant.address.line_2": [
"The address line 2 must be a string.",
"The address line 2 may not be greater than 255 characters."
],
"merchant.address.city": [
"The city name field is required.",
"The city name must be a string.",
"The city name may not be greater than 56 characters.",
"The city name field only accepts letters (a-z, A-Z), numbers (0-9), hyphens (-), periods (.), apostrophes ('), and spaces."
],
"merchant.address.state": [
"The state field is required.",
"The state must be a string.",
"The state may not be greater than 2 characters.",
"The state must be valid US state."
],
"merchant.address.zip": [
"The zip code field is required.",
"The zip code must be a string.",
"The zip code must consist of 5 digit."
],
"beneficial_owners": [
"The beneficial owners field is required.",
"The beneficial owners may not have more than 5 items.",
"The total ownership percentage of all beneficial owners cannot exceed 100%."
],
"beneficial_owners.0.first_name": [
"The first name field is required.",
"The first name must be a string.",
"The first name may not be greater than 255 characters."
],
"beneficial_owners.0.last_name": [
"The last name field is required.",
"The last name must be a string.",
"The last name may not be greater than 255 characters."
],
"beneficial_owners.0.dob": [
"The date of birth field is required.",
"The date of birth is not a valid date.",
"The date of birth does not match the format Y-m-d."
],
"beneficial_owners.0.ssn9": [
"The ssn9 field is required.",
"The ssn9 must be a string.",
"The ssn9 must consist of 9 digit.",
"Social security numbers must adhere to the following constraints. The number may not begin with 000 or any value in the range of 900–999. The middle digits cannot be 00, and the ending digits cannot be 0000."
],
"beneficial_owners.0.is_beneficial_owner": [
"The is beneficial owner field is required.",
"The is beneficial owner must be true or false."
],
"beneficial_owners.0.is_director": [
"The is director field is required.",
"The is director must be true or false."
],
"beneficial_owners.0.is_significant_control_person": [
"The is significant control person field is required.",
"The is significant control person must be true or false."
],
"beneficial_owners.0.ownership_percentage": [
"The ownership percent field is required.",
"The ownership percent must be a number.",
"The ownership percent must be between 0 and 99.99.",
"The ownership percent field must have 0-2 decimal places."
],
"beneficial_owners.0.email": [
"The email field is required.",
"The email must be a valid email address."
],
"beneficial_owners.0.phone": [
"The phone field is required.",
"The phone must be a string.",
"Phone numbers should consist of 10 digits and should not contain the +1 prefix or any special characters."
],
"beneficial_owners.0.occupation": [
"The occupation field is required.",
"The occupation must be a string.",
"The occupation may not be greater than 255 characters."
],
"beneficial_owners.0.address": [
"The address field is required."
],
"beneficial_owners.0.address.line_1": [
"The address line 1 field is required.",
"The address line 1 must be a string.",
"The address line 1 may not be greater than 255 characters."
],
"beneficial_owners.0.address.line_2": [
"The address line 2 must be a string.",
"The address line 2 may not be greater than 255 characters."
],
"beneficial_owners.0.address.city": [
"The city name field is required.",
"The city name must be a string.",
"The city name may not be greater than 56 characters.",
"The city name field only accepts letters (a-z, A-Z), numbers (0-9), hyphens (-), periods (.), apostrophes ('), and spaces."
],
"beneficial_owners.0.address.state": [
"The state field is required.",
"The state must be a string.",
"The state may not be greater than 2 characters.",
"The state must be valid US state."
],
"beneficial_owners.0.address.zip": [
"The zip code field is required.",
"The zip code must be a string.",
"The zip code must consist of 5 digit."
]
},
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}{
"status": false,
"message": "There was a problem on the server and the action could not be completed. Please try again.",
"data": null,
"errors": null,
"request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}Authorizations
Token-based authentication using Authorization: Bearer <YOUR_API_KEY> provided by the GrailPay Support Team.
Body
application/json
Example:
"reference_12345"
Example:
"6a8fc154-1a50-483b-a690-fd1dfaf9408b"
Example:
"12345678"
Available options:
batch, individual Example:
"batch"
Schema for a person request object
Show child attributes
Show child attributes
Schema for a merchant request object
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
