Skip to main content

Integration Builder v2 — Deep Research

Consolidated from 3 parallel research agents: Integration Guide docs, BRLAV2 proxy, BRLAForPlatforms handlers. Total: 167 tool calls, ~360K tokens of analysis.


1. Environment URLs (NEW — must be selectable in builder)

EnvironmentBase URLNotes
Sandboxhttps://api.sandbox.avenia.io:10952Mock funds, sandboxReject flag in KYC
Productionhttps://api.avenia.ioReal funds, real KYC
Developerhttp://localhost:10952Local dev, emailToken bypass = 000000

CORS origins per env:

  • Developer: localhost:3000, localhost:5173
  • Sandbox: app.sandbox.avenia.io, pay.sandbox.avenia.io
  • Production: app.avenia.io, pay.avenia.io

2. Runtime Combinations Endpoint (CRITICAL DISCOVERY)

GET /v2/quote-config-validation (public, no auth)

Returns the single source of truth for all valid combinations at runtime:

{
"validCurrencyInputPaymentMethods": { "BRL-PIX": true, "EUR-SEPA": true, ... },
"validCurrencyOutputPaymentMethods": { "BRL-PIX": true, "BRL-PIX-BRCODE": true, ... },
"validBlockchainSendMethods": { "BRLA-POLYGON:TRANSFER": true, ... }
}

Builder implication: Instead of hardcoding combinations in JSON configs, the builder can fetch this endpoint at page load per environment and dynamically populate the dropdowns. This means adding a new currency on the backend automatically shows up in the builder — zero config changes needed.


3. ALL Valid Combinations (Complete Matrix)

Fiat Currencies

BRL, USD, EUR, ARS, COP, MXN

Blockchain Currencies

BRLA, USDC, USDCe, USDT, USDM, EURC, ETH, GLMR, POL, CHZ, CELO, AVAX

Underlying Currency Map

BRL/BRLA → BRL
USD/USDC/USDCe/USDT/USDM → USD
EUR/EURC → EUR
ARS → ARS
COP → COP
MXN → MXN

Valid Input Payment Methods

CurrencyPayment Method
BRLPIX
USDWIRE, ACH
EURSEPA
ARSBANK-TRANSFER
COPBANK-TRANSFER
MXNSPEI
BRLAINTERNAL, POLYGON, MOONBEAM, CELO, GNOSIS, BASE, ETHEREUM, AVALANCHE
USDCINTERNAL, POLYGON, MOONBEAM, CELO, GNOSIS, BASE, ETHEREUM
USDCePOLYGON
USDTINTERNAL, POLYGON, MOONBEAM, CELO, GNOSIS, ETHEREUM, TRON
USDMINTERNAL
EURCINTERNAL

Valid Output Payment Methods

Same as input PLUS these output-only methods:

  • BRL-PIX-BRCODE (pay a BR code directly)
  • BRL-REFUND (refund a previous deposit)
  • BRL-TED
  • USD-ACH_SAME_DAY

Valid Blockchain Send Methods

Currency-ChainPERMITTRANSFER
BRLA-POLYGONYesYes
BRLA-MOONBEAMYesYes
BRLA-CELOYesYes
BRLA-GNOSISYesYes
BRLA-BASEYesYes
BRLA-ETHEREUMYesYes
BRLA-AVALANCHEYesYes
USDC-POLYGONYesYes
USDC-CELOYesYes
USDC-GNOSISYesYes
USDC-BASEYesYes
USDC-ETHEREUMYesYes
USDC-MOONBEAMNoYes
USDCe-POLYGONYesYes
USDT-POLYGONYesYes
USDT-CELOYesYes
USDT-GNOSISYesYes
USDT-ETHEREUMNoYes
USDT-MOONBEAMNoYes
USDT-TRONNoYes

Combination Restrictions

