End-to-end integrations
Integrate BRL, MXN, USD and EUR virtual accounts
A copy-paste prompt for named virtual accounts in your customer's own name — request the currencies, track provisioning, collect the deposit.
// PROMPT
{ "type": "INDIVIDUAL", "name": "William Default", "taxId": "100.100.100-01", "birthDate": "1990-01-01" }
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 and MXN. 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 and MXN to reach ACTIVE immediately after the customer is APPROVED, and USD and EUR 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. 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.
Decide which currencies your customers actually need before running this. Requesting all four creates four accounts you then have to explain to a compliance reviewer.
Create the sandbox key and register the webhook endpoint yourself; the agent stops at the first authenticated call without them.
Check the agent's choice in step 5 against how your product collects — a standing rule and a per-deposit transaction are different products, and it should not decide that for you.
Discover how our infrastructure can seamlessly integrate stablecoins into your financial operations quickly, securely, and efficiently.

