curl --request POST \
--url https://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currencyCode": "USD",
"idempotencyKey": "<string>",
"reference": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp"
payload = {
"amount": 123,
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currencyCode": "USD",
"idempotencyKey": "<string>",
"reference": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
fromBankAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
toBankAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
currencyCode: 'USD',
idempotencyKey: '<string>',
reference: '<string>'
})
};
fetch('https://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp', 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://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp",
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([
'amount' => 123,
'fromBankAccountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'toBankAccountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'currencyCode' => 'USD',
'idempotencyKey' => '<string>',
'reference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp"
payload := strings.NewReader("{\n \"amount\": 123,\n \"fromBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"toBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"currencyCode\": \"USD\",\n \"idempotencyKey\": \"<string>\",\n \"reference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"fromBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"toBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"currencyCode\": \"USD\",\n \"idempotencyKey\": \"<string>\",\n \"reference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"fromBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"toBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"currencyCode\": \"USD\",\n \"idempotencyKey\": \"<string>\",\n \"reference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": {
"currencyCode": "<string>",
"value": 123
},
"date": "2023-12-25",
"fromBankAccount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nickname": "<string>"
},
"network": "BOOK",
"status": "PENDING",
"toBankAccount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nickname": "<string>"
},
"reference": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Create RTP transfer
Creates an RTP (Real-Time Payments) money movement for instant transfers.
Token types: APP, USER | Required scopes: transfer:write:org
curl --request POST \
--url https://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currencyCode": "USD",
"idempotencyKey": "<string>",
"reference": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp"
payload = {
"amount": 123,
"fromBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currencyCode": "USD",
"idempotencyKey": "<string>",
"reference": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
fromBankAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
toBankAccountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
currencyCode: 'USD',
idempotencyKey: '<string>',
reference: '<string>'
})
};
fetch('https://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp', 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://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp",
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([
'amount' => 123,
'fromBankAccountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'toBankAccountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'currencyCode' => 'USD',
'idempotencyKey' => '<string>',
'reference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp"
payload := strings.NewReader("{\n \"amount\": 123,\n \"fromBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"toBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"currencyCode\": \"USD\",\n \"idempotencyKey\": \"<string>\",\n \"reference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"fromBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"toBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"currencyCode\": \"USD\",\n \"idempotencyKey\": \"<string>\",\n \"reference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/embedded-banking/v1/money-movements/rtp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"fromBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"toBankAccountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"currencyCode\": \"USD\",\n \"idempotencyKey\": \"<string>\",\n \"reference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": {
"currencyCode": "<string>",
"value": 123
},
"date": "2023-12-25",
"fromBankAccount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nickname": "<string>"
},
"network": "BOOK",
"status": "PENDING",
"toBankAccount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nickname": "<string>"
},
"reference": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Authorizations
Application (M2M) OAuth2 access token (client credentials).
Body
Request model for initiating an RTP (Real-Time Payments) money movement.
Amount to transfer. Must be greater than 0.
Source bank account identifier.
Destination bank account identifier.
ISO 4217 alphabetic currency code (e.g. USD). Defaults to USD when omitted.
Determines the minor unit precision of long RtpMoneyMovementRequest.Amount.
Optional idempotency key for preventing duplicate transfers. Maximum length: 256 characters.
Optional caller-supplied reference used to correlate this money movement with a payment
record in the caller's own system. Stored against the money movement (with leading and
trailing whitespace removed), echoed back on the creation response and on the bank account
transfers list, and forwarded to the banking core as the ISO 20022 end-to-end id, which
the provider echoes back on payment status events.
Not required to be unique and not used for deduplication: supply idempotencyKey
to make a retry safe.
Maximum length: 35 characters (ISO 20022 Max35Text). Must not be blank or contain control
characters.
Response
Money movement created successfully.
Response model for a money movement operation.
Unique money movement identifier.
Money movement amount.
Show child attributes
Show child attributes
Money movement date.
Source bank account information.
Show child attributes
Show child attributes
Payment network: BOOK, ACH, RTP, or FED_NOW.
BOOK, ACH, RTP, FED_NOW Money movement status.
PENDING, COMPLETED, FAILED Destination bank account information.
Show child attributes
Show child attributes
The caller-supplied reference from the request, echoed back unchanged. Null when the request omitted one.
Was this page helpful?