RuleDetails
COP off-rampoutputCurrency=COP, outputPaymentMethod=BANK-TRANSFER requires inputCurrency=USDC ONLY
PIX-BRCODE outputRequires outputBrCode query param with valid BR code
REFUND outputOnly with inputPaymentMethod=BRLA-INTERNAL, requires ticketRefundId
COP amount boundsmin 1,000 COP, max 50,000,000 COP
Markup currenciesOnly BRLA, USDC, USDT (NOT EURC)
Fiat decimalsmax 2 decimal places
Crypto decimalsmax 6 decimal places

Documented Combination Flows

Fiat On-Ramp (Fiat → Crypto)

InputOutputinputPaymentMethodoutputPaymentMethodResponse contains
BRLBRLA/USDC/USDT/EURCPIXINTERNAL or chainbrCode
USDUSDC/USDTWIREINTERNAL or chainusdDepositInstructions
USDUSDC/USDTACHINTERNAL or chainusdDepositInstructions (paymentRail: ACH)
EUREURCSEPAINTERNALeurDepositInstructions (IBAN, BIC)
ARScryptoBANK-TRANSFERINTERNAL or chainarsDepositInfo
COPcryptoBANK-TRANSFERINTERNAL or chaindepositUrl (PSE link)
MXNcryptoSPEIINTERNAL or chainspeiClabe, speiBankName, speiBankCode

Fiat Off-Ramp (Crypto → Fiat)

InputOutputinputPaymentMethodoutputPaymentMethodRequires
BRLA/USDC/USDT/EURCBRLINTERNALPIXbeneficiaryBrlBankAccountId or pixKey or full bank details
BRLA/USDC/USDT/EURCBRLINTERNALPIX-BRCODEoutputBrCode in quote
BRLABRLINTERNALREFUNDticketRefundId in quote
USDC/USDTUSDINTERNALWIREbeneficiaryUsdBankAccountId
USDC/USDTUSDINTERNALACHbeneficiaryUsdBankAccountId
EURCEURINTERNALSEPAbeneficiaryEurBankAccountId
USDCCOPINTERNALBANK-TRANSFERbeneficiaryCopBankAccountId
cryptoARSINTERNALBANK-TRANSFERbeneficiaryArsBankAccountId
cryptoMXNINTERNALSPEIbeneficiaryMxnBankAccountId

Crypto → Crypto

InputOutputNotes
Any cryptoAny cryptoINTERNAL ↔ INTERNAL, INTERNAL ↔ chain, chain ↔ INTERNAL

Internal Transfers (same currency)

PairNotes
BRLA ↔ BRLABetween main/sub accounts
USDC ↔ USDCBetween main/sub accounts
USDT ↔ USDTBetween main/sub accounts
EURC ↔ EURCBetween main/sub accounts

4. ALL Endpoints — Complete Request/Response JSON

4.1 Auth

POST /v2/auth/login

// Request
{ "email": "string", "password": "string" }
// Response: empty (sends email token to user)

POST /v2/auth/validate-login

// Request
{ "email": "string", "emailToken": "string" }
// Response
{ "accessToken": "string (JWT)", "refreshToken": "string" }

Dev bypass: emailToken = "000000" (DEVELOPER env only)

POST /v2/auth/refresh

// Request
{ "refreshToken": "string" }
// Response
{ "accessToken": "string", "refreshToken": "string" }

POST /v2/auth/create

// Request
{ "email": "string", "password": "string", "confirmPassword": "string", "name": "string", "countryTaxResidence": "string (ISO alpha-3)", "countrySubdivisionTaxResidence": "string" }

PATCH /v2/auth/validate

// Request
{ "email": "string", "emailToken": "string" }

POST /v2/auth/forgot-password

// Request
{ "email": "string" }

PATCH /v2/auth/reset-password/{reset-token}

// Request
{ "password": "string", "confirmPassword": "string" }

