Documentation Index
Fetch the complete documentation index at: https://docs.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.
api_keyinstance_idgranted_permissions
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. |
| Other Cloud features | Use Cloud features that are not Core endpoints, such as alerts. |
Authorization header:
instance_id in the URL:
Quick reference
- Using the Proxy API
- Using the Data API
- Other Cloud features
Use the proxy when your app wants to call Blnk Core through Cloud. The format is:The With the Cloud Proxy, it becomes:A complete request via the Cloud Proxy would look like:
<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:bash
Using the proxy
Learn more about how the proxy works and see all the available endpoints.
Example application
Let’s apply this to build the Stripe Sync workflow we mapped earlier.Fetch pay-ins from Stripe
First, we’ll list pay-ins from Stripe and keep only the ones that have actually settled (Filtering on
status === "succeeded"):fetchStripePayIns.ts
status === "succeeded" ensures we only import pay-ins that have actually settled into your Stripe balance — anything still pending, requiring action, or canceled is skipped.Send the pay-in to Blnk
Next, we’ll mirror the Stripe pay-in as a transaction in the selected Blnk Cloud instance through the Proxy API:We’ll use the Stripe payment intent ID directly as the
sendPayInToBlnk.ts
reference in Blnk. Re-syncing the same payment intent will not create a duplicate transaction in Blnk because Blnk handles idempotency internally.Save the sync details in your app
Finally, we’ll record the sync run in the app’s local database so we know when the sync ran, how many pay-ins it processed, and whether it succeeded:Call this once per sync run (after Step 2 completes for the whole batch) so each row represents one end-to-end sync, not each individual pay-in. The link back to specific Blnk transactions is already preserved by the
saveSyncRecord.ts
meta_data.stripe_payment_intent_id written in Step 2.Run the example Stripe Sync app
Open the demo repository and follow its README to run the Stripe Sync example app this documentation is built around.