Brindlemark Sandbox API · Explanation

The Brindlemark Sandbox API

A GraphQL API for a fictional embedded-banking platform: onboard a company, open a payment account, send a SEPA credit transfer and receive signed webhooks. Every example on these pages is recorded from the sandbox on each build.

Fictional sandbox. An independent demonstration with fictional data. It isn’t affiliated with or endorsed by Swan or any bank, and it isn’t legal advice.

Brindlemark is a fictional embedded-banking platform. A software company, which these pages call the platform, uses its API to onboard business customers, open euro payment accounts for them, send SEPA credit transfers from those accounts, and hear about every change through signed webhooks.

I built the Brindlemark sandbox to write the documentation on these pages. It runs on your own computer, keeps everything in memory and moves no money. Brindlemark isn't a bank, and every company, account and IBAN in the sandbox is invented.

How It Fits Together#

How a payment moves through the Brindlemark sandboxYour platform's server gets an access token with POST /oauth/token. With the token, it onboards a company as an account holder (onboardCompany), whose verification goes from PENDING to VERIFIED; opens a payment account with a fictional IBAN for it (openAccount); and sends a SEPA credit transfer from that account (initiateCreditTransfer), which goes from INITIATED to BOOKED. Each status change of the account holder or the payment is a webhook event, which the sandbox signs and posts to your webhook endpoint.Your sideBrindlemark sandboxYour platformIts server keeps theclient secret and callsthe API with the token.Access tokenBearer, valid for 3,600 secondsPOST /oauth/tokenAccount holderA company. KYB: PENDING, then VERIFIEDonboardCompanyPayment accountA fictional IBAN and two balancesopenAccountPaymentSEPA credit transfer: INITIATED to BOOKEDinitiateCreditTransfereach status changeWebhook eventSigned with HMAC-SHA256Your endpointVerifies, then answerssigned POSTHow a payment moves through the Brindlemark sandboxYour platform's server gets an access token with POST /oauth/token. With the token, it onboards a company as an account holder (onboardCompany), whose verification goes from PENDING to VERIFIED; opens a payment account with a fictional IBAN for it (openAccount); and sends a SEPA credit transfer from that account (initiateCreditTransfer), which goes from INITIATED to BOOKED. Each status change of the account holder or the payment is a webhook event, which the sandbox signs and posts to your webhook endpoint.Brindlemark sandboxYour platformIts server keeps the client secretAccess tokenBearer, valid for 3,600 secondsAccount holderA company. KYB: PENDING, then VERIFIEDPayment accountA fictional IBAN and two balancesPaymentSEPA credit transfer: INITIATED to BOOKEDWebhook eventSigned with HMAC-SHA256Your endpointVerifies, then answersPOST /oauth/tokenonboardCompanyopenAccountinitiateCreditTransfereach status changesigned POST
Figure 1. How a payment moves through the sandbox. The mutations whose names start with sandbox stand in for the people and systems that act between these steps in a live system.
Object What it is Made with Statuses
Access token A Bearer token that lets your platform's server call the API for 3,600 seconds POST /oauth/token None
Account holder A company. Brindlemark checks it before it can hold money: KYB, know your business onboardCompany PENDING, VERIFIED, REFUSED
Payment account A euro payment account with a fictional IBAN, an available balance and a booked balance openAccount None
Payment A SEPA credit transfer from a payment account initiateCreditTransfer INITIATED, PENDING, BOOKED, REJECTED
Webhook event A signed message to your endpoint for each status change of an account holder or a payment The sandbox None

What the Sandbox Simulates#

In a live system, people and systems outside the API decide some things: a compliance team, the payment scheme, a payer's bank. The sandbox gives each of them a mutation whose name starts with sandbox, so you can make them happen when you want.

In a live system In the sandbox
A compliance team checks the company. sandboxSetVerificationStatus sets VERIFIED or REFUSED.
Money arrives by an incoming transfer. sandboxCreditAccount adds money to a payment account.
The scheme settles or rejects a transfer. sandboxSettlePayment moves a payment to BOOKED or REJECTED.
You ask for an event to be delivered again. sandboxResendWebhookEvent sends it at once, with a new signature.

Retries of failed webhook deliveries need no mutation: the sandbox schedules them itself. See Webhooks.

Run the Sandbox#

You need Node.js 22 and Git. curl is enough to send the requests on these pages.

  1. Get the code and install it:

    git clone https://github.com/domail2karandeshmukh-cyber/portfolio.git
    cd portfolio
    npm install
  2. In one terminal, start the example webhook endpoint. It listens at http://localhost:3000/webhooks and prints a line for each event it accepts:

    node content/work/banking/receiver.mjs
  3. In another terminal, start the sandbox and tell it where to send events:

    WEBHOOK_URL=http://localhost:3000/webhooks node content/work/banking/server.mjs

    The sandbox answers GraphQL requests at http://localhost:4100/graphql and gives access tokens at http://localhost:4100/oauth/token.

Variable What it sets Default
PORT The sandbox's port 4100
SANDBOX_CLIENT_ID The OAuth client ID sandbox-demo
SANDBOX_CLIENT_SECRET The OAuth client secret sandbox-demo-secret
WEBHOOK_URL Where the sandbox sends webhook events None: the sandbox records events and sends nothing
WEBHOOK_SECRET The key that signs webhook events sandbox-webhook-secret

These demonstration credentials are public: they are on this page. Keep real credentials in a secrets manager, never in source code.

The schema describes every type and field, and the sandbox answers introspection queries, so a GraphQL client such as GraphiQL or Postman can read it. The schema file is schema.graphql.

The Documentation#

The pages follow Diátaxis: each page does one job.

Page Kind It answers
Quickstart Tutorial How do I go from nothing to a booked transfer and its webhook events?
Authentication How-to guide and reference How do I get, send and renew an access token?
Payments Explanation and how-to guide Which scheme do I use, what does each status mean, and how do I send a payment exactly once?
Webhooks How-to guide How do I verify, acknowledge and deduplicate events?
Errors and Troubleshooting Reference What does this error mean, and what do I do about it?
Changelog Reference What changed, and what counts as a breaking change?
Compliance Context for Writers Explanation Which EU rules shape these pages, and where does each fact come from?

How the Examples Are Tested#

Every request and response on these pages is real. On each build of this site, scripts/banking-examples.mjs starts a fresh sandbox and the example webhook endpoint, sends the 36 requests of examples.json in order, and compares each answer, byte for byte, with the one these pages show. If an answer changes, the build stops until the pages show the new one.

The sandbox runs on a clock the script moves by hand: it starts at 09:00:00 UTC on 1 December 2026 and moves one second before each request, or more where an example says so. Its random bytes repeat from one run to the next. So the times, the tokens, the IDs and the signatures are the same on every build, and your own run differs only in those.

The same script runs the code the Webhooks page shows against the sandbox's real deliveries.

What the Sandbox Leaves Out#

  • Money, banks and schemes. Nothing leaves your computer, except the webhook deliveries to the address you set.
  • The account holder's own approval. A client credentials token acts for your platform alone. In a live system, sensitive actions such as a transfer also need the user's strong customer authentication: see Compliance Context for Writers.
  • Verification of Payee. The sandbox checks the creditor's IBAN, not the name that goes with it.
  • More than one of anything. One OAuth client, one webhook endpoint, and a memory that empties when the sandbox stops.
  • Real IBANs. Sandbox IBANs start with ZZ, which is no country's code, so no payment system can route them. They pass the ISO 13616 checksum, and the sandbox refuses them as a creditor's IBAN, because it sends no transfers to ZZ.