Token Usage

  • Header: Authorization: Bearer {accessToken}
  • V2 uses 2-step login (login sends email, validate-login confirms)
  • 4platforms uses 1-step login (returns tokens directly)

4.2 Account

GET /v2/account/account-info

// Response
{
"id": "uuid",
"email": "string",
"name": "string",
"wallets": [{ "id": "uuid", "chain": "string", "address": "string" }],
"brCode": "string",
"pixKey": "string"
}

GET /v2/account/balances

// Response
{
"balances": {
"BRLA": "518.00",
"USDC": "1.753243",
"USDT": "0",
"EURC": "0",
"USDM": "0"
}
}

GET /v2/account/metadata

// Response
{
"skipLiveness": false,
"easierLevel1": false,
"brlUnlocked": true,
"usdUnlocked": false,
"eurUnlocked": false,
"arsUnlocked": false,
"copUnlocked": false,
"mxnUnlocked": false
}

GET /v2/account/limits

// Response
{
"limits": [{
"currency": "BRL",
"maxFiatIn": "decimal",
"maxFiatOut": "decimal",
"maxChainIn": "decimal",
"maxChainOut": "decimal",
"usedLimit": { "fiatIn": "decimal", "fiatOut": "decimal", "chainIn": "decimal", "chainOut": "decimal" }
}]
}

GET /v2/account/statement

Query: createdAfter, createdBefore, cursor, subAccountId

// Response
{
"logs": [{
"token": "string",
"balanceChange": "decimal",
"finalBalance": "decimal",
"description": "string",
"createdAt": "ISO8601"
}],
"cursor": "string"
}

GET /v2/account/access-info

// Response
{
"id": "uuid",
"email": "string",
"permissions": { "admin": true, "payIn": true, "payOut": true, "convert": true, "onChain": true }
}

4.3 KYC

POST /v2/kyc/new-level-1/api

// Request
{
"fullName": "string",
"dateOfBirth": "YYYY-MM-DD",
"countryOfTaxId": "string (ISO alpha-3)",
"taxIdNumber": "string",
"email": "string",
"phone": "string (optional)",
"country": "string (ISO alpha-3)",
"state": "string",
"city": "string",
"zipCode": "string",
"streetAddress": "string",
"uploadedSelfieId": "string (from document upload)",
"uploadedDocumentId": "string (from document upload)",
"sandboxReject": false
}
// Response
{ "id": "uuid" }

POST /v2/kyc/new-level-1/web-sdk

// Request (optional)
{ "redirectUrl": "string" }
// Response
{
"attemptId": "string",
"authorizedRepresentativeUrl": "string",
"basicCompanyDataUrl": "string"
}

POST /v2/documents/

// Request
{ "documentType": "ID|DRIVERS-LICENSE|PASSPORT|SELFIE|SELFIE-FROM-LIVENESS" }
// Response
{ "documentId": "string", "uploadUrl": "string (S3 presigned)" }

Then PUT the file to uploadUrl.

Currency-Specific KYC (all require Level 1 APPROVED first)

EndpointRequestResponse
POST /v2/kyc/usd/api{ "sandboxReject": false }{ "attemptId": "uuid" }
POST /v2/kyc/eur/api{ "sandboxReject": false }{ "attemptId": "uuid" }
POST /v2/kyc/cop/api(empty){ "attemptId": "uuid" }
POST /v2/kyc/mxn/api(empty){ "attemptId": "uuid" }

POST /v2/kyc/import-token

// Request
{ "importToken": "string" }
// Response
{ "id": "string", "message": "string" }

GET /v2/kyc/attempts/

Query: createdAfter, createdBefore, levelName, status, result, cursor, subAccountId

// Response item
{
"id": "uuid",
"levelName": "string",
"status": "PENDING|PROCESSING|COMPLETED|EXPIRED",
"result": "APPROVED|REJECTED",
"resultMessage": "string",
"retryable": true,
"createdAt": "ISO8601"
}

