curl --request POST \
--url https://sandbox-b2b.ripio.com/api/v1/peer-to-peer/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_ref": "transfer-0001",
"sender": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"receiver": "8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d",
"currency": "USDC",
"amount": "25.5"
}
'import requests
url = "https://sandbox-b2b.ripio.com/api/v1/peer-to-peer/"
payload = {
"external_ref": "transfer-0001",
"sender": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"receiver": "8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d",
"currency": "USDC",
"amount": "25.5"
}
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({
external_ref: 'transfer-0001',
sender: '75c741a2-c3c8-46b1-a807-4fa1f40bf048',
receiver: '8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d',
currency: 'USDC',
amount: '25.5'
})
};
fetch('https://sandbox-b2b.ripio.com/api/v1/peer-to-peer/', 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://sandbox-b2b.ripio.com/api/v1/peer-to-peer/",
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([
'external_ref' => 'transfer-0001',
'sender' => '75c741a2-c3c8-46b1-a807-4fa1f40bf048',
'receiver' => '8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d',
'currency' => 'USDC',
'amount' => '25.5'
]),
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://sandbox-b2b.ripio.com/api/v1/peer-to-peer/"
payload := strings.NewReader("{\n \"external_ref\": \"transfer-0001\",\n \"sender\": \"75c741a2-c3c8-46b1-a807-4fa1f40bf048\",\n \"receiver\": \"8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d\",\n \"currency\": \"USDC\",\n \"amount\": \"25.5\"\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://sandbox-b2b.ripio.com/api/v1/peer-to-peer/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_ref\": \"transfer-0001\",\n \"sender\": \"75c741a2-c3c8-46b1-a807-4fa1f40bf048\",\n \"receiver\": \"8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d\",\n \"currency\": \"USDC\",\n \"amount\": \"25.5\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-b2b.ripio.com/api/v1/peer-to-peer/")
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 \"external_ref\": \"transfer-0001\",\n \"sender\": \"75c741a2-c3c8-46b1-a807-4fa1f40bf048\",\n \"receiver\": \"8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d\",\n \"currency\": \"USDC\",\n \"amount\": \"25.5\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f0c2a8e-6d1b-4b7e-9c55-2a1d4e8f7b10",
"external_ref": "transfer-0001",
"sender": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"receiver": "8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d",
"sender_transaction_id": "b6e1f0c2-3d4a-4e5f-8a9b-0c1d2e3f4a5b",
"receiver_transaction_id": "c7f2a1d3-4e5b-4f6a-9b0c-1d2e3f4a5b6c",
"currency": "USDC",
"amount": "25.50000000",
"created_at": "2026-11-27T14:20:31.512094Z"
}Create Peer To Peer Transfer
Move crypto between two end users of your account. The transfer is internal to Ripio: nothing goes on-chain, it is settled immediately and it charges no fee.
curl --request POST \
--url https://sandbox-b2b.ripio.com/api/v1/peer-to-peer/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_ref": "transfer-0001",
"sender": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"receiver": "8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d",
"currency": "USDC",
"amount": "25.5"
}
'import requests
url = "https://sandbox-b2b.ripio.com/api/v1/peer-to-peer/"
payload = {
"external_ref": "transfer-0001",
"sender": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"receiver": "8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d",
"currency": "USDC",
"amount": "25.5"
}
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({
external_ref: 'transfer-0001',
sender: '75c741a2-c3c8-46b1-a807-4fa1f40bf048',
receiver: '8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d',
currency: 'USDC',
amount: '25.5'
})
};
fetch('https://sandbox-b2b.ripio.com/api/v1/peer-to-peer/', 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://sandbox-b2b.ripio.com/api/v1/peer-to-peer/",
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([
'external_ref' => 'transfer-0001',
'sender' => '75c741a2-c3c8-46b1-a807-4fa1f40bf048',
'receiver' => '8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d',
'currency' => 'USDC',
'amount' => '25.5'
]),
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://sandbox-b2b.ripio.com/api/v1/peer-to-peer/"
payload := strings.NewReader("{\n \"external_ref\": \"transfer-0001\",\n \"sender\": \"75c741a2-c3c8-46b1-a807-4fa1f40bf048\",\n \"receiver\": \"8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d\",\n \"currency\": \"USDC\",\n \"amount\": \"25.5\"\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://sandbox-b2b.ripio.com/api/v1/peer-to-peer/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_ref\": \"transfer-0001\",\n \"sender\": \"75c741a2-c3c8-46b1-a807-4fa1f40bf048\",\n \"receiver\": \"8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d\",\n \"currency\": \"USDC\",\n \"amount\": \"25.5\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-b2b.ripio.com/api/v1/peer-to-peer/")
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 \"external_ref\": \"transfer-0001\",\n \"sender\": \"75c741a2-c3c8-46b1-a807-4fa1f40bf048\",\n \"receiver\": \"8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d\",\n \"currency\": \"USDC\",\n \"amount\": \"25.5\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f0c2a8e-6d1b-4b7e-9c55-2a1d4e8f7b10",
"external_ref": "transfer-0001",
"sender": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"receiver": "8a1d3c5e-7f20-4b9a-a1c3-5e6f7a8b9c0d",
"sender_transaction_id": "b6e1f0c2-3d4a-4e5f-8a9b-0c1d2e3f4a5b",
"receiver_transaction_id": "c7f2a1d3-4e5b-4f6a-9b0c-1d2e3f4a5b6c",
"currency": "USDC",
"amount": "25.50000000",
"created_at": "2026-11-27T14:20:31.512094Z"
}How it works
- Both end users must belong to your account, and they must be different end users.
- Both of them need a balance in
currency. The sender needs at leastamountavailable. - The transfer is final as soon as the response comes back: the sender’s balance is debited and the receiver’s is credited in the same operation. If any check fails, no balance moves.
- Only the sender is checked against KYC. A receiver whose KYC is still pending can be paid.
- A banned end user cannot send or receive.
PEER_TO_PEER, one for each end user:
sender_transaction_id and receiver_transaction_id. Both show up in
List Transactions and in the daily
transactions report.
Idempotency
external_ref is your idempotency key and it is required. It is unique within your account.
If you send an external_ref that already exists, the response is the original transfer, with
status 201, and no balance moves. This makes it safe to retry a request that timed out or
whose response you did not get: send it again with the same external_ref.
external_ref identifies the transfer. A repeated external_ref returns the original
transfer even when sender, receiver, currency or amount are different, and the new values
are ignored. Generate a new external_ref for every transfer you want to make.GET /api/v1/peer-to-peer/?external_ref=<your external_ref>.Authorizations
B2B’s White Label API uses OAuth2. Currently there is only one supported authentication flow:
- clientCredentials allows you to access your own B2B account (First-Party Integration) and performs transactions against the public API. This oauth2 flow is well suited for this API, as it allows machine-to-machine communication.
Every call to the API has to be authenticated with an OAuth2 Token. In order to request this token, you will need to have sandbox or production API Keys (client id and client secret) that will be needed to generate a credential in order to negotiate an ephemeral access token.
Every request must be accompianed by an Authorization header with a value that follows the following schema: Bearer ACCESS_TOKEN
Body
Response
Transfer created, or the original transfer when the external_ref already existed.
Was this page helpful?