Customer recipes

Pay a supplier end to end, upload a bulk file, schedule a payment, exchange currency and fetch a statement.

Each recipe runs against the sandbox with a wb_test_ key and the variables of the walkthrough. Every money-moving POST carries an Idempotency-Key; reuse the same key when you retry (Idempotency).

export WIREBLOOM_API_URL=https://api.staging.banking.wirebloom.com/v1
auth=(-H "Authorization: Bearer $WIREBLOOM_API_KEY" -H "X-Tenant-Id: $WIREBLOOM_CUSTOMER_ID")
json=(-H "Content-Type: application/json")

Pay a supplier: recipient, verification, payment, webhook, statement

Scopes: recipients:write, payments:write, webhooks:manage, statements:read.

  1. Look up the bank fields the currency needs with getRecipientRequirements, then create the recipient with createRecipient:
curl -X POST "$WIREBLOOM_API_URL/recipients" "${auth[@]}" "${json[@]}" \
  -H "Idempotency-Key: supplier-acme-gbp" \
  -d '{ "type": "company", "name": "Acme Supplies Ltd", "currency": "GBP",
        "bank": { "accountNumber": "31926819", "routingCodes": { "sortCode": "601613" } } }'
  1. Check the account holder name with verifyRecipient (Confirmation of Payee for GBP, Verification of Payee for EUR). In the sandbox a name containing NOMATCH, CLOSE or UNAVAILABLE gives that outcome; anything else matches. Other currencies answer 422 verification-unavailable.
curl -X POST "$WIREBLOOM_API_URL/recipients/<recipient id>/verify" "${auth[@]}"
  1. Pay it with createPayment. A payment can wait in pending_approval for a person; a key never approves.
curl -X POST "$WIREBLOOM_API_URL/payments" "${auth[@]}" "${json[@]}" \
  -H "Idempotency-Key: invoice-4711" \
  -d '{ "sourceBalanceId": "<GBP balance id>", "recipientId": "<recipient id>",
        "amount": { "amountMinor": "250000", "currency": "GBP" },
        "reference": "INV-4711", "submit": true }'
  1. Follow it by webhook rather than polling: subscribe to payment.status_changed (Webhooks). Each delivery is a hint; re-read the payment with getPayment before acting on money. A PDF confirmation is available from getPaymentConfirmation.
  2. At month end request a statement with requestStatement (202, a job), list with listStatements and download with downloadStatement:
curl -X POST "$WIREBLOOM_API_URL/balances/<balance id>/statements" "${auth[@]}" "${json[@]}" \
  -d '{ "periodStart": "2026-10-01", "periodEnd": "2026-10-31", "format": "pdf" }'

Bulk payments from a file

Scopes: documents:write, payments:write, payments:read.

  1. Upload the CSV as a document of kind bulk_payments (uploadDocument), PUT the bytes to upload.url, then completeDocumentUpload. Wait for the document status clean.
  2. Create the batch with createBulkPayment (template wirebloom_csv_v1, the same file the web app accepts):
curl -X POST "$WIREBLOOM_API_URL/bulk-payments" "${auth[@]}" "${json[@]}" \
  -H "Idempotency-Key: payroll-2026-11" \
  -d '{ "documentId": "<document id>", "sourceBalanceId": "<balance id>", "template": "wirebloom_csv_v1" }'
  1. Review the parsed rows with listBulkPaymentRows, then submitBulkPayment. Submitting answers 202 with a job (Location: /v1/jobs/{jobId}); every valid row becomes a payment. When the total falls in an approval tier the batch waits for a person.

Scheduled payments

Scope: payments:write. A schedule is a payment template plus an iCalendar rrule. Preview the dates first with previewScheduledPayment, then create it with createScheduledPayment:

curl -X POST "$WIREBLOOM_API_URL/scheduled-payments" "${auth[@]}" "${json[@]}" \
  -H "Idempotency-Key: rent-hq" \
  -d '{ "name": "Office rent",
        "template": { "sourceBalanceId": "<balance id>", "recipientId": "<recipient id>",
                      "amount": { "amountMinor": "450000", "currency": "EUR" }, "reference": "Rent HQ" },
        "schedule": { "rrule": "FREQ=MONTHLY;BYMONTHDAY=1", "startDate": "2026-12-01" } }'

Pause and resume with deactivateScheduledPayment and activateScheduledPayment. In the sandbox, simulateScheduledRun makes the next occurrence due now.

Exchange currency: quote, then execute

Scopes: exchanges:write, exchanges:read.

  1. Ask for a quote with createQuote. fixedSide says which amount is fixed:
curl -X POST "$WIREBLOOM_API_URL/exchanges/quotes" "${auth[@]}" "${json[@]}" \
  -d '{ "sellCurrency": "EUR", "buyCurrency": "USD", "fixedSide": "sell",
        "amount": { "amountMinor": "1000000", "currency": "EUR" } }'
  1. Execute it before it expires with createExchange; refresh an expired quote with refreshQuote. Exchanges follow the account's approval policies.
curl -X POST "$WIREBLOOM_API_URL/exchanges" "${auth[@]}" "${json[@]}" \
  -H "Idempotency-Key: fx-2026-11-18-01" \
  -d '{ "quoteId": "<quote id>", "sellBalanceId": "<EUR balance id>", "buyBalanceId": "<USD balance id>" }'

The sandbox uses fixed fictional rates per EUR (GBP 0.85, USD 1.1, CHF 0.95, and more); simulateFxRateMove moves a pair. exchange.completed arrives by webhook.

Reconcile with transactions

listTransactions (transactions:read) pages through every movement; label them for your ledger with createAnnotation (transactions:write). Large exports run as jobs: exportTransactions, then getJob until succeeded, then download from resultUrl (pre-signed, 15 minutes).

Markdown version: recipes-customer.md