Update Business KYB ( SUNSETTING )
curl --request POST \
--url https://api.grailpay.com/3p/api/v2/users/{uuid}/kyb \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "John",
"last_name": "Doe",
"email": "",
"phone": "",
"business": {
"name": "Business Name",
"tin": "123456789",
"trading_name": "Business Trading Name",
"entity_type": "",
"incorporation_date": "2021-01-01",
"incorporation_state": "CO",
"industry": "",
"industry_classification": {
"code_type": "",
"codes": [
"<string>"
],
"description": ""
},
"source_of_wealth": "",
"source_of_funds": "",
"first_transaction_completed_at": "2021-01-01 00:00:00",
"product_type": "",
"registered_as_inactive": false,
"address_type": ""
},
"billing_merchant_user_uuid": "123e4567-e89b-12d3-a456-426614174000",
"billing_processor_mid": "1234567890"
}
'import requests
url = "https://api.grailpay.com/3p/api/v2/users/{uuid}/kyb"
payload = {
"first_name": "John",
"last_name": "Doe",
"email": "",
"phone": "",
"business": {
"name": "Business Name",
"tin": "123456789",
"trading_name": "Business Trading Name",
"entity_type": "",
"incorporation_date": "2021-01-01",
"incorporation_state": "CO",
"industry": "",
"industry_classification": {
"code_type": "",
"codes": ["<string>"],
"description": ""
},
"source_of_wealth": "",
"source_of_funds": "",
"first_transaction_completed_at": "2021-01-01 00:00:00",
"product_type": "",
"registered_as_inactive": False,
"address_type": ""
},
"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({
first_name: 'John',
last_name: 'Doe',
email: '',
phone: '',
business: {
name: 'Business Name',
tin: '123456789',
trading_name: 'Business Trading Name',
entity_type: '',
incorporation_date: '2021-01-01',
incorporation_state: 'CO',
industry: '',
industry_classification: {code_type: '', codes: ['<string>'], description: ''},
source_of_wealth: '',
source_of_funds: '',
first_transaction_completed_at: '2021-01-01 00:00:00',
product_type: '',
registered_as_inactive: false,
address_type: ''
},
billing_merchant_user_uuid: '123e4567-e89b-12d3-a456-426614174000',
billing_processor_mid: '1234567890'
})
};
fetch('https://api.grailpay.com/3p/api/v2/users/{uuid}/kyb', 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}/kyb",
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([
'first_name' => 'John',
'last_name' => 'Doe',
'email' => '',
'phone' => '',
'business' => [
'name' => 'Business Name',
'tin' => '123456789',
'trading_name' => 'Business Trading Name',
'entity_type' => '',
'incorporation_date' => '2021-01-01',
'incorporation_state' => 'CO',
'industry' => '',
'industry_classification' => [
'code_type' => '',
'codes' => [
'<string>'
],
'description' => ''
],
'source_of_wealth' => '',
'source_of_funds' => '',
'first_transaction_completed_at' => '2021-01-01 00:00:00',
'product_type' => '',
'registered_as_inactive' => false,
'address_type' => ''
],
'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/v2/users/{uuid}/kyb"
payload := strings.NewReader("{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"\",\n \"phone\": \"\",\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\",\n \"trading_name\": \"Business Trading Name\",\n \"entity_type\": \"\",\n \"incorporation_date\": \"2021-01-01\",\n \"incorporation_state\": \"CO\",\n \"industry\": \"\",\n \"industry_classification\": {\n \"code_type\": \"\",\n \"codes\": [\n \"<string>\"\n ],\n \"description\": \"\"\n },\n \"source_of_wealth\": \"\",\n \"source_of_funds\": \"\",\n \"first_transaction_completed_at\": \"2021-01-01 00:00:00\",\n \"product_type\": \"\",\n \"registered_as_inactive\": false,\n \"address_type\": \"\"\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/v2/users/{uuid}/kyb")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"\",\n \"phone\": \"\",\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\",\n \"trading_name\": \"Business Trading Name\",\n \"entity_type\": \"\",\n \"incorporation_date\": \"2021-01-01\",\n \"incorporation_state\": \"CO\",\n \"industry\": \"\",\n \"industry_classification\": {\n \"code_type\": \"\",\n \"codes\": [\n \"<string>\"\n ],\n \"description\": \"\"\n },\n \"source_of_wealth\": \"\",\n \"source_of_funds\": \"\",\n \"first_transaction_completed_at\": \"2021-01-01 00:00:00\",\n \"product_type\": \"\",\n \"registered_as_inactive\": false,\n \"address_type\": \"\"\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/v2/users/{uuid}/kyb")
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 \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"\",\n \"phone\": \"\",\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\",\n \"trading_name\": \"Business Trading Name\",\n \"entity_type\": \"\",\n \"incorporation_date\": \"2021-01-01\",\n \"incorporation_state\": \"CO\",\n \"industry\": \"\",\n \"industry_classification\": {\n \"code_type\": \"\",\n \"codes\": [\n \"<string>\"\n ],\n \"description\": \"\"\n },\n \"source_of_wealth\": \"\",\n \"source_of_funds\": \"\",\n \"first_transaction_completed_at\": \"2021-01-01 00:00:00\",\n \"product_type\": \"\",\n \"registered_as_inactive\": false,\n \"address_type\": \"\"\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 ( SUNSETTING )
This Endpoint is Sunsetting and you should use the stable endpoint. Sunsetting APIs that are still supported but scheduled for deprecation.
POST
/
3p
/
api
/
v2
/
users
/
{uuid}
/
kyb
Update Business KYB ( SUNSETTING )
curl --request POST \
--url https://api.grailpay.com/3p/api/v2/users/{uuid}/kyb \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "John",
"last_name": "Doe",
"email": "",
"phone": "",
"business": {
"name": "Business Name",
"tin": "123456789",
"trading_name": "Business Trading Name",
"entity_type": "",
"incorporation_date": "2021-01-01",
"incorporation_state": "CO",
"industry": "",
"industry_classification": {
"code_type": "",
"codes": [
"<string>"
],
"description": ""
},
"source_of_wealth": "",
"source_of_funds": "",
"first_transaction_completed_at": "2021-01-01 00:00:00",
"product_type": "",
"registered_as_inactive": false,
"address_type": ""
},
"billing_merchant_user_uuid": "123e4567-e89b-12d3-a456-426614174000",
"billing_processor_mid": "1234567890"
}
'import requests
url = "https://api.grailpay.com/3p/api/v2/users/{uuid}/kyb"
payload = {
"first_name": "John",
"last_name": "Doe",
"email": "",
"phone": "",
"business": {
"name": "Business Name",
"tin": "123456789",
"trading_name": "Business Trading Name",
"entity_type": "",
"incorporation_date": "2021-01-01",
"incorporation_state": "CO",
"industry": "",
"industry_classification": {
"code_type": "",
"codes": ["<string>"],
"description": ""
},
"source_of_wealth": "",
"source_of_funds": "",
"first_transaction_completed_at": "2021-01-01 00:00:00",
"product_type": "",
"registered_as_inactive": False,
"address_type": ""
},
"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({
first_name: 'John',
last_name: 'Doe',
email: '',
phone: '',
business: {
name: 'Business Name',
tin: '123456789',
trading_name: 'Business Trading Name',
entity_type: '',
incorporation_date: '2021-01-01',
incorporation_state: 'CO',
industry: '',
industry_classification: {code_type: '', codes: ['<string>'], description: ''},
source_of_wealth: '',
source_of_funds: '',
first_transaction_completed_at: '2021-01-01 00:00:00',
product_type: '',
registered_as_inactive: false,
address_type: ''
},
billing_merchant_user_uuid: '123e4567-e89b-12d3-a456-426614174000',
billing_processor_mid: '1234567890'
})
};
fetch('https://api.grailpay.com/3p/api/v2/users/{uuid}/kyb', 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}/kyb",
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([
'first_name' => 'John',
'last_name' => 'Doe',
'email' => '',
'phone' => '',
'business' => [
'name' => 'Business Name',
'tin' => '123456789',
'trading_name' => 'Business Trading Name',
'entity_type' => '',
'incorporation_date' => '2021-01-01',
'incorporation_state' => 'CO',
'industry' => '',
'industry_classification' => [
'code_type' => '',
'codes' => [
'<string>'
],
'description' => ''
],
'source_of_wealth' => '',
'source_of_funds' => '',
'first_transaction_completed_at' => '2021-01-01 00:00:00',
'product_type' => '',
'registered_as_inactive' => false,
'address_type' => ''
],
'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/v2/users/{uuid}/kyb"
payload := strings.NewReader("{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"\",\n \"phone\": \"\",\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\",\n \"trading_name\": \"Business Trading Name\",\n \"entity_type\": \"\",\n \"incorporation_date\": \"2021-01-01\",\n \"incorporation_state\": \"CO\",\n \"industry\": \"\",\n \"industry_classification\": {\n \"code_type\": \"\",\n \"codes\": [\n \"<string>\"\n ],\n \"description\": \"\"\n },\n \"source_of_wealth\": \"\",\n \"source_of_funds\": \"\",\n \"first_transaction_completed_at\": \"2021-01-01 00:00:00\",\n \"product_type\": \"\",\n \"registered_as_inactive\": false,\n \"address_type\": \"\"\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/v2/users/{uuid}/kyb")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"\",\n \"phone\": \"\",\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\",\n \"trading_name\": \"Business Trading Name\",\n \"entity_type\": \"\",\n \"incorporation_date\": \"2021-01-01\",\n \"incorporation_state\": \"CO\",\n \"industry\": \"\",\n \"industry_classification\": {\n \"code_type\": \"\",\n \"codes\": [\n \"<string>\"\n ],\n \"description\": \"\"\n },\n \"source_of_wealth\": \"\",\n \"source_of_funds\": \"\",\n \"first_transaction_completed_at\": \"2021-01-01 00:00:00\",\n \"product_type\": \"\",\n \"registered_as_inactive\": false,\n \"address_type\": \"\"\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/v2/users/{uuid}/kyb")
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 \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"\",\n \"phone\": \"\",\n \"business\": {\n \"name\": \"Business Name\",\n \"tin\": \"123456789\",\n \"trading_name\": \"Business Trading Name\",\n \"entity_type\": \"\",\n \"incorporation_date\": \"2021-01-01\",\n \"incorporation_state\": \"CO\",\n \"industry\": \"\",\n \"industry_classification\": {\n \"code_type\": \"\",\n \"codes\": [\n \"<string>\"\n ],\n \"description\": \"\"\n },\n \"source_of_wealth\": \"\",\n \"source_of_funds\": \"\",\n \"first_transaction_completed_at\": \"2021-01-01 00:00:00\",\n \"product_type\": \"\",\n \"registered_as_inactive\": false,\n \"address_type\": \"\"\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
Example:
"John"
Example:
"Doe"
Example:
""
Example:
""
Show child attributes
Show child attributes
Example:
"123e4567-e89b-12d3-a456-426614174000"
Example:
"1234567890"
⌘I
