simulations (operator)

Sandbox simulations (SC-38, P-89): every asynchronous outcome on demand — incoming payments and debits, payment status, returns and recalls, inbound recalls, exchange settlement, FX rate moves, direct-debit outcomes, card events, KYC outcomes, integrator events, statements, scheduled runs and provider outages. Backed by the sandbox bank, and by the Banking Circle and Integrated Finance sandboxes where they offer a simulation.

Markdown version: simulations.md

Simulate a statement becoming available

POST /v1/simulations/statements

A statement.available integrator event for the balance.

Sandbox only: 404 feature-disabled wherever the sandbox is off (always in production). Callers: a wb_test_ API key of the customer, or a member session of a developer sandbox workspace (403 for live keys and other sessions). Every simulation answers 202 SimulationResult; queued outcomes arrive through the normal pipeline (ledger, notifications, integrator webhooks) within seconds. Rules: docs/SANDBOX.md.

API key scope: webhooks:manage.

Parameters

NameInTypeDescription
X-Tenant-IdrequiredheaderUuid

Tenant context: the operator tenant id (staff operations) or customer tenant id (customer operations). Validated against the caller's memberships; mismatch → 403. For API keys it must equal the key's customer id (customer-level keys are bound to one customer) or, for operator-level keys (P9-T08b), the operator id.

X-Request-Idheaderstring

Client-supplied correlation id. Generated by the server when absent; always echoed in the response and in problem details.

Idempotency-Keyheaderstring

Optional idempotency key; same semantics as on money operations.

Request body

Required. application/json

Schema SimStatement

Responses

  • 202 Accepted application/json

    Schema SimulationResult

    • simulationId Uuidrequired

    • kind SimulationKindrequired

    • status stringrequired

      queued: a provider event was stored and handed to the workers; submitted: the partner sandbox accepted it and notifies by webhook; applied: done synchronously.

      One of: "queued", "submitted", "applied"

    • provider SimulationProviderrequired

    • providerEventIds array of Uuidrequired

      providers.events rows written (provider event log).

    • providerReference string | nullrequired

    • details objectrequired

      Per kind (amounts, refs, rates, case id, …).

      Fields of details

      object

  • 400 Malformed request: unparseable JSON, or an invalid header, path or query parameter (`errors[].field` is `header.X`, `path.x` or `query.x`). Body validation failures are 422 `validation-error`. application/problem+json

    Body Problem; see the error catalogue.

  • 401 Missing, expired or invalid credentials (`unauthenticated`, `session-expired` with `reason` `idle` / `revoked` / `expired`, `invalid-api-key`, `mfa-required`). application/problem+json

    Body Problem; see the error catalogue.

  • 403 Authenticated but not allowed: missing capability or scope, tenant not in memberships, `step-up-required`, IP not allow-listed, impersonation restriction. application/problem+json

    Body Problem; see the error catalogue.

  • 409 State conflict: `invalid-transition`, `duplicate-recipient`, `quote-expired`, `insufficient-funds`, `idempotency-key-in-use` (with Retry-After), `not-cancellable`. application/problem+json

    Body Problem; see the error catalogue.

  • 422 Semantically invalid request; `errors[]` lists field-level problems. Also `idempotency-key-reused` when the key was used with a different payload, `limit-exceeded`, `recipient-not-approved`. application/problem+json

    Body Problem; see the error catalogue.

  • 429 Rate limit exceeded. application/problem+json

    Body Problem; see the error catalogue.

  • default Unexpected error (`500 internal-error`, `501 not-implemented`, `502 provider-error`, `503 service-unavailable`, `504 provider-timeout`). Money operations that time out at the provider are never retried blindly; their state becomes `exception`/unknown and is reconciled. application/problem+json

    Body Problem; see the error catalogue.

Code samples

Against the sandbox (https://bank.wirebloom.com/v1).

curl -X POST "https://bank.wirebloom.com/v1/simulations/statements" \
  -H "Authorization: Bearer $WIREBLOOM_API_KEY" \
  -H "X-Tenant-Id: $WIREBLOOM_CUSTOMER_ID" \
  -H "Content-Type: application/json" \
  --data '{
  "balanceId": "0192a6f0-7c1e-7b3a-9d2e-5f4c3b2a1908"
}'

