Documentation Index Fetch the complete documentation index at: https://guide.cloud.blnkfinance.com/llms.txt
Use this file to discover all available pages before exploring further.
This feature is in private beta. If you want access, please contact Support .
After installation, your app now has what it needs to work with the selected Cloud instance. The important values come from the install record you saved earlier:
api_key
instance_id
granted_permissions
Your backend should use those values to decide which instance to call, what key to use, and what actions the app is allowed to perform.
For our KYC app, this is where the backend starts doing the review work: reading identities, checking their KYC status, saving the result, and creating alerts when a record needs manual review.
Choose the right Cloud API
Custom Apps usually use three classes of Cloud APIs.
API When to use it Data API Read and filter ledger data through Cloud. Proxy API Perform Core actions through Cloud. Direct Cloud endpoints Use Cloud features that are not Core endpoints, such as alerts.
All requests use the Cloud base URL:
https://api.cloud.blnkfinance.com
The installed app API key goes in the Authorization header:
Authorization: Bearer < api_ke y >
For Proxy and Data API requests, include the selected instance_id in the URL:
? instance_id =< instance_id >
Quick reference
Use the proxy when your app wants to call Blnk Core through Cloud. The format is: https://api.cloud.blnkfinance.com/proxy/ <core-endpoint>?instance_id=<instance_id>
The <core-endpoint> is the same endpoint you would normally call on Core, but with /proxy in front of it. For example, on Core, the request would look like this: List ledgers
Create transactions
GET http://localhost:5001/ledgers
With the Cloud Proxy, it becomes: List ledgers
Create transactions
GET https://api.cloud.blnkfinance.com/proxy/ledgers?instance_id=inst_...
A complete request via the Cloud Proxy would look like: curl -X GET "https://api.cloud.blnkfinance.com/proxy/ledgers?instance_id=inst_..." \
-H "Authorization: Bearer blnk_..." \
-H "Content-Type: application/json"
Using the proxy Learn more about how the proxy works and see all the available endpoints.
Use the Data API when your app needs to read or filter ledger data through Cloud. The format is: https://api.cloud.blnkfinance.com/data/ <resource>?instance_id=<instance_id>
For example, to read transactions: curl -X GET "https://api.cloud.blnkfinance.com/data/transactions?instance_id=inst_..." \
-H "Authorization: Bearer blnk_..." \
-H "Content-Type: application/json"
You can also add filters to the query string: curl -X GET "https://api.cloud.blnkfinance.com/data/transactions?instance_id=inst_...&status_eq=APPLIED¤cy_eq=USD" \
-H "Authorization: Bearer blnk_..." \
-H "Content-Type: application/json"
Using the data API Learn more about how the data API works and see all the available operations.
Use direct Cloud endpoints for features that belong to Cloud itself. Alerts are a good example. You do not call alerts through /proxy or /data. You call the Alerts API directly. https://api.cloud.blnkfinance.com/alerts/flag/ <resource_id>
Example application
Let’s apply this to build the KYC app workflow we mapped earlier.
Retrieve an identity to review First, we’ll retrieve an identity to review: async function fetchIdentityDetailsForReview ( instance_id : string ) {
const headers = {
Authorization: `Bearer ${ api_key } ` ,
"Content-Type" : "application/json" ,
};
const response = await axios . get (
`https://api.cloud.blnkfinance.com/proxy/identities?instance_id= ${ instance_id } ` ,
{ headers }
);
return response . data ;
}
Send identity details to a KYC provider Next, we’ll send the identity details to a KYC provider for verification: sendIdentityDetailsToKYCProvider.ts
async function sendIdentityDetailsToKYCProvider ( identity ) {
const response = await axios . post ( `https://api.kycprovider.com/v1/verify` , {
first_name: identity . first_name ,
last_name: identity . last_name ,
nationality: identity . nationality ,
gender: identity . gender ,
dob: identity . dob ,
street: identity . street ,
city: identity . city ,
state: identity . state ,
post_code: identity . post_code ,
country: identity . country ,
id_document: identity . meta_data . id_document ,
id_document_type: identity . meta_data . id_document_type ,
id_document_number: identity . meta_data . id_document_number
});
const verifyResult : { status : string ; message : string } = response . data ;
return verifyResult ;
}
Save the KYC result Finally, we’ll save the KYC result to the identity metadata: async function saveKYCResult ( identity_id , kyc_result ) {
const headers = {
Authorization: `Bearer ${ api_key } ` ,
"Content-Type" : "application/json" ,
};
const response = await axios . post (
`https://api.cloud.blnkfinance.com/proxy/ ${ identity_id } /metadata?instance_id= ${ instance_id } ` ,
{ meta_data: { kyc_result } },
{ headers }
);
return response . data ;
}
Create an alert if the KYC result is not successful If the KYC result is not successful, we’ll create an alert instead: async function createAlert ( identity_id , kyc_result ) {
const headers = {
Authorization: `Bearer ${ api_key } ` ,
"Content-Type" : "application/json" ,
};
const response = await axios . post (
`https://api.cloud.blnkfinance.com/alerts/flag/ ${ identity_id } ` ,
{
title: "KYC verification failed" ,
description: ` ${ kyc_result . message } ` ,
},
{ headers }
);
return response . data ;
}
Run the example KYC app Open the demo repository and follow its README to run the KYC example app this documentation is built around.
Need help?
If you’re having trouble with Blnk Cloud, don’t hesitate to send us a message via email at support@blnkfinance.com or send us a message here .