API Reference
Create a withdrawal
/v1/operations/withdrawalshttps://trace.mimicr.dev · provider: https://api.sandbox.tracefinance.comCreates a withdrawal that debits the customer's account and sends funds to an external beneficiary via the resolved payment rail. Returns 201 immediately with the operation in REQUESTED status; settlement and rail dispatch happen asynchronously. In the current slice, only saved beneficiaries (mode: "REFERENCE" for both beneficiary and paymentInstruction) are accepted. The instruction's rail must be PIX_KEY or PIX_BANK_INSTRUCTION and its settlement asset must be BRL.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Headers
Unique key to ensure idempotent request processing. Required on all POST, PUT, and PATCH requests.
API version. Omit to use the default version.
"1"Body
application/jsonYour own identifier for the operation. Stored as given and returned on every read and every webhook. Free-form: it is not deduplicated, and the same value may appear on more than one operation. null when none was sent, and on a deposit credited from an incoming payment nobody requested.
"order-2026-0043"Account that funds the withdrawal. Must match the account on the referenced quote.
"a1b2c3d4-5e6f-7890-abcd-ef1234567890"ID of a quote returned by POST /v1/quotes. Must belong to the same customer, must not have expired, and must not have been consumed by another operation.
"d4e5f6a7-b8c9-0123-defa-2345678901bc"Beneficiary for the withdrawal. Discriminated by mode.
REFERENCE— points at a saved beneficiary byid.
REFERENCE
REFERENCEID of an existing beneficiary owned by the customer.
"b2c3d4e5-f6a7-8901-bcde-f12345678901"Payment instruction to use. Discriminated by mode.
REFERENCE— points at a saved instruction byid.
REFERENCE
REFERENCEID of an approved payment instruction on the referenced beneficiary.
"c3d4e5f6-a7b8-9012-cdef-1234567890ab"Responses
201Withdrawal accepted. The operation is in REQUESTED status.
Your own identifier for the operation. Stored as given and returned on every read and every webhook. Free-form: it is not deduplicated, and the same value may appear on more than one operation. null when none was sent, and on a deposit credited from an incoming payment nobody requested.
"order-2026-0043"Reference to the customer that owns the operation.
Show child attributes
Customer identifier.
"c1a2b3c4-d5e6-7890-abcd-ef1234567890"Reference to a customer account, including the registered owner name.
Show child attributes
Account identifier.
"a1b2c3d4-5e6f-7890-abcd-ef1234567890"Registered owner name on the account.
"Acme Importação Ltda"Monetary amount expressed as a decimal string in the asset's canonical scale. Use a decimal-precision library (BigDecimal, Decimal) for arithmetic — never JavaScript Number. Request bodies use the scalar AmountValue instead.
Show child attributes
Decimal amount in the asset's canonical scale.
"500.00"ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:
| Asset | Decimals |
|---|---|
| BRL | 2 |
| USDT | 6 |
| USDC | 6 |
BRLUSDTUSDC"BRL"Number of decimal places for the asset.
2Monetary amount expressed as a decimal string in the asset's canonical scale. Use a decimal-precision library (BigDecimal, Decimal) for arithmetic — never JavaScript Number. Request bodies use the scalar AmountValue instead.
Show child attributes
Decimal amount in the asset's canonical scale.
"500.00"ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:
| Asset | Decimals |
|---|---|
| BRL | 2 |
| USDT | 6 |
| USDC | 6 |
BRLUSDTUSDC"BRL"Number of decimal places for the asset.
2Operation intent. Discriminated by type.
WITHDRAW
WITHDRAWSnapshot of the beneficiary at the time the operation was created.
Show child attributes
ID of the saved beneficiary.
Entity snapshot. Discriminated by type.
INDIVIDUAL
INDIVIDUALIdentification document of the beneficiary. null when not provided.
IdentificationDocument
variant
Date of birth (yyyy-MM-dd). null when not provided.
Postal address of an entity or beneficiary.
Show child attributes
Primary street line (number + street).
Secondary line (apartment, suite, building). null if not applicable.
State, province, or region. null for countries without subdivisions in the address.
ISO 3166-1 alpha-2 country code.
249 values
AFALDZASADAOAIAQAGARAMAWAUATAZBSBHBDBBBYBEBZBJBMBTBOBQBABWBVBRIOBNBGBFBICVKHCMCAKYCFTDCLCNCXCCCOKMCDCGCKCRHRCUCWCYCZCIDKDJDMDOECEGSVGQEREESZETFKFOFJFIFRGFPFTFGAGMGEDEGHGIGRGLGDGPGUGTGGGNGWGYHTHMVAHNHKHUISINIDIRIQIEIMILITJMJPJEJOKZKEKIKPKRKWKGLALVLBLSLRLYLILTLUMOMGMWMYMVMLMTMHMQMRMUYTMXFMMDMCMNMEMSMAMZMMNANRNPNLNCNZNINENGNUNFMPNOOMPKPWPSPAPGPYPEPHPNPLPTPRQAMKRORURWREBLSHKNLCMFPMVCWSSMSTSASNRSSCSLSGSXSKSISBSOZAGSSSESLKSDSRSJSECHSYTWTJTZTHTLTGTKTOTTTNTRTMTCTVUGUAAEGBUMUSUYUZVUVEVNVGVIWFEHYEZMZWAX"BR"Postal or ZIP code, formatted per the country's convention.
COMPANY
COMPANYRegistered legal name.
Trade name (DBA). null if the company doesn't use one.
Identification document of the beneficiary. null when not provided.
IdentificationDocument
variant
Postal address of an entity or beneficiary.
Show child attributes
Primary street line (number + street).
Secondary line (apartment, suite, building). null if not applicable.
State, province, or region. null for countries without subdivisions in the address.
ISO 3166-1 alpha-2 country code.
249 values
AFALDZASADAOAIAQAGARAMAWAUATAZBSBHBDBBBYBEBZBJBMBTBOBQBABWBVBRIOBNBGBFBICVKHCMCAKYCFTDCLCNCXCCCOKMCDCGCKCRHRCUCWCYCZCIDKDJDMDOECEGSVGQEREESZETFKFOFJFIFRGFPFTFGAGMGEDEGHGIGRGLGDGPGUGTGGGNGWGYHTHMVAHNHKHUISINIDIRIQIEIMILITJMJPJEJOKZKEKIKPKRKWKGLALVLBLSLRLYLILTLUMOMGMWMYMVMLMTMHMQMRMUYTMXFMMDMCMNMEMSMAMZMMNANRNPNLNCNZNINENGNUNFMPNOOMPKPWPSPAPGPYPEPHPNPLPTPRQAMKRORURWREBLSHKNLCMFPMVCWSSMSTSASNRSSCSLSGSXSKSISBSOZAGSSSESLKSDSRSJSECHSYTWTJTZTHTLTGTKTOTTTNTRTMTCTVUGUAAEGBUMUSUYUZVUVEVNVGVIWFEHYEZMZWAX"BR"Postal or ZIP code, formatted per the country's convention.
Snapshot of the payment instruction the funds are routed to. Discriminated by rail.
PIX_KEY
Payment instruction identifier.
PIX_KEYPIX key category. RANDOM is a random key issued by the central bank.
CPFCNPJEMAILPHONERANDOM"CPF"PIX key value, formatted per keyType.
PIX_STATIC_QR_CODE
Payment instruction identifier.
PIX_STATIC_QR_CODEPIX QR code payload (EMV-encoded BR Code).
"00020126580014br.gov.bcb.pix..."PIX_BANK_INSTRUCTION
Payment instruction identifier.
PIX_BANK_INSTRUCTIONBank reference. Resolved server-side from the COMPE code provided in the request.
Show child attributes
COMPE code (3-digit Brazilian bank code, may be sent unpadded).
"001"Registered bank name.
"BANCO DO BRASIL S.A."ISPB code (8-digit Brazilian payment-system identifier). null when the bank is not registered with an ISPB.
"00000000"Branch number.
"0001"Account number with check digit.
"123456"TED
Payment instruction identifier.
TEDISPB or COMPE bank code.
Branch number.
Account number with check digit.
BOLETO
Payment instruction identifier.
BOLETOBoleto barcode (digitable line).
"23793.38128 60800.000003 00000.000400 1 84340000012345"Last day on which the boleto can be paid.
"2026-05-15T23:59:59Z"CRYPTO
Payment instruction identifier.
CRYPTOBlockchain network (e.g., ETHEREUM, TRON, SOLANA).
"ETHEREUM"Wallet address on network.
"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18"SWAP
SWAPDEPOSIT
DEPOSITFunding instruction the customer uses to send money in. null on the create-deposit response until the PIX dynamic QR code has been generated; populated once it is ready.
DepositOperationFundingInstruction
variant
TRANSFER
TRANSFERReference to a customer account, including the registered owner name.
Show child attributes
Account identifier.
"a1b2c3d4-5e6f-7890-abcd-ef1234567890"Registered owner name on the account.
"Acme Importação Ltda"Consumed quote. null for deposits created without a prior quote; present for all other operations.
OperationQuoteReference
Quote identifier.
Exchange rate between two assets.
Show child attributes
Rate value as a decimal string, expressed as quote units per one base unit.
"5.25"ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:
| Asset | Decimals |
|---|---|
| BRL | 2 |
| USDT | 6 |
| USDC | 6 |
BRLUSDTUSDC"BRL"ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:
| Asset | Decimals |
|---|---|
| BRL | 2 |
| USDT | 6 |
| USDC | 6 |
BRLUSDTUSDC"BRL"Time at which the quote was originally set to expire. null for quotes without an expiry.
variant
The refund you asked for on this deposit. null on every operation nobody asked back, and on a return the payer's bank issued on its own.
OperationRefund
The motive you sent on the refund request, returned as given.
Show child attributes
Machine-readable code.
"INSUFFICIENT_BALANCE"Human-readable description.
"Insufficient balance for the requested operation"Free-form context relevant to the reason.
When the refund was asked for.
"2026-04-29T11:02:04Z"variant
Show child attributes
Monetary amount expressed as a decimal string in the asset's canonical scale. Use a decimal-precision library (BigDecimal, Decimal) for arithmetic — never JavaScript Number. Request bodies use the scalar AmountValue instead.
Show child attributes
Decimal amount in the asset's canonical scale.
"500.00"ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:
| Asset | Decimals |
|---|---|
| BRL | 2 |
| USDT | 6 |
| USDC | 6 |
BRLUSDTUSDC"BRL"Number of decimal places for the asset.
2Where the fee originates. PLATFORM is charged by Trace Finance, RAIL by the underlying banking rail (PIX, TED, wire), CUSTOMER is a passthrough markup added by the customer.
FX_SPREADPLATFORMRAILCUSTOMERRail-level transactions for the operation. Only confirmed transactions are included; pending or failed rail movements are omitted.
Show child attributes
Rail-side transaction identifier.
Whether the rail debited or credited the account.
CREDITDEBITMonetary amount expressed as a decimal string in the asset's canonical scale. Use a decimal-precision library (BigDecimal, Decimal) for arithmetic — never JavaScript Number. Request bodies use the scalar AmountValue instead.
Show child attributes
Decimal amount in the asset's canonical scale.
"500.00"ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:
| Asset | Decimals |
|---|---|
| BRL | 2 |
| USDT | 6 |
| USDC | 6 |
BRLUSDTUSDC"BRL"Number of decimal places for the asset.
2Rail-level status. Always CONFIRMED — only confirmed transactions are exposed on the operation.
CONFIRMEDSystem-managed labels stamped onto the operation when it is created. Inherited from the account's propagating tags.
Show child attributes
Category for keyed tags (e.g., psp, compliance-tier). null for single-value labels.
"psp"For keyed tags, the right-hand side of the label. For single-value labels, the entire tag.
"Amazon"What compliance is waiting on for this operation, read live at request time. All four groups are empty for an operation that never went through a compliance review. An operation in ACTION_REQUIRED is waiting on whatever is in currentlyDue and errors.
Show child attributes
Compliance is waiting on you to send these.
Show child attributes
What the requirement is attached to: BENEFICIARY_DOCUMENT for a payment instruction, OPERATION_DOCUMENT for an operation.
BENEFICIARY_DOCUMENTOPERATION_DOCUMENT"BENEFICIARY_DOCUMENT"What compliance asked for. Usually a single document type, but it can name a family of documents — IDENTITY_VERIFICATION, for example — in which case anyOf lists the ones that satisfy it.
"IDENTITY_VERIFICATION"The document types that answer this requirement. Any one of them settles it — you do not send all of them. For a requirement naming a single document this holds exactly that one, so you can always read anyOf and ignore whether a family was asked for.
Why this requirement is open. Present when compliance explained itself, typically on errors.
Show child attributes
"DOCUMENT_REQUESTED""The file is not legible"You sent these and compliance is reviewing them. Nothing to do.
Show child attributes
What the requirement is attached to: BENEFICIARY_DOCUMENT for a payment instruction, OPERATION_DOCUMENT for an operation.
BENEFICIARY_DOCUMENTOPERATION_DOCUMENT"BENEFICIARY_DOCUMENT"What compliance asked for. Usually a single document type, but it can name a family of documents — IDENTITY_VERIFICATION, for example — in which case anyOf lists the ones that satisfy it.
"IDENTITY_VERIFICATION"The document types that answer this requirement. Any one of them settles it — you do not send all of them. For a requirement naming a single document this holds exactly that one, so you can always read anyOf and ignore whether a family was asked for.
Why this requirement is open. Present when compliance explained itself, typically on errors.
Show child attributes
"DOCUMENT_REQUESTED""The file is not legible"These came back — sent, then refused or asked for again. reason says why. Send a new file for the same requirement.
Show child attributes
What the requirement is attached to: BENEFICIARY_DOCUMENT for a payment instruction, OPERATION_DOCUMENT for an operation.
BENEFICIARY_DOCUMENTOPERATION_DOCUMENT"BENEFICIARY_DOCUMENT"What compliance asked for. Usually a single document type, but it can name a family of documents — IDENTITY_VERIFICATION, for example — in which case anyOf lists the ones that satisfy it.
"IDENTITY_VERIFICATION"The document types that answer this requirement. Any one of them settles it — you do not send all of them. For a requirement naming a single document this holds exactly that one, so you can always read anyOf and ignore whether a family was asked for.
Why this requirement is open. Present when compliance explained itself, typically on errors.
Show child attributes
"DOCUMENT_REQUESTED""The file is not legible"These are settled. Nothing to do.
Show child attributes
What the requirement is attached to: BENEFICIARY_DOCUMENT for a payment instruction, OPERATION_DOCUMENT for an operation.
BENEFICIARY_DOCUMENTOPERATION_DOCUMENT"BENEFICIARY_DOCUMENT"What compliance asked for. Usually a single document type, but it can name a family of documents — IDENTITY_VERIFICATION, for example — in which case anyOf lists the ones that satisfy it.
"IDENTITY_VERIFICATION"The document types that answer this requirement. Any one of them settles it — you do not send all of them. For a requirement naming a single document this holds exactly that one, so you can always read anyOf and ignore whether a family was asked for.
Why this requirement is open. Present when compliance explained itself, typically on errors.
Show child attributes
"DOCUMENT_REQUESTED""The file is not legible"The operation's current state. Carries a status, optional reason, and the time the state was entered.
Show child attributes
Lifecycle status of an operation. REFUNDING and REFUNDED apply only to deposits, the only refundable operation.
REQUESTEDPROCESSINGACTION_REQUIREDCOMPLETEDREFUNDINGREFUNDEDFAILED"COMPLETED"Justification for entering this status. Present for ACTION_REQUIRED and FAILED; omitted otherwise.
Show child attributes
Machine-readable code.
"INSUFFICIENT_BALANCE"Human-readable description.
"Insufficient balance for the requested operation"Free-form context relevant to the reason.
Time the operation entered this status.
400Validation error: missing or malformed fields.
Machine-readable error code.
Human-readable description.
401Missing or invalid authentication token.
Machine-readable error code.
Human-readable description.
404Account, beneficiary, or payment instruction not found for this customer.
Machine-readable error code.
Human-readable description.
409Idempotency key was reused with a different request body.
Machine-readable error code.
Human-readable description.
422Business rule violation.
Machine-readable error code.
Human-readable description.