[

Integrate on-ramps from fiat to stablecoin

]

End-to-end integrations

Integrate on-ramps from fiat to stablecoin

Give your coding agent the exact steps, endpoints and enums to build a Lumx on-ramp — quote, create, render payment details, settle on webhooks.

// PROMPT

{ "type": "INDIVIDUAL", "name": "William Default", "taxId": "100.100.100-01", "birthDate": "1990-01-01" }

You are a senior backend engineer adding Lumx on-ramps — fiat in, stablecoin out — to an existing server-side application.

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 explains what the spec leaves untyped.

Work against sandbox at https://api-sandbox.lumx.io with a server-side key sent as "Authorization: Bearer <key>". The key never reaches a client bundle.

1. Create the customer with POST /customers. Request the fiat currencies you need in "accounts" (BRL, USD, EUR, MXN) — each virtual account is created with the customer and provisions after verification.
2. Wait for verification to reach APPROVED, then read GET /customers/{id} for the "wallets" and "accounts" arrays. In sandbox the last digit of taxId drives the outcome: 1 NOT_STARTED, 2 RFI, 3 FINAL_REJECTION, any other digit APPROVED.
3. Quote with POST /exchange-rates. type LOCKED returns an id and expiresAt under a timelock of 30s, 1m or 5m; type FLOATING prices at execution. Choose one and record why in the code.
4. Create the transaction with POST /transactions/on-ramp in one of the two shapes the spec defines: rail + sourceCurrency + sourceAmount + targetCurrency + purpose, or exchangeRateId + purpose. Send an Idempotency-Key header with a UUID v4 you persist before sending, so a retry reuses it.
5. Render state.payment from the response for the payer. Its shape follows the rail — brCode for PIX, bank coordinates for SWIFT. The spec types it as a free-form object, so take field names from the examples on /api-reference/transactions/on-ramp and flag any field you cannot find there instead of inventing one.
6. Drive the lifecycle from webhooks: onramp.awaiting_funds, onramp.transferring_fiat, onramp.trading, onramp.transferring_stablecoin, onramp.success, onramp.failed, onramp.expired. Confirm with GET /transactions/{id} before you credit anything in your own product.

Constraints:
- Read the purpose enum from the request schema. The response schema in the spec lists different values; use the request enum and flag the mismatch.
- PERSONAL_ACCOUNT is only valid with SELF-relationship destinations.
- Do not cache a wallet address. The docs do not state that it is permanent — read it when you use it and flag the question.
- Amounts are decimal strings, never numbers.
- Do not state a rate limit. None is published. Handle 429 TOO_MANY_REQUESTS with exponential backoff.

Deliverables:
- A typed client for the five endpoints above.
- A webhook handler covering the seven onramp.* events, idempotent on webhook-id.
- A sandbox script that runs one on-ramp end to end and prints every status change.
- A list of every field you could not confirm in either source.

  1. Create a sandbox key in the Dashboard under Developers → API Keys and export it in your shell. The agent never creates the key.

  2. Register a webhook endpoint under Developers → Webhooks, pointing at a tunnel to your machine, before you run the script.

  3. Read the agent's list of unconfirmed fields and decide each one yourself — that list is where a wrong integration would start.

TALK TO OUR TEAM

Ready to transform your business with stablecoins?

Discover how our infrastructure can seamlessly integrate stablecoins into your financial operations quickly, securely, and efficiently.

©2026. All rights reserved.

LUMX SOCIEDADE PRESTADORA DE SERVIÇOS DE ATIVOS VIRTUAIS LTDA., a private legal entity, enrolled with the CNPJ/MF under No. 42.887.120/0001-00 ("Lumx"), acts as a virtual asset service provider and is in the process of adapting to the regulatory regime for Virtual Asset Service Provider Companies (SPSAV), pursuant to Central Bank of Brazil (BCB) Resolution No. 520/2025, currently being subject to the transition regime set forth in Article 88 thereof.


Lumx US OP LLC ("Lumx") is a financial technology and payments infrastructure company. Lumx US OP LLC is a Money Service Business (MSB) registered with the Financial Crimes Enforcement Network (FinCEN) (MSB #31000316459619). Lumx is not a state-licensed money transmitter and does not, in its own capacity, engage in the provision of regulated money transmission services. All such regulated activities are conducted exclusively through, and under the licenses of, duly authorized financial-institution partners.


Lumx is not a bank, financial institution, payment institution, or custodian of client funds. Certain services made available through the Platform may be provided by duly authorized and regulated third-party partners, in accordance with applicable laws and regulations.

Please refer to Lumx’s Terms of Use and Privacy Notice for further information regarding the conditions governing the use of the Platform and the processing of your personal data.