4.4 Quote

GET /v2/account/quote/fixed-rate

Query Parameters:

ParamRequiredTypeValues
inputCurrencyYesstringBRL, USD, EUR, ARS, COP, MXN, BRLA, USDC, USDCe, USDT, USDM, EURC
inputPaymentMethodYesstringPIX, WIRE, ACH, SEPA, BANK-TRANSFER, SPEI, INTERNAL, POLYGON, CELO, ETHEREUM, GNOSIS, MOONBEAM, BASE, TRON, AVALANCHE
outputCurrencyYesstringSame as inputCurrency
outputPaymentMethodYesstringSame as inputPaymentMethod + PIX-BRCODE, REFUND, TED, ACH_SAME_DAY
inputAmountOne ofdecimalAmount in input currency
outputAmountOne ofdecimalAmount in output currency
inputThirdPartyYesboolfalse (currently inactive)
outputThirdPartyYesboolfalse (currently inactive)
blockchainSendMethodConditionalstringPERMIT or TRANSFER (required when input is blockchain)
markupFloatingFeeNodecimalPlatform markup % (0.01 = 1%)
markupInputFixedFeeNodecimalFixed fee on input
markupOutputFixedFeeNodecimalFixed fee on output
markupCurrencyNostringBRLA, USDC, or USDT only
subAccountIdNouuidOperate on sub-account
outputBrCodeNostringRequired for PIX-BRCODE output
ticketRefundIdNouuidRequired for REFUND output
settlementTermsNostringFAST (default) or D0

Response:

{
"quoteToken": "string (JWT — pass to create ticket)",
"inputCurrency": "string",
"inputPaymentMethod": "string",
"inputAmount": "decimal",
"outputCurrency": "string",
"outputPaymentMethod": "string",
"outputAmount": "decimal",
"markupAmount": "decimal",
"markupCurrency": "string",
"blockchainSendMethod": "string",
"inputThirdParty": false,
"outputThirdParty": false,
"appliedFees": [
{ "type": "string", "description": "string", "amount": "decimal", "currency": "string", "rebatable": false }
],
"basePrice": "decimal",
"pairName": "string",
"settlementTerms": "string",
"settlementDate": "ISO8601"
}

Validation rules:

  • inputAmount XOR outputAmount — exactly one, never both, never zero
  • Max 6 decimal places for crypto, 2 for fiat
  • Quote validity: ~15 seconds (JWT expiration)

4.5 Ticket

POST /v2/account/tickets/

Base request (always required):

{
"quoteToken": "string (REQUIRED — from quote endpoint)"
}

Optional base fields:

{
"externalId": "string (max 68 chars, for tracking)",
"customDuration": 600
}

Input-specific fields (include ONE based on inputPaymentMethod):

Input MethodFieldJSON
BRL-PIXticketBrlPixInput{ "remitterId": "string (if thirdParty)", "additionalData": "string (max 35)" }
ARS-BANK-TRANSFERticketArsInput{ "senderCuit": "string (11 digits, REQUIRED)" }
EUR-SEPAticketEurSepaInput{ "remitterId": "string (if thirdParty)", "additionalData": "string (max 140)" }
USD-WIRE/ACHticketUsdInput{ "remitterId": "string (if thirdParty)", "additionalData": "string (max 140)" }
Blockchain PERMITticketBlockchainInput{ "walletAddress": "string", "permit": { "r": "string", "s": "string", "v": 0, "nonce": 0, "deadline": 0 } }
Blockchain TRANSFERticketBlockchainInput{ "walletAddress": "string" }
Blockchain Personal SigticketBlockchainInput{ "walletAddress": "string", "personal": { "signature": "string", "deadline": 0 } }
COP-BANK-TRANSFER(none)No user input needed
MXN-SPEI(none)No user input needed

Output-specific fields (include ONE based on outputPaymentMethod):