Send an integrator event to your endpoints

POST /v1/simulations/webhook-events

Delivered to the customer's active endpoints subscribed to the type, with data.sandbox: true.

Sandbox only: 404 feature-disabled wherever the sandbox is off (always in production). Callers: a wb_test_ API key of the customer, or a member session of a developer sandbox workspace (403 for live keys and other sessions). Every simulation answers 202 SimulationResult; queued outcomes arrive through the normal pipeline (ledger, notifications, integrator webhooks) within seconds. Rules: docs/SANDBOX.md.

API key scope: webhooks:manage.

Parameters

NameInTypeDescription
X-Tenant-IdrequiredheaderUuid

Tenant context: the operator tenant id (staff operations) or customer tenant id (customer operations). Validated against the caller's memberships; mismatch → 403. For API keys it must equal the key's customer id (customer-level keys are bound to one customer) or, for operator-level keys (P9-T08b), the operator id.

X-Request-Idheaderstring

Client-supplied correlation id. Generated by the server when absent; always echoed in the response and in problem details.

Idempotency-Keyheaderstring

Optional idempotency key; same semantics as on money operations.

Request body

Required. application/json

Schema SimWebhookEvent

Responses

  • 202 Accepted application/json

    Schema SimulationResult

    • simulationId Uuidrequired

    • kind SimulationKindrequired

    • status stringrequired

      queued: a provider event was stored and handed to the workers; submitted: the partner sandbox accepted it and notifies by webhook; applied: done synchronously.

      One of: "queued", "submitted", "applied"

    • provider SimulationProviderrequired

    • providerEventIds array of Uuidrequired

      providers.events rows written (provider event log).

    • providerReference string | nullrequired

    • details objectrequired

      Per kind (amounts, refs, rates, case id, …).

      Fields of details

      object

  • 400 Malformed request: unparseable JSON, or an invalid header, path or query parameter (`errors[].field` is `header.X`, `path.x` or `query.x`). Body validation failures are 422 `validation-error`. application/problem+json

    Body Problem; see the error catalogue.

  • 401 Missing, expired or invalid credentials (`unauthenticated`, `session-expired` with `reason` `idle` / `revoked` / `expired`, `invalid-api-key`, `mfa-required`). application/problem+json

    Body Problem; see the error catalogue.

  • 403 Authenticated but not allowed: missing capability or scope, tenant not in memberships, `step-up-required`, IP not allow-listed, impersonation restriction. application/problem+json

    Body Problem; see the error catalogue.

  • 409 State conflict: `invalid-transition`, `duplicate-recipient`, `quote-expired`, `insufficient-funds`, `idempotency-key-in-use` (with Retry-After), `not-cancellable`. application/problem+json

    Body Problem; see the error catalogue.

  • 422 Semantically invalid request; `errors[]` lists field-level problems. Also `idempotency-key-reused` when the key was used with a different payload, `limit-exceeded`, `recipient-not-approved`. application/problem+json

    Body Problem; see the error catalogue.

  • 429 Rate limit exceeded. application/problem+json

    Body Problem; see the error catalogue.

  • default Unexpected error (`500 internal-error`, `501 not-implemented`, `502 provider-error`, `503 service-unavailable`, `504 provider-timeout`). Money operations that time out at the provider are never retried blindly; their state becomes `exception`/unknown and is reconciled. application/problem+json

    Body Problem; see the error catalogue.

Code samples

Against the sandbox (https://bank.wirebloom.com/v1).

curl -X POST "https://bank.wirebloom.com/v1/simulations/webhook-events" \
  -H "Authorization: Bearer $WIREBLOOM_API_KEY" \
  -H "X-Tenant-Id: $WIREBLOOM_CUSTOMER_ID" \
  -H "Content-Type: application/json" \
  --data '{
  "type": "webhook.test"
}'