In this tutorial you act as a platform's server. You get an access token, onboard a fictional company, open a payment account for it, send a SEPA credit transfer, settle it, and read the webhook events that each change produced.
Every answer below is the one the sandbox gave on this site's last build. Your answers will be the same, except for the access token, the times and the signatures.
Before You Start#
- Start the sandbox and the example webhook endpoint, as Run the Sandbox describes. Keep the endpoint's terminal in view: it prints a line for each event it accepts.
- Use a fresh sandbox. The IDs on this page, such as
ah_0001andpay_0001, are the first ones a sandbox gives. If you have sent other requests since it started, restart it.
Step 1: Get an Access Token#
Your platform's server exchanges its client ID and secret for an access token:
Example: Get an access token
curl -s -X POST http://localhost:4100/oauth/token \
-d grant_type=client_credentials \
-d client_id=sandbox-demo \
-d client_secret=sandbox-demo-secret
Response, HTTP 200, with the headers Cache-Control: no-store and Pragma: no-cache:
{
"access_token": "sbx_LZgZ9TMrtTuMJBwuFgG9Y6f5a4lzQlmK",
"token_type": "Bearer",
"expires_in": 3600
}
Keep the token in a shell variable for the next steps, with the value from your own answer:
export TOKEN=sbx_your_access_token
The token lasts 3,600 seconds. If it expires before you finish, repeat this step.
Step 2: Onboard a Company#
Every GraphQL request is a POST to /graphql with the token in the Authorization header. This one registers a company as an account holder:
Example: Onboard a company
curl -s http://localhost:4100/graphql \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TOKEN" \
--data-binary @- <<'EOF'
{
"query": "mutation Onboard($input: OnboardCompanyInput!) {\n onboardCompany(input: $input) {\n __typename\n ... on OnboardCompanySuccess {\n accountHolder { id legalName verificationStatus createdAt }\n }\n ... on Problem { message }\n ... on InvalidFieldProblem { field }\n }\n}",
"variables": {
"input": {
"legalName": "Example Bakery SAS",
"registrationNumber": "SANDBOX-0042",
"country": "FR"
}
}
}
EOF
Response, HTTP 200:
{
"data": {
"onboardCompany": {
"__typename": "OnboardCompanySuccess",
"accountHolder": {
"id": "ah_0001",
"legalName": "Example Bakery SAS",
"verificationStatus": "PENDING",
"createdAt": "2026-12-01T09:00:06Z"
}
}
}
}
The account holder starts as PENDING: Brindlemark checks a company before it can hold money. The rest of this tutorial shows each request as its GraphQL operation and its variables. Send them the way this step does, with the operation as query and the variables as variables.
Step 3: Try to Open an Account Too Early#
Example: Open an account before the verification ends
mutation OpenAccount($input: OpenAccountInput!) {
openAccount(input: $input) {
__typename
... on OpenAccountSuccess {
account {
id name iban
availableBalance { value currency }
}
}
... on Problem { message }
... on AccountHolderNotVerifiedProblem { verificationStatus }
}
}
Variables:
{
"input": {
"accountHolderId": "ah_0001",
"name": "Main account"
}
}
Response, HTTP 200:
{
"data": {
"openAccount": {
"__typename": "AccountHolderNotVerifiedProblem",
"message": "The account holder's verification is PENDING. An account opens only once it is VERIFIED.",
"verificationStatus": "PENDING"
}
}
}
The sandbox refuses, and says why in the answer itself. A refusal like this is a problem: a type of its own in the mutation's result, with a message and fields you can act on. Every mutation on these pages asks for __typename and ... on Problem { message }, so the answer always says which type it is.
Step 4: Simulate the Verification#
In a live system, a compliance team decides. In the sandbox, you do:
Example: Simulate a successful verification
mutation Verify($input: SandboxSetVerificationStatusInput!) {
sandboxSetVerificationStatus(input: $input) {
__typename
... on SandboxSetVerificationStatusSuccess {
accountHolder { id verificationStatus }
}
... on Problem { message }
}
}
Variables:
{
"input": {
"accountHolderId": "ah_0001",
"status": "VERIFIED"
}
}
Response, HTTP 200:
{
"data": {
"sandboxSetVerificationStatus": {
"__typename": "SandboxSetVerificationStatusSuccess",
"accountHolder": {
"id": "ah_0001",
"verificationStatus": "VERIFIED"
}
}
}
}
Step 5: Open a Payment Account#
Example: Open a payment account
The operation of Example: Open an account before the verification ends, with these variables:
{
"input": {
"accountHolderId": "ah_0001",
"name": "Main account"
}
}
Response, HTTP 200:
{
"data": {
"openAccount": {
"__typename": "OpenAccountSuccess",
"account": {
"id": "acc_0001",
"name": "Main account",
"iban": "ZZ86BRDL000000000001",
"availableBalance": {
"value": "0.00",
"currency": "EUR"
}
}
}
}
}
The IBAN starts with ZZ, which is no country's code: sandbox IBANs can't be mistaken for real ones. The account opens empty.
Step 6: Add Sandbox Money#
Example: Add sandbox money to the account
mutation Credit($input: SandboxCreditAccountInput!) {
sandboxCreditAccount(input: $input) {
__typename
... on SandboxCreditAccountSuccess {
account {
availableBalance { value currency }
bookedBalance { value currency }
}
}
... on Problem { message }
}
}
Variables:
{
"input": {
"accountId": "acc_0001",
"amount": {
"value": "5000.00",
"currency": "EUR"
}
}
}
Response, HTTP 200:
{
"data": {
"sandboxCreditAccount": {
"__typename": "SandboxCreditAccountSuccess",
"account": {
"availableBalance": {
"value": "5000.00",
"currency": "EUR"
},
"bookedBalance": {
"value": "5000.00",
"currency": "EUR"
}
}
}
}
}
Step 7: Send a SEPA Credit Transfer#
The creditor's IBAN is a well-known documentation example. The idempotency key is one you make for this payment, such as a UUID:
Example: Send a SEPA credit transfer
mutation Transfer($input: InitiateCreditTransferInput!) {
initiateCreditTransfer(input: $input) {
__typename
... on InitiateCreditTransferSuccess {
payment {
id status scheme
amount { value currency }
creditor { name iban }
account {
availableBalance { value }
bookedBalance { value }
}
}
}
... on Problem { message }
}
}
Variables:
{
"input": {
"accountId": "acc_0001",
"scheme": "SCT",
"amount": {
"value": "1250.00",
"currency": "EUR"
},
"creditor": {
"name": "Example Flour Mill GmbH",
"iban": "DE89 3704 0044 0532 0130 00"
},
"reference": "Invoice 2026-118",
"idempotencyKey": "5b0e2d8c-3f41-4a7e-9c62-1d8f7a3b9e10"
}
}
Response, HTTP 200:
{
"data": {
"initiateCreditTransfer": {
"__typename": "InitiateCreditTransferSuccess",
"payment": {
"id": "pay_0001",
"status": "INITIATED",
"scheme": "SCT",
"amount": {
"value": "1250.00",
"currency": "EUR"
},
"creditor": {
"name": "Example Flour Mill GmbH",
"iban": "DE89370400440532013000"
},
"account": {
"availableBalance": {
"value": "3750.00"
},
"bookedBalance": {
"value": "5000.00"
}
}
}
}
}
}
Two balances moved apart. The available balance is lower by 1,250.00, because the amount is reserved for the payment. The booked balance is unchanged until the payment is booked.
If the connection had dropped before the answer arrived, you would send the same request again with the same key, and get this same payment, not a second one. Payments shows how.
Step 8: Settle the Transfer#
In a live system, the scheme settles a transfer. In the sandbox, you do:
Example: Settle the transfer in the sandbox
mutation Settle($input: SandboxSettlePaymentInput!) {
sandboxSettlePayment(input: $input) {
__typename
... on SandboxSettlePaymentSuccess {
payment {
id status rejectionReason
statusHistory { status at }
account {
availableBalance { value }
bookedBalance { value }
}
}
}
... on Problem { message }
... on PaymentAlreadySettledProblem { status }
}
}
Variables:
{
"input": {
"paymentId": "pay_0001",
"outcome": "BOOKED"
}
}
Response, HTTP 200:
{
"data": {
"sandboxSettlePayment": {
"__typename": "SandboxSettlePaymentSuccess",
"payment": {
"id": "pay_0001",
"status": "BOOKED",
"rejectionReason": null,
"statusHistory": [
{
"status": "INITIATED",
"at": "2026-12-01T09:00:11Z"
},
{
"status": "PENDING",
"at": "2026-12-01T09:00:14Z"
},
{
"status": "BOOKED",
"at": "2026-12-01T09:00:14Z"
}
],
"account": {
"availableBalance": {
"value": "3750.00"
},
"bookedBalance": {
"value": "3750.00"
}
}
}
}
}
}
The payment went through PENDING to BOOKED, and both balances now show 3,750.00.
Step 9: Read the Webhook Events#
Each status change produced an event. Ask for the payment's events:
Example: Read the payment's webhook events
query Events($resourceId: ID!) {
webhookEvents(resourceId: $resourceId) {
id type createdAt payload
deliveries { attempt reason sentAt responseStatus }
}
}
Variables:
{
"resourceId": "pay_0001"
}
Response, HTTP 200:
{
"data": {
"webhookEvents": [
{
"id": "evt_0003",
"type": "payment.status_changed",
"createdAt": "2026-12-01T09:00:11Z",
"payload": "{\"id\":\"evt_0003\",\"type\":\"payment.status_changed\",\"createdAt\":\"2026-12-01T09:00:11Z\",\"data\":{\"paymentId\":\"pay_0001\",\"previousStatus\":null,\"status\":\"INITIATED\"}}",
"deliveries": [
{
"attempt": 1,
"reason": "FIRST",
"sentAt": "2026-12-01T09:00:11Z",
"responseStatus": 200
}
]
},
{
"id": "evt_0004",
"type": "payment.status_changed",
"createdAt": "2026-12-01T09:00:14Z",
"payload": "{\"id\":\"evt_0004\",\"type\":\"payment.status_changed\",\"createdAt\":\"2026-12-01T09:00:14Z\",\"data\":{\"paymentId\":\"pay_0001\",\"previousStatus\":\"INITIATED\",\"status\":\"PENDING\"}}",
"deliveries": [
{
"attempt": 1,
"reason": "FIRST",
"sentAt": "2026-12-01T09:00:14Z",
"responseStatus": 200
}
]
},
{
"id": "evt_0005",
"type": "payment.status_changed",
"createdAt": "2026-12-01T09:00:14Z",
"payload": "{\"id\":\"evt_0005\",\"type\":\"payment.status_changed\",\"createdAt\":\"2026-12-01T09:00:14Z\",\"data\":{\"paymentId\":\"pay_0001\",\"previousStatus\":\"PENDING\",\"status\":\"BOOKED\"}}",
"deliveries": [
{
"attempt": 1,
"reason": "FIRST",
"sentAt": "2026-12-01T09:00:14Z",
"responseStatus": 200
}
]
}
]
}
}
Each event was delivered once, and the endpoint answered 200. The endpoint's terminal shows a line for each of the five events so far: two for the account holder and three for the payment. payload is the exact body of each delivery; Webhooks shows how to check its signature.
What You Did#
- You got an access token with the OAuth 2.0 client credentials grant.
- You onboarded a company, and saw it refused an account until its verification ended.
- You opened a payment account and funded it.
- You sent a SEPA credit transfer with an idempotency key, and saw the amount reserved, then booked.
- You read the webhook events that recorded each change.
Next Steps#
- Payments: instant transfers, rejected payments, idempotency keys and IBAN checks.
- Webhooks: verify signatures, and handle retries and duplicate deliveries.
- Errors and Troubleshooting: every problem the sandbox can return.