Output MethodFieldJSON
BRL-PIXticketBrlPixOutput{ "beneficiaryBrlBankAccountId": "uuid", "pixMessage": "string" } OR { "pixKey": "string" } OR full bank details
BRL-PIX-BRCODE(none)BR code was in quote params
BRL-REFUND(none)Refund ticket ID was in quote params
USD-WIREticketUsdOutput{ "beneficiaryUsdBankAccountId": "uuid", "wireMessage": "string (max 256)" }
USD-ACHticketUsdOutput{ "beneficiaryUsdBankAccountId": "uuid", "achReference": "string (max 10)" }
EUR-SEPAticketEurSepaOutput{ "beneficiaryEurBankAccountId": "uuid", "sepaReference": "string (6-140 chars)" }
COP-BANK-TRANSFERticketCopOutput{ "beneficiaryCopBankAccountId": "uuid" }
ARS-BANK-TRANSFERticketArsOutput{ "beneficiaryArsBankAccountId": "uuid" }
MXN-SPEIticketMxnOutput{ "beneficiaryMxnBankAccountId": "uuid" }
Blockchain (INTERNAL)ticketBlockchainOutput{ "beneficiaryWalletId": "uuid" } OR { "walletAddress": "string", "walletChain": "string" }
Blockchain (chain)ticketBlockchainOutput{ "beneficiaryWalletId": "uuid" } (REQUIRED — registered beneficiary)

Markup (optional):

{ "ticketMarkupInput": { "markupWalletAddress": "string" } }

Response varies by input payment method:

Input MethodAdditional Response Fields
BRL-PIX{ "id": "uuid", "expiration": "ISO8601", "brCode": "string" }
USD-WIRE/ACH{ "id": "uuid", "usdDepositInstructions": { "accountHolderName", "bankAccountNumber", "bankRoutingNumber", "accountType", "bankName", "bankAddress", "depositMessage", "paymentRail" } }
EUR-SEPA{ "id": "uuid", "eurDepositInstructions": { "bankBeneficiaryName", "iban", "bic", "bankName", "depositMessage", "paymentRail", "currency", "amount" } }
COP-BANK-TRANSFER{ "id": "uuid", "depositUrl": "string (PSE payment link)" }
MXN-SPEI{ "id": "uuid", "speiClabe": "string", "speiBankName": "string", "speiBankCode": "string" }
Blockchain{ "id": "uuid" }
All outputs{ "id": "uuid" }

Ticket expiration rules:

  • Same underlying currency: 72 hours
  • Cross-currency: 10 minutes
  • MXN-SPEI input: 35 minutes (override)
  • D0 settlement: expires at 19:30 UTC same day
  • customDuration: min 300s, cannot exceed default

GET /v2/account/tickets/{ticket-id}

// Response
{
"id": "uuid",
"externalId": "string",
"status": "UNPAID|PROCESSING|PAID|FAILED|PARTIAL-FAILED|CANCELED",
"reason": "string",
"failureReason": "string",
"createdAt": "ISO8601",
"updatedAt": "ISO8601",
"expiresAt": "ISO8601",
"quote": {
"inputCurrency": "string",
"inputPaymentMethod": "string",
"inputAmount": "decimal",
"outputCurrency": "string",
"outputPaymentMethod": "string",
"outputAmount": "decimal",
"markupCurrency": "string",
"markupAmount": "decimal",
"sendMethod": "string",
"basePrice": "decimal",
"appliedFees": [{ "type", "description", "amount", "currency" }],
"pairName": "string"
},
"brazilianFiatSenderInfo": { "brCode", "endToEndId", "name", "taxId", "bankCode", "branchCode", "accountNumber", "accountType" },
"brazilianFiatReceiverInfo": { "pixKey", "taxId", "userName", "bankCode", "branchCode", "accountNumber", "endToEndId", "brCode" },
"blockchainSenderInfo": { "walletAddress", "txHash" },
"blockchainReceiverInfo": { "walletAddress", "walletChain", "walletMemo", "txHash" },
"americanFiatSenderInfo": { "accountHolderName", "bankAccountNumber", "bankRoutingNumber", "bankName", "depositMessage", "paymentRail" },
"americanFiatReceiverInfo": { "same fields" },
"europeanFiatSenderInfo": { "bankBeneficiaryName", "iban", "bic", "bankName", "depositMessage", "paymentRail" },
"europeanFiatReceiverInfo": { "same fields" },
"argentineFiatSenderInfo": { "cvu", "cuit", "name", "transactionId" },
"argentineFiatReceiverInfo": { "cvu", "cuit", "accountHolder", "transactionId" },
"markupInfo": { "markupWalletAddress", "txHash" }
}

