SDKs and CLI
Libraries and a command-line tool that handle the parts every integration gets wrong:
- sign-in and token refresh;
- safe retries, and idempotency keys on every payment;
- clear errors;
- checking webhook signatures.
During the sandbox they are shared with partners on request. Ask for them when you get sandbox access.
| Package | For | Version |
|---|---|---|
| TypeScript SDK | Node 20+ for the client-credentials example; keep service secrets server-side | 0.1.1 |
| Java SDK | Java 17+, no dependencies | 0.1.1 |
liquid CLI |
Your terminal and your CI | 0.1.1 |
| LIQUID specs | OpenAPI 3.1, AsyncAPI 3.0 for webhooks, bank bundle schemas and linter | 1.0.0-sandbox |
TypeScript
import { Liquid, PermissionError, verifyWebhook } from "@bridge-liquid/liquid-sdk";
const liquid = new Liquid({ clientId: process.env.LIQUID_CLIENT_ID!, clientSecret: process.env.LIQUID_CLIENT_SECRET! });
const [org] = await liquid.orgs.list();
const position = await liquid.orgs.dashboard(org.id); // cash now, committed in and out
// As a maker: request a payment. Someone else in your organisation approves it.
await liquid.payments.create({ connectionId, counterpartyId, amount: 250000, note: "INV-1042" }, { idempotencyKey: "bill-1042" });
// In your webhook handler, with the raw body:
const event = await verifyWebhook(process.env.LIQUID_WEBHOOK_SECRET!, rawBody, req.headers["liquid-signature"]);
Errors come back typed:
AuthError(401);PermissionError(403, for example a maker approving their own payment);ValidationError;ConflictError;RateLimitError, which carriesretryAfterSeconds;ServerError.
Reads are retried on 429, 5xx and network errors. Payments and other writes are retried only after a 429, because the gateway refused those before anything was created.
The sandbox does not yet de-duplicate by Idempotency-Key. Sending the same payment twice creates two payment requests, though each still needs approval. After a 5xx or a timeout, check the payment list before you try again.
Java
LiquidClient liquid = LiquidClient.fromEnv(); // LIQUID_CLIENT_ID, LIQUID_CLIENT_SECRET
Object position = liquid.position(orgId);
liquid.createPayment(Map.of("connectionId", conn, "counterpartyId", cp, "amount", 250000, "note", "INV-1042"), "bill-1042");
Map<String, Object> event = Webhooks.verify(secret, rawBody, request.getHeader("liquid-signature"));
Typed models can be generated from the OpenAPI spec with OpenAPI Generator. The client stays the entry point.
CLI
liquid login # your org's client ID and secret; the secret is never printed
liquid orgs
liquid payments list
liquid payments create --connection <id> --counterparty <id> --amount 25000 --note "INV-1042" --key bill-1042
liquid listen # check webhooks locally; or `liquid listen --poll`, which needs no public URL
liquid bundle lint ./my-bank # bank teams: check a connector bundle
liquid test run --app-cmd "node my-task.js" --webhook-url https://your-host/liquid/webhook
Saved credentials are readable only by you. Environment variables override them.
LIQUID-ready test pack
Run liquid test run before you ask for production access. It runs your app against a local copy of the API that answers with rate limits and a refused approval, then sends signed and tampered webhooks to your endpoint.
| Area | It checks that your app |
|---|---|
| Sign-in | Uses client credentials and reuses the token. |
| Idempotency | Sends an Idempotency-Key on payments, retries only after a 429, and uses the same key when it does. |
| Errors | Waits for Retry-After and does not hammer the API. |
| Maker-checker | Accepts a 403 when a maker tries to approve, and does not retry it. |
| Secrets | Never writes the client secret, webhook secret or token to its output or logs. |
| Webhooks | Answers 2xx within 5 s, handles duplicates, and rejects bad, changed, stale or unsigned deliveries. |
Pass every check and your app is LIQUID-ready.
Licences
| What | Licence |
|---|---|
| SDKs, CLI, specs, samples, the bank bundle format and linter, the test pack, and this sandbox kit | Apache-2.0: use, change and ship them in your own products. |
| Bank connector (bankhub) and signing service (signer) | Business Source License 1.1. Free for development, testing and sandbox use; production use needs a licence from Bridge Intelligence. Each version becomes Apache-2.0 three years after release. |
| The LIQUID platform, apps and consoles | Proprietary. Used under your agreement with Bridge Intelligence. |