Gateway API — Flow Examples
All endpoints require authentication via API key and signature.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 gateway is enabled
Required permission:general_data_read
enabled: true, account_enabled: true, and blocked: false.
Step 3 — Execute the send
Required permission:withdrawal_write
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.
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.
error_code | Condition |
|---|---|
GTW_0404 | Gateway crypto is disabled or not enabled for the account |
CUR_0403 | Currency is disabled or not available for sending |
NET_0400 | gateway_data.network value is unknown |
NET_0401 | Network exists but send is currently disabled for that currency |
ADR_0400 | Address is invalid for the selected network (includes sending to own address) |
ADR_0401 | Destination address is blacklisted |
ADR_0402 | Address flagged as high risk by compliance |
FEE_0401 | network_fee is below the accepted minimum for the current conditions |
TXN_0401 | Amount is below the network minimum or above the network maximum |
OTP_0401 | OTP code required but not provided (send above amount threshold) |
OTP_0400 | OTP code is incorrect |
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
min_amount and max_amount, and that remaining.daily_amount is sufficient.
Step 2 — Execute the CVU withdrawal
Required permission:withdrawal_write
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):
error_code | Condition |
|---|---|
TXN_0500 | Account country is not AR |
GTW_0404 | CVU gateway is disabled |
TXN_0450 | bank_account not provided in gateway_data |
CVU_1000 | Account does not have a Ripio CVU |
CVU_1006 | Account’s CVU is temporarily blocked |
CVU_1005 | bank_account format is invalid, or destination account is not in ARS |
OTP_0401 | OTP required but not provided (third-party transfer above amount threshold) |
OTP_0400 | OTP code is incorrect |
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:Validotp_codeis only required for transfers to third-party PIX keys above the configured amount threshold. For PIX keys registered in the user’s own account (/banking/pix/), it can be omitted.
pix_key examples:
- CPF:
"123.456.789-00"or"12345678900" - Email:
"[email protected]" - Phone:
"+5511999990000" - Random key (EVP):
"e5f3b2a1-4c6d-11ed-bdc3-0242ac120002"
error_code | Condition |
|---|---|
TXN_0500 | Account country is not BR |
GTW_0404 | PIX gateway is disabled |
TXN_0450 | pix_key not provided in gateway_data |
PIX_0400 | PIX key is registered in the account but is disabled |
PIX_0401 | PIX recipient bank account is inactive |
PIX_0402 | PIX key ownership data does not match the expected recipient |
PIX_0500 | External PIX provider returned an error |
Flow 4: Transaction queries
List transactions with filters
Required permission:general_data_read
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.
| Parameter | Type | Description |
|---|---|---|
gateway | string | Filter by gateway: crypto, bank-transfer-cvu, pix, balance |
currency | string | Filter by currency (matches both currency and crypto_currency) |
txn_type | enum | Raw type: BUY, SELL, SWAP, SEN, REC, WIT, DEP |
payment_method_id | int | Filter by payment method ID |
ordering | enum | date_created or -date_created (default) |
cursor | string | Opaque token returned in nc/pc from the previous response |
Fetch a transaction detail
Possible transaction statuses
| Status | Description |
|---|---|
PEN | Pending |
PRO | Processing |
COM | Completed |
ERR | Error |
WTG | Waiting |
CAN | Cancelled |
REF | Refunded |
REJ | Rejected |
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:
error_code | HTTP | Meaning |
|---|---|---|
ERR_0001 | 500 | Internal error |
ERR_0003 | 400 | Bad request |
ERR_0004 | 404 | Not found |
ERR_0005 | 409 | Conflict |
ERR_0006 | 503 | Service unavailable |
ERR_0008 | 401 | Unauthorized |
ERR_0009 | 403 | Forbidden |
ERR_0010 | 405 | Method not allowed |
ERR_0011 | — | Generic / unmapped |
ERR_0012 | 429 | Too many requests |
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
| Endpoint | Method | Permission | Description |
|---|---|---|---|
/health/ | GET | — | Health check |
/account/ | GET | general_data_read | Account profile |
/balance/ | GET | general_data_read, balance_read | All balances |
/balance/wallet | GET | general_data_read, balance_read | Wallet balances (excluding DEX) |
/balance/viral | GET | general_data_read, balance_read | DEX balances (memecoins) |
/currencies/ | GET | general_data_read | Available currencies |
/rates/ | GET | general_data_read | Exchange rates |
/addresses/ | GET | general_data_read | Account crypto addresses |
/network/currency-networks/{currency}/ | GET | general_data_read | Available networks for a currency |
/transactions/gateways/ | GET | general_data_read | Gateways and their enabled actions |
/transactions/limits/ | GET | general_data_read | Operational limits by gateway |
/transactions/ | GET | general_data_read | Transaction list (cursor-paginated) |
/transactions/{pk}/ | GET | general_data_read | Transaction detail |
/transactions/crypto/send/ | POST | withdrawal_write | Send crypto to an external address |
/transactions/bank-transfer-cvu/withdrawal/ | POST | withdrawal_write | Withdrawal to CVU/CBU (AR only) |
/transactions/pix/withdrawal/ | POST | withdrawal_write | Withdrawal via PIX (BR only) |
/banking/cvu/ | GET | general_data_read | User’s own CVU (AR only) |
/banking/pix/ | GET | general_data_read | Registered PIX accounts (BR only) |