curl --request POST \
--url https://app.sandbox.rio.trade/api/bank/accounts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"bankName": "Bank Name",
"accountHolderName": "Account Holder Name",
"userId": "66290ac8bd3903485989f82e",
"accountNumber": "0123456789",
"notes": "Notes",
"CCI": "00111233001112345678",
"CLABE": "012345678901234567",
"email": "<string>"
}
'import requests
url = "https://app.sandbox.rio.trade/api/bank/accounts"
payload = {
"bankName": "Bank Name",
"accountHolderName": "Account Holder Name",
"userId": "66290ac8bd3903485989f82e",
"accountNumber": "0123456789",
"notes": "Notes",
"CCI": "00111233001112345678",
"CLABE": "012345678901234567",
"email": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankName: 'Bank Name',
accountHolderName: 'Account Holder Name',
userId: '66290ac8bd3903485989f82e',
accountNumber: '0123456789',
notes: 'Notes',
CCI: '00111233001112345678',
CLABE: '012345678901234567',
email: '<string>'
})
};
fetch('https://app.sandbox.rio.trade/api/bank/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sandbox.rio.trade/api/bank/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'bankName' => 'Bank Name',
'accountHolderName' => 'Account Holder Name',
'userId' => '66290ac8bd3903485989f82e',
'accountNumber' => '0123456789',
'notes' => 'Notes',
'CCI' => '00111233001112345678',
'CLABE' => '012345678901234567',
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sandbox.rio.trade/api/bank/accounts"
payload := strings.NewReader("{\n \"bankName\": \"Bank Name\",\n \"accountHolderName\": \"Account Holder Name\",\n \"userId\": \"66290ac8bd3903485989f82e\",\n \"accountNumber\": \"0123456789\",\n \"notes\": \"Notes\",\n \"CCI\": \"00111233001112345678\",\n \"CLABE\": \"012345678901234567\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sandbox.rio.trade/api/bank/accounts")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bankName\": \"Bank Name\",\n \"accountHolderName\": \"Account Holder Name\",\n \"userId\": \"66290ac8bd3903485989f82e\",\n \"accountNumber\": \"0123456789\",\n \"notes\": \"Notes\",\n \"CCI\": \"00111233001112345678\",\n \"CLABE\": \"012345678901234567\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/bank/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankName\": \"Bank Name\",\n \"accountHolderName\": \"Account Holder Name\",\n \"userId\": \"66290ac8bd3903485989f82e\",\n \"accountNumber\": \"0123456789\",\n \"notes\": \"Notes\",\n \"CCI\": \"00111233001112345678\",\n \"CLABE\": \"012345678901234567\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "66562bc04fe8bf83c577c178",
"createdAt": "2024-05-31T13:55:11.452Z",
"bankName": "BANAMEX",
"country": "MX",
"accountHolderName": "Account holder name",
"fiat": "USD",
"accountNumber": "0123456789",
"CLABE": "0023764000000012345",
"CCI": "00111233001112345678",
"approved": true,
"notes": "Bank Account",
"email": "<string>",
"id": "6659d6bfd78151f639e74d53"
}Create a bank account
curl --request POST \
--url https://app.sandbox.rio.trade/api/bank/accounts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"bankName": "Bank Name",
"accountHolderName": "Account Holder Name",
"userId": "66290ac8bd3903485989f82e",
"accountNumber": "0123456789",
"notes": "Notes",
"CCI": "00111233001112345678",
"CLABE": "012345678901234567",
"email": "<string>"
}
'import requests
url = "https://app.sandbox.rio.trade/api/bank/accounts"
payload = {
"bankName": "Bank Name",
"accountHolderName": "Account Holder Name",
"userId": "66290ac8bd3903485989f82e",
"accountNumber": "0123456789",
"notes": "Notes",
"CCI": "00111233001112345678",
"CLABE": "012345678901234567",
"email": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankName: 'Bank Name',
accountHolderName: 'Account Holder Name',
userId: '66290ac8bd3903485989f82e',
accountNumber: '0123456789',
notes: 'Notes',
CCI: '00111233001112345678',
CLABE: '012345678901234567',
email: '<string>'
})
};
fetch('https://app.sandbox.rio.trade/api/bank/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sandbox.rio.trade/api/bank/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'bankName' => 'Bank Name',
'accountHolderName' => 'Account Holder Name',
'userId' => '66290ac8bd3903485989f82e',
'accountNumber' => '0123456789',
'notes' => 'Notes',
'CCI' => '00111233001112345678',
'CLABE' => '012345678901234567',
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sandbox.rio.trade/api/bank/accounts"
payload := strings.NewReader("{\n \"bankName\": \"Bank Name\",\n \"accountHolderName\": \"Account Holder Name\",\n \"userId\": \"66290ac8bd3903485989f82e\",\n \"accountNumber\": \"0123456789\",\n \"notes\": \"Notes\",\n \"CCI\": \"00111233001112345678\",\n \"CLABE\": \"012345678901234567\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sandbox.rio.trade/api/bank/accounts")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bankName\": \"Bank Name\",\n \"accountHolderName\": \"Account Holder Name\",\n \"userId\": \"66290ac8bd3903485989f82e\",\n \"accountNumber\": \"0123456789\",\n \"notes\": \"Notes\",\n \"CCI\": \"00111233001112345678\",\n \"CLABE\": \"012345678901234567\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/bank/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankName\": \"Bank Name\",\n \"accountHolderName\": \"Account Holder Name\",\n \"userId\": \"66290ac8bd3903485989f82e\",\n \"accountNumber\": \"0123456789\",\n \"notes\": \"Notes\",\n \"CCI\": \"00111233001112345678\",\n \"CLABE\": \"012345678901234567\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "66562bc04fe8bf83c577c178",
"createdAt": "2024-05-31T13:55:11.452Z",
"bankName": "BANAMEX",
"country": "MX",
"accountHolderName": "Account holder name",
"fiat": "USD",
"accountNumber": "0123456789",
"CLABE": "0023764000000012345",
"CCI": "00111233001112345678",
"approved": true,
"notes": "Bank Account",
"email": "<string>",
"id": "6659d6bfd78151f639e74d53"
}Requirements to consume the endpoint.
Create and modify role
User approved
Authorizations
Body
Country in which the bank account is to be created.
MX, PE, CO Fiat currency of the bank account.
USD, MXN, PEN, COP Name of the bank.
"Bank Name"
Name of the account holder.
"Account Holder Name"
Id of the user to whom the bank account is to be assigned.
"66290ac8bd3903485989f82e"
Number of the bank account.
"0123456789"
Notes related to the bank account.
"Notes"
The CCI (Interbank Account Code) is a unique 20-digit number used to identify a specific bank account in the Peruvian financial system.
"00111233001112345678"
Which is a 18-digit code used to identify specific bank accounts in the Mexican banking system.
"012345678901234567"
Only necessary for MXN accounts held at NVIO, which cannot be credited without it. Sending it for any other account is rejected.
Response
Created
Id of the user who created the bank account.
"66562bc04fe8bf83c577c178"
Creation date and time of the bank account.
"2024-05-31T13:55:11.452Z"
Name of the bank.
"BANAMEX"
Country of the bank.
MX, PE, CO Name of the account holder.
"Account holder name"
Fiat currency of the bank account.
USD, MXN, PEN, COP Number of the bank account.
"0123456789"
The Standardized Bank Code (CLABE) associated with the bank account, used in Mexico.
"0023764000000012345"
Only for bank accounts in Peru.
"00111233001112345678"
Indicates if the bank account has been approved.
true
Notes about the bank account.
"Bank Account"
Only for MXN accounts held at NVIO.
Id of the bank account.
"6659d6bfd78151f639e74d53"