Gateway API — Flow Examples
All endpoints require authentication via API key and signature.Migrating from a previous version? See the Migration Guide for a breakdown of what changed (rails/transaction-type vocabulary, renamed paths, response shapes) and the deadlines for deprecated endpoints.
Response structure
All endpoints return the same flat, client-friendly envelope:- On success:
error_codeandmessagearenull;dataholds the payload. - On error:
error_codeandmessageare populated;dataisnull(or contains field-level details when applicable).
pagination inside data alongside results (or a custom wrapper key):
nc / pc instead of pagination:
nc= next cursor,pc= previous cursor. These are opaque base64 tokens — the client must pass them back verbatim via?cursor=<token>without parsing them.
Flow 1: Crypto Send
To perform a crypto send you need thenetwork and the network_fee for the currency being sent. Both are retrieved from the networks endpoint.
Step 1 — Fetch available networks for the currency
Required permission:general_data_read
network.code→ value to use ingateway_data.networkof the send requestfee→ value to use innetwork_feeof the send requestsend: true→ confirms that sending is enabled for that networknetwork.use_memo→ indicates whether amemo_idmust be included
Step 2 (optional) — Verify the crypto rail is enabled
Required permission:general_data_read
The legacyResponse:GET /transactions/gateways/still works as a deprecated alias returning the same response.swapis now grouped underrail: "ripio".
enabled: true, account_enabled: true, and blocked: false.
Step 3 — Execute the send
Required permission:withdrawal_write
The legacy POST /transactions/crypto/send/ still works as a deprecated alias until August 15, 2026.
Body (using data from Step 1 — Tron network):
Note on OTP code: otp_code parameter is NOT needed for send to a whitelisted address. Addresses can be whitelisted from Ripio App. Public endpoint to whitelist addressess and bank accounts is coming soon.
Note on network fee: Although the backend validatesResponse (201 Created):network_fee, the client must send it explicitly (retrieved from the network endpoint). This allows knowing the total cost of the operation (amount+network_fee) upfront before confirming it. Without this value, the backend would deduct the fee from the sent amount and the recipient would receive less than expected. Thenetwork_feevalue is honored as long as the transaction is accepted.
transaction_hashisnulluntil the withdrawal is broadcast on-chain; once broadcast it holds the on-chain hash.
Note on memo networks: For networks that use a memo such as XRP (Business rule errors:use_memo: true),memo_idmust be included ingateway_data.
When there are errors in multiple fields,error_code/messagesurface the first one (useful for a toast notification) anddatapreserves the full structure for mapping errors to each form input.
Flow 2: CVU Withdrawal (Argentina)
Only available for accounts withcountry: AR and an assigned CVU. Withdraws ARS to a previously verified CVU/CBU bank account.
Step 1 — Fetch gateway limits
Required permission:general_data_read
An unlimited period is returned asVerify that the amount to withdraw is betweennull(e.g.annual_amountabove), never the internal-1.currencyis nevernull: it is the user’s fiat (orUSDTforswap).
min_amount and max_amount, and that remaining.daily_amount is sufficient.
Step 2 — Execute the CVU withdrawal
Required permission:withdrawal_write
The legacy POST /transactions/bank-transfer-cvu/withdrawal/ still works as a deprecated alias until August 15, 2026.
Body:
bank_account can be an alias, CBU, or external CVU as the destination.
Note on OTP code: otp_code parameter is only needed for transfers to third party accounts. Endpoint to whitelist (no need for OTP) bank accounts coming soon.
Response (201 Created):
Business rule errors:extra_dataonly exposes operational keys (provider_reference,bank_account,bank_name). No personal data is included.
Flow 3: PIX Withdrawal (Brazil)
Only available for accounts withcountry: BR. Withdraws BRL using a destination PIX key.
Step 1 — Fetch gateway limits
Required permission:general_data_read
Step 2 — Execute the PIX withdrawal
Required permission:withdrawal_write
Note on OTP code: otp_code is only required for transfers to third-party PIX keys above the configured amount threshold. For PIX keys registered to the user’s own account, it can be omitted.
Valid pix_key examples:
- CPF:
"123.456.789-00"or"12345678900" - Email:
"[email protected]" - Phone:
"+5511999990000" - Random key (EVP):
"e5f3b2a1-4c6d-11ed-bdc3-0242ac120002"
Flow 4: Transaction queries
List transactions with filters
Required permission:general_data_read
Each item is the full transaction body (same shape as the create response and the detail endpoint). Fields are abbreviated below for readability.Response (cursor pagination):
TheNext page:ncandpctokens are opaque (URL-safe base64). The client passes them back verbatim via?cursor=<token>. Do not attempt to parse or modify them.
Fetch a transaction detail
Possible transaction statuses
Flow 5: Balance check before operating
Before executing any operation, it is recommended to verify the available balance. Required permissions:general_data_read, balance_read
amount: available balance (the amount that can be used in operations)locked_amount: funds reserved by open orders
Generic error codes
When the upstream service does not return a specific{code, detail} atom (e.g. authentication errors or DRF-level errors), the gateway falls back to generic codes mapped by HTTP status:
Example response when no valid credentials are provided:
Domain-specific codes (TXN_0420,CURR_0002,CVU_1000, etc.) are passed through unchanged from the upstream microservice.ERR_XXXXcodes only appear when no specific code is found.
For more information on error codes, refer to the Errors page.
Quick endpoint reference
Account state: write endpoints (and the banking/contacts resources) additionally require a fully operative account; country-restricted endpoints (CVU = AR, PIX = BR) enforce the account’s country.
Legacy paths (removed August 15, 2026): the write/quote paths andbanking/deposit-accounts/replace their legacy equivalents —crypto/send/,bank-transfer-cvu/withdrawal/,balance/send/,balance/swap/,promises/,transactions/gateways/,banking/cvu/,banking/pix/— which keep working (with aDeprecationheader) until that date.