api_keyinstance_idgranted_permissions
Choose the right Cloud API
Custom Apps usually use these Cloud APIs.
All requests use the Cloud base URL:
Authorization header:
instance_id in the URL:
instance_id in the JSON body.
Quick reference
- Using the Proxy API
- Using the Filters API
- Using the Data Lake API
- Other Cloud features
Use the proxy when your app wants to create or update Core resources through Cloud. The format is:The path must be a registered Proxy route. Cloud does not forward every Core endpoint. You cannot list ledgers or fetch a balance, transaction, or identity by ID through the proxy. Use the Filters API for those reads.For example, creating a transaction on Core:becomes:A complete request via the Cloud Proxy looks like:
Using the proxy
Registered routes and request shapes.
Example application
Let’s apply this to build the Stripe Sync workflow we mapped earlier.1
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.2
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.3
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
Reference Stripe sync implementation.