Update Business KYB ( DEPRECATED )
curl --request POST \
--url https://api.grailpay.com/3p/api/v1/user/kyb/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"business": {
"name": "Business Name",
"tin": "123456789"
},
"address": {
"line_1": "123 Main St",
"city": "Denver",
"state": "CO",
"zip": "80202",
"line_2": "Apt 1"
},
"billing_merchant_user_uuid": "123e4567-e89b-12d3-a456-426614174000",
"billing_processor_mid": "1234567890"
}
'import requests
url = "https://api.grailpay.com/3p/api/v1/user/kyb/{uuid}"
payload = {
"business": {
"name": "Business Name",
"tin": "123456789"
},
"address": {
"line_1": "123 Main St",
"city": "Denver",
"state": "CO",
"zip": "80202",
"line_2": "Apt 1"
},
"billing_merchant_user_uuid": "123e4567-e89b-12d3-a456-426614174000",
"billing_processor_mid": "1234567890"
}
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({
business: {name: 'Business Name', tin: '123456789'},
address: {
line_1: '123 Main St',
city: 'Denver',
state: 'CO',
zip: '80202',
line_2: 'Apt 1'
},
billing_merchant_user_uuid: '123e4567-e89b-12d3-a456-426614174000',
billing_processor_mid: '1234567890'
})
};
fetch('https://api.grailpay.com/3p/api/v1/user/kyb/{uuid}', 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/v1/user/kyb/{uuid}",
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([
'business' => [
'name' => 'Business Name',
'tin' => '123456789'
],
'address' => [
'line_1' => '123 Main St',
'city' => 'Denver',
'state' => 'CO',
'zip' => '80202',
'line_2' => 'Apt 1'
],
'billing_merchant_user_uuid' => '123e4567-e89b-12d3-a456-426614174000',
'billing_processor_mid' => '1234567890'
]),
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/v1/user/kyb/{uuid}"
payload := strings.NewReader("{\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\"\n },\n \"address\": {\n \"line_1\": \"123 Main St\",\n \"city\": \"Denver\",\n \"state\": \"CO\",\n \"zip\": \"80202\",\n \"line_2\": \"Apt 1\"\n },\n \"billing_merchant_user_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"billing_processor_mid\": \"1234567890\"\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/v1/user/kyb/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\"\n },\n \"address\": {\n \"line_1\": \"123 Main St\",\n \"city\": \"Denver\",\n \"state\": \"CO\",\n \"zip\": \"80202\",\n \"line_2\": \"Apt 1\"\n },\n \"billing_merchant_user_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"billing_processor_mid\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/3p/api/v1/user/kyb/{uuid}")
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 \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\"\n },\n \"address\": {\n \"line_1\": \"123 Main St\",\n \"city\": \"Denver\",\n \"state\": \"CO\",\n \"zip\": \"80202\",\n \"line_2\": \"Apt 1\"\n },\n \"billing_merchant_user_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"billing_processor_mid\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "The business KYB has been updated.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "Invalid token.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "Only business users are allowed to update KYB.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "User not found.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "The requested billing merchant user uuid does not exist.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "The given data was invalid.",
"data": null,
"errors": {
"first_name": [
"The tin is required."
]
},
"error_code": null
}Users
Update Business KYB ( DEPRECATED )
This Endpoint is deprecated. Deprecated APIs that are no longer supported and should be removed from your integration. Please use the Stable version for your integration.
POST
/
3p
/
api
/
v1
/
user
/
kyb
/
{uuid}
Update Business KYB ( DEPRECATED )
curl --request POST \
--url https://api.grailpay.com/3p/api/v1/user/kyb/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"business": {
"name": "Business Name",
"tin": "123456789"
},
"address": {
"line_1": "123 Main St",
"city": "Denver",
"state": "CO",
"zip": "80202",
"line_2": "Apt 1"
},
"billing_merchant_user_uuid": "123e4567-e89b-12d3-a456-426614174000",
"billing_processor_mid": "1234567890"
}
'import requests
url = "https://api.grailpay.com/3p/api/v1/user/kyb/{uuid}"
payload = {
"business": {
"name": "Business Name",
"tin": "123456789"
},
"address": {
"line_1": "123 Main St",
"city": "Denver",
"state": "CO",
"zip": "80202",
"line_2": "Apt 1"
},
"billing_merchant_user_uuid": "123e4567-e89b-12d3-a456-426614174000",
"billing_processor_mid": "1234567890"
}
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({
business: {name: 'Business Name', tin: '123456789'},
address: {
line_1: '123 Main St',
city: 'Denver',
state: 'CO',
zip: '80202',
line_2: 'Apt 1'
},
billing_merchant_user_uuid: '123e4567-e89b-12d3-a456-426614174000',
billing_processor_mid: '1234567890'
})
};
fetch('https://api.grailpay.com/3p/api/v1/user/kyb/{uuid}', 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/v1/user/kyb/{uuid}",
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([
'business' => [
'name' => 'Business Name',
'tin' => '123456789'
],
'address' => [
'line_1' => '123 Main St',
'city' => 'Denver',
'state' => 'CO',
'zip' => '80202',
'line_2' => 'Apt 1'
],
'billing_merchant_user_uuid' => '123e4567-e89b-12d3-a456-426614174000',
'billing_processor_mid' => '1234567890'
]),
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/v1/user/kyb/{uuid}"
payload := strings.NewReader("{\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\"\n },\n \"address\": {\n \"line_1\": \"123 Main St\",\n \"city\": \"Denver\",\n \"state\": \"CO\",\n \"zip\": \"80202\",\n \"line_2\": \"Apt 1\"\n },\n \"billing_merchant_user_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"billing_processor_mid\": \"1234567890\"\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/v1/user/kyb/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\"\n },\n \"address\": {\n \"line_1\": \"123 Main St\",\n \"city\": \"Denver\",\n \"state\": \"CO\",\n \"zip\": \"80202\",\n \"line_2\": \"Apt 1\"\n },\n \"billing_merchant_user_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"billing_processor_mid\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/3p/api/v1/user/kyb/{uuid}")
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 \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\"\n },\n \"address\": {\n \"line_1\": \"123 Main St\",\n \"city\": \"Denver\",\n \"state\": \"CO\",\n \"zip\": \"80202\",\n \"line_2\": \"Apt 1\"\n },\n \"billing_merchant_user_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"billing_processor_mid\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "The business KYB has been updated.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "Invalid token.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "Only business users are allowed to update KYB.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "User not found.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "The requested billing merchant user uuid does not exist.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "The given data was invalid.",
"data": null,
"errors": {
"first_name": [
"The tin is required."
]
},
"error_code": null
}Authorizations
Token-based authentication using Authorization: Bearer <YOUR_API_KEY> provided by the GrailPay Support Team.
Path Parameters
UUID of the user
Body
application/json
⌘I
