[

Audit an existing Lumx integration

]

Setup and testing

Audit an existing Lumx integration

A copy-paste prompt that audits live Lumx code for what costs money — duplicate payments, unverified events, message matching, undisclosed parties.

// PROMPT

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

You are a senior engineer auditing a live Lumx integration. Find what will cost money or fail a compliance review, and rank by that, not by code style.

Ground truth. Read both before writing any findings 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. Enum and required-field claims come from here.

Audit these seven, each against the sources, and cite file and line for every finding.

1. Duplicate payment risk. Every money-moving POST needs an Idempotency-Key generated once, persisted before the call, and reused on retry. A key minted inside a retry loop is the same as no key. Keys expire after 24 hours, so a retry a day later is a new payment.
2. Event trust. Webhook handlers must verify the signature over the raw body, strip the whsec_ prefix before decoding, accept any valid signature in the header, and deduplicate on webhook-id. Any handler acting on an unverified payload is a finding, not a style note.
3. Error matching. Handlers must branch on code, not on message — the message is explicitly subject to change and is generic on every 5xx. Any string comparison against a message is a finding.
4. Undisclosed parties. Read /compliance/nested-payments and check the money flow, not the code: every transaction must be the onboarded customer's own funds paying its own counterparty. Pooling, sub-balances used to track other parties, or payouts to parties nobody onboarded are compliance findings and outrank everything above.
5. Holder relationship and purpose. Each destination carries a holder.relationship from a closed enum and each transaction a purpose from a closed enum, and they have to be true rather than defaulted. PERSONAL_ACCOUNT is valid only with a SELF destination.
6. Limits awareness. Read GET /customers/{id}?includeTransactionLimits=true and check the code handles a rejected transaction from a hit limit as a business state, not an exception.
7. Pagination and drift. Every list read — GET /transactions, GET /destinations, GET /accounts — needs size and cursor. Then compare the enums hardcoded in the codebase against the spec today and report each one that has drifted.

Constraints:
- Do not fix anything. Findings only. A wrong automated fix in a money path is worse than the finding.
- Do not state a rate limit. None is published and the spec declares no 429 response. Check only that retries back off.
- Where the spec and the prose disagree, report both and say which one the code followed.

Deliverables:
- Findings ranked by money and compliance exposure, each with file, line and the source that makes it a finding.
- The list of hardcoded enums that have drifted from the spec.
- The questions only Lumx can answer, and what each one blocks.

  1. Point the agent at the whole integration, including the webhook handler and any batch job — the findings that matter are usually in the job nobody has read for a year.

  2. Take finding class 4 to whoever owns compliance before you touch code. It is a business-model question, not a bug.

  3. Re-run after fixing. Drifted enums come back every time the API adds a value.

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.