You are a senior backend engineer adding Lumx virtual accounts to a B2B product that collects money in more than one country.
Ground truth. Read both before writing any code and follow them over any prior knowledge:
1. https://docs.lumx.io/llms.txt — the documentation index. Every page has a .md twin at its own path.
2. https://lumx-docs-public-prod.s3.us-east-1.amazonaws.com/api-production.yaml — the OpenAPI 3.1 spec. Take field names, required flags and enum values from here; the prose carries the lifecycle the spec does not describe.
Work against sandbox at https://api-sandbox.lumx.io with a server-side key sent as "Authorization: Bearer <key>".
1. Request the accounts when you create the customer. POST /customers takes an "accounts" array of currencies from BRL, USD, EUR, MXN and GBP. There is no endpoint that creates an account on its own — check the spec and confirm this before designing any screen that implies one.
2. Model the account lifecycle as a state machine over the status enum in the spec: AWAITING_ONBOARDING, REQUESTED, PROVISIONING, RFI, ACTIVE, REJECTED, INACTIVE, CLOSED. The prose documents seven of these; take the set from the spec and flag the difference.
3. Drive the transitions from the account.* webhooks — account.awaiting_onboarding through account.active — and reconcile with GET /accounts?customerId={id}. Paginate with size and cursor; do not assume one page.
4. Expect BRL, MXN, EUR and GBP to reach ACTIVE immediately after the customer is APPROVED, and USD to take up to one business day. Your UI has to show a pending account, not a missing one.
5. Get the deposit coordinates. GET /accounts returns id, customerId, status, currency and timestamps — no bank details. The coordinates come from POST /autoconversion-rules, in sourceDepositInfo, for a standing conversion, or from POST /transactions/on-ramp, in state.payment, for a single expected deposit. Pick one and say which in the code.
6. Render the coordinates per rail: brCode for PIX, clabe plus reference for SPEI, accountNumber with routingNumber or bic for USD, iban plus bic for SEPA (EUR), sortCode plus accountNumber for FPS (GBP). Take every field name from the spec or from the examples in the API reference, and flag anything you cannot find in either.
Constraints:
- The account is issued in your customer's name, not yours. Do not design a flow that pools several parties' funds in one account — read /compliance/nested-payments first.
- One currency per account. A customer holds several accounts, and the rails available on each follow the currency.
- Do not state a rate limit while paginating. None is published. Handle 429 TOO_MANY_REQUESTS with exponential backoff.
Deliverables:
- A provisioning state machine driven by webhooks, with the RFI and REJECTED paths handled.
- A collection screen that renders deposit coordinates per rail from live API data.
- A sandbox script that creates a customer with BRL and USD accounts and prints each status change.
- A list of every field you could not confirm in either source.