GET /v2/account/tickets/

Query: createdAfter, createdBefore, cursor, status, inputCurrency, inputPaymentMethod, outputCurrency, outputPaymentMethod, endToEndId, externalId, subAccountId

PATCH /v2/account/tickets/{ticket-id}/cancel

No body needed.

GET /v2/account/tickets/{ticket-id}/receipt

Returns PDF binary (only for PAID tickets).


4.6 Beneficiaries

Wallet Beneficiary

POST /v2/account/beneficiaries/wallets/

// Request
{ "alias": "string", "description": "string", "walletAddress": "string", "walletChain": "string", "walletMemo": "string" }
// Response
{ "id": "uuid" }

Valid chains: POLYGON, CELO, ETHEREUM, GNOSIS, MOONBEAM, TRON, BASE, AVALANCHE

GET /v2/account/beneficiaries/wallets/ Query: createdAfter, createdBefore, cursor, alias, walletAddress, walletChain, subAccountId

// Response item
{ "id": "uuid", "alias": "string", "description": "string", "walletAddress": "string", "walletChain": "string", "walletMemo": "string", "createdAt": "ISO8601" }

BRL Bank Account

POST /v2/account/beneficiaries/bank-accounts/brl/

// Option 1: PIX key (auto-resolves bank details)
{ "alias": "string", "pixKey": "string" }
// Option 2: Full bank details
{ "alias": "string", "description": "string", "userName": "string", "bankCode": "string (3 or 8 digits)", "branchCode": "string", "accountNumber": "string", "accountType": "checking|payment|savings|salary", "taxId": "string (CPF or CNPJ)" }
// Response
{ "id": "uuid" }

USD Bank Account

POST /v2/account/beneficiaries/bank-accounts/usd/

// Request
{
"alias": "string",
"description": "string",
"bankAccountNumber": "string",
"bankRoutingNumber": "string (ABA)",
"bankBeneficiaryName": "string",
"bankName": "string",
"beneficiaryAddress": {
"streetLine1": "string", "streetLine2": "string",
"city": "string", "state": "string",
"postalCode": "string", "country": "string"
},
"bankAddress": { "streetLine1": "string", "city": "string", "state": "string", "postalCode": "string", "country": "string" }
}
// Response
{ "id": "uuid" }

EUR Bank Account

POST /v2/account/beneficiaries/bank-accounts/eur/

// Request
{
"alias": "string",
"description": "string",
"iban": "string",
"bic": "string (optional)",
"country": "string (ISO alpha-3)",
"bankBeneficiaryName": "string",
"isBusiness": false
}
// Response
{ "id": "uuid" }

Note: SEPA only — SWIFT NOT supported.

COP Bank Account

POST /v2/account/beneficiaries/bank-accounts/cop/

// Request
{
"alias": "string",
"description": "string",
"beneficiaryName": "string",
"beneficiaryType": "string",
"beneficiaryEmail": "string",
"beneficiaryAddress": {},
"phoneNumber": "string",
"accountType": "string",
"bankAccountNumber": "string",
"documentNumber": "string (6-10 digits, Cedula)",
"documentType": "string",
"bankId": "string (bank_cop_XXX format)",
"bankName": "string"
}
// Response
{ "id": "uuid" }

GET /v2/account/beneficiaries/bank-accounts/cop/supported-banks

// Response
{ "banks": [{ "bankId": "bank_cop_022", "bankName": "Bancolombia" }, ...] }

MXN Bank Account

POST /v2/account/beneficiaries/bank-accounts/mxn/

// Request
{
"alias": "string",
"description": "string",
"beneficiaryName": "string",
"beneficiaryType": "string",
"beneficiaryEmail": "string",
"beneficiaryAddress": {},
"phoneNumber": "string",
"clabe": "string",
"bankId": "string",
"bankName": "string"
}
// Response
{ "id": "uuid" }

GET /v2/account/beneficiaries/bank-accounts/mxn/supported-banks

// Response
{ "banks": [{ "bankId": "string", "bankName": "string" }, ...] }

ARS Bank Account

POST /v2/account/beneficiaries/bank-accounts/ars/

// Request
{ "alias": "string", "description": "string", "cvu": "string" }
// Response
{ "id": "uuid", "accountData": { "cvu": "string", "accountHolders": [{ "cuit": "string", "name": "string" }] } }

4.7 Subaccounts

POST /v2/account/sub-accounts/

// Request
{ "name": "string", "accountType": "INDIVIDUAL" }
// Response
{ "id": "uuid" }

GET /v2/account/sub-accounts/

// Response
{ "subAccounts": [{ "id": "uuid", "name": "string", "accountType": "string", "createdAt": "ISO8601" }] }

4.8 Webhooks

POST /v2/notifications/webhooks/

// Request
{ "url": "string", "subscriptions": ["TICKET", "KYC", "LIMIT-UPDATE"] }
// Response
{ "id": "uuid" }

Max 3 webhooks per account. Subscription "*" = all events.

Webhook Event Types

  • TICKET: TICKET-CREATED, DEPOSIT-PROCESSING, DEPOSIT-SUCCESS, DEPOSIT-FAILED, DELIVERY-PROCESSING, DELIVERY-SUCCESS, DELIVERY-FAILED, TICKET-COMPLETE, DELIVERY-PARTIAL-FAILED
  • KYC: KYC status changes
  • LIMIT-UPDATE: Limit changes

Signature Verification

  • Header: Signature (base64)
  • Verify with RSA public key from GET /v2/public-key (PSS padding, SHA256)

4.9 Banking

GET /v2/account/bank-accounts/brl/

Own BRL bank account info (Avenia's account for receiving PIX).

GET /v2/account/bank-accounts/brl/pix-info

Lookup PIX key owner info.

GET /v2/account/bank-accounts/brl/static-br-code

Query: amount (required), referenceLabel (required, max 19 chars), additionalData (max 35), subAccountId Returns a static BR code string.


4.10 MFA

POST /v2/auth/mfa/totp/create

// Response
{ "secret": "string", "qrCode": "string (base64 PNG)" }

POST /v2/auth/mfa/totp/validate

// Request
{ "otp": "string (6 digits)", "emailToken": "string" }

4.11 API Keys

POST /v2/auth/api-keys/

// Request
{ "otp": "string", "name": "string", "publicKey": "string (PEM)", "whitelistedIPs": ["CIDR"] }
// Response
{ "apiKey": "uuid" }

API Key auth headers:

  • X-API-Key: UUID
  • X-API-Timestamp: unix millis
  • X-API-Signature: base64(sign(sha256(idempotencyKey + timestamp + method + requestURI + body)))
  • X-API-IdempotencyKey: unique string

Supports RSA, ECDSA, Ed25519.


4.12 Payment Sessions (V2 only)

POST /v2/account/payment-session/

Creates a hosted payment page. This is a V2-specific feature (not in 4platforms).

GET /v2/payment-session/{id} (public, no auth)

Get payment session details for the hosted page.


4.13 Address & Proof of Address

GET /v2/account/address/

PUT /v2/account/address/

POST /v2/account/address/proof-of-address/api


5. Proxy Mapping (V2 → 4platforms)

V2: /v2/account/{feature}
4plat: /v2/workspaces/{workspaceId}/users/{userId}/{feature}
  • V2 resolves workspaceId + userId from JWT token subject → AccountInfo DB lookup
  • V2 replaces user's JWT with a service-to-service JWT for 4platforms calls
  • Most request/response bodies are passed through as raw JSON
  • Headers added: Content-Type: application/json, Authorization: Bearer {serviceJWT}

6. Documented Use Cases (Flow Templates for Builder)

Template 1: PIX → Stablecoin → PIX

Login → KYC → Create subaccount → Subaccount KYC → Webhook setup → PIX IN (BRL→BRLA) → Check balance → PIX OUT (BRLA→BRL)

Template 2: PIX → Stablecoin → On-Chain Transfer

Login → KYC → Create subaccount → Subaccount KYC → Webhook setup → PIX IN (BRL→BRLA) → Convert BRLA→USDC → Transfer to external wallet

Template 3: PayOut via BrCode

Login → Create subaccount → KYC → Fund via PIX → Get quote (PIX-BRCODE output) → Create ticket

Template 4: Sandbox Mock Flow

Quote (BRL PIX → crypto) → Create ticket → Simulated payment → Balance credited


7. Things Missing from Current Builder (NEW blocks needed)

FeatureCurrent BuilderNeeded in v2
ARS operationsNoYes — BANK-TRANSFER in/out
COP operationsNoYes — BANK-TRANSFER in/out, supported-banks
MXN operationsNoYes — SPEI in/out, supported-banks
EUR operationsNoYes — SEPA in/out
USD operationsPartialFull — WIRE, ACH, ACH_SAME_DAY
SubaccountsNoYes — create, list, operate on behalf
WebhooksNoYes — register, manage, verify
MFA/TOTPNoYes — setup, validate
API KeysNoYes — register with public key
Payment SessionsNoYes — create hosted payment page
Document UploadNoYes — pre-signed URL flow for KYC
Currency-specific KYCNoYes — USD, EUR, COP, MXN KYC blocks
Account CreationNoYes — create + validate email
Static BR CodeNoYes — generate for receiving
Ticket ReceiptNoYes — download PDF
Ticket CancelNoYes — cancel unpaid ticket
Address/PoANoYes — address management
Email NotificationsNoYes — configure email alerts
Supported BanksNoYes — COP, MXN bank lists

8. Key Source Files Reference

BRLAForPlatforms

  • Valid combinations: Lib/pkg/quoteUtils/quoteUtils.go
  • Ticket entity + all sub-structs: Lib/entities/ticket.go
  • TicketApi (GET response): Lib/entities/ticketApi.go
  • Quote entity: Lib/entities/quote.go
  • Chain constants: Lib/entities/blockchainInstruction.go
  • Create ticket usecase: UsersService/internal/usecases/createTicket.go
  • Quote validation: PricingService/internal/usecases/quote.go
  • Routes: ApiGateway/internal/infra/webServer/routes/*.go
  • DTOs: ApiGateway/internal/dtos/*.go

BRLAV2

  • Routes: ApiGateway/internal/infra/webServer/routes/*.go
  • DTOs: ApiGateway/internal/dtos/*.go
  • 4platforms SDK (proxy): Lib/pkg/brlaForPlatformsSDK/brlaForPlatformsSDK.go
  • Config: Lib/configs/configs.go

Integration Guide

  • Combinations: docs/Operations/combinations.md
  • Use cases: docs/Usecases/*.md
  • KYC: docs/KYC/*.md
  • Auth: docs/Security/*.md