curl --request POST \
--url https://skala-sandbox.ripio.com/api/v1/sellAndPays/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "b6cecc1f-c90d-424b-adaa-c82b780696c1",
"externalRef": "sp-12345-2024",
"qrCode": "00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD",
"paymentCurrency": "ARS",
"depositCurrency": "USDC",
"depositNetwork": "ETHEREUM",
"refundAddress": "0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32"
}
'import requests
url = "https://skala-sandbox.ripio.com/api/v1/sellAndPays/"
payload = {
"customerId": "b6cecc1f-c90d-424b-adaa-c82b780696c1",
"externalRef": "sp-12345-2024",
"qrCode": "00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD",
"paymentCurrency": "ARS",
"depositCurrency": "USDC",
"depositNetwork": "ETHEREUM",
"refundAddress": "0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32"
}
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({
customerId: 'b6cecc1f-c90d-424b-adaa-c82b780696c1',
externalRef: 'sp-12345-2024',
qrCode: '00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD',
paymentCurrency: 'ARS',
depositCurrency: 'USDC',
depositNetwork: 'ETHEREUM',
refundAddress: '0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32'
})
};
fetch('https://skala-sandbox.ripio.com/api/v1/sellAndPays/', 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://skala-sandbox.ripio.com/api/v1/sellAndPays/",
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([
'customerId' => 'b6cecc1f-c90d-424b-adaa-c82b780696c1',
'externalRef' => 'sp-12345-2024',
'qrCode' => '00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD',
'paymentCurrency' => 'ARS',
'depositCurrency' => 'USDC',
'depositNetwork' => 'ETHEREUM',
'refundAddress' => '0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32'
]),
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://skala-sandbox.ripio.com/api/v1/sellAndPays/"
payload := strings.NewReader("{\n \"customerId\": \"b6cecc1f-c90d-424b-adaa-c82b780696c1\",\n \"externalRef\": \"sp-12345-2024\",\n \"qrCode\": \"00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD\",\n \"paymentCurrency\": \"ARS\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"ETHEREUM\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\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://skala-sandbox.ripio.com/api/v1/sellAndPays/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"b6cecc1f-c90d-424b-adaa-c82b780696c1\",\n \"externalRef\": \"sp-12345-2024\",\n \"qrCode\": \"00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD\",\n \"paymentCurrency\": \"ARS\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"ETHEREUM\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://skala-sandbox.ripio.com/api/v1/sellAndPays/")
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 \"customerId\": \"b6cecc1f-c90d-424b-adaa-c82b780696c1\",\n \"externalRef\": \"sp-12345-2024\",\n \"qrCode\": \"00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD\",\n \"paymentCurrency\": \"ARS\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"ETHEREUM\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}"
response = http.request(request)
puts response.read_bodyCreate Sell and Pay transaction
Creates a new Sell and Pay transaction for converting cryptocurrency to fiat currency and paying a merchant via QR code. This endpoint automatically cancels any existing Sell and Pay transactions for the same customer. If all required fields are provided (customerId, externalRef, qrCode, paymentCurrency, depositCurrency, depositNetwork, and refundAddress), the transaction will be created with status PENDING. If any required fields are missing, the transaction will be created with status INCOMPLETE and must be completed using the update endpoint.
curl --request POST \
--url https://skala-sandbox.ripio.com/api/v1/sellAndPays/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "b6cecc1f-c90d-424b-adaa-c82b780696c1",
"externalRef": "sp-12345-2024",
"qrCode": "00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD",
"paymentCurrency": "ARS",
"depositCurrency": "USDC",
"depositNetwork": "ETHEREUM",
"refundAddress": "0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32"
}
'import requests
url = "https://skala-sandbox.ripio.com/api/v1/sellAndPays/"
payload = {
"customerId": "b6cecc1f-c90d-424b-adaa-c82b780696c1",
"externalRef": "sp-12345-2024",
"qrCode": "00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD",
"paymentCurrency": "ARS",
"depositCurrency": "USDC",
"depositNetwork": "ETHEREUM",
"refundAddress": "0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32"
}
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({
customerId: 'b6cecc1f-c90d-424b-adaa-c82b780696c1',
externalRef: 'sp-12345-2024',
qrCode: '00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD',
paymentCurrency: 'ARS',
depositCurrency: 'USDC',
depositNetwork: 'ETHEREUM',
refundAddress: '0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32'
})
};
fetch('https://skala-sandbox.ripio.com/api/v1/sellAndPays/', 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://skala-sandbox.ripio.com/api/v1/sellAndPays/",
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([
'customerId' => 'b6cecc1f-c90d-424b-adaa-c82b780696c1',
'externalRef' => 'sp-12345-2024',
'qrCode' => '00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD',
'paymentCurrency' => 'ARS',
'depositCurrency' => 'USDC',
'depositNetwork' => 'ETHEREUM',
'refundAddress' => '0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32'
]),
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://skala-sandbox.ripio.com/api/v1/sellAndPays/"
payload := strings.NewReader("{\n \"customerId\": \"b6cecc1f-c90d-424b-adaa-c82b780696c1\",\n \"externalRef\": \"sp-12345-2024\",\n \"qrCode\": \"00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD\",\n \"paymentCurrency\": \"ARS\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"ETHEREUM\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\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://skala-sandbox.ripio.com/api/v1/sellAndPays/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"b6cecc1f-c90d-424b-adaa-c82b780696c1\",\n \"externalRef\": \"sp-12345-2024\",\n \"qrCode\": \"00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD\",\n \"paymentCurrency\": \"ARS\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"ETHEREUM\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://skala-sandbox.ripio.com/api/v1/sellAndPays/")
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 \"customerId\": \"b6cecc1f-c90d-424b-adaa-c82b780696c1\",\n \"externalRef\": \"sp-12345-2024\",\n \"qrCode\": \"00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD\",\n \"paymentCurrency\": \"ARS\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"ETHEREUM\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}"
response = http.request(request)
puts response.read_bodyCountry support
| Country | paymentCurrency | Payment rail | Fiat account required |
|---|---|---|---|
| Argentina | ARS | QR | Yes — pre-create with POST /sellAndPays/fiatAccounts/ |
| Colombia | COP | BREB-QR | No — calling POST /sellAndPays/fiatAccounts/ for a Colombian customer returns 400 SellAndPayFiatAccountNotRequiredException |
update endpoint before executing.Sandbox QR Codes — Argentina
For the sandbox environment, there are several QR codes available to simulate different transaction flows:valid-qr-code-with-amount
Use this QR code to simulate a successful payment flow with a random amount included in the QR code.
valid-qr-code-without-amount
Use this QR code to simulate a successful payment flow where the amount is not included in the QR code and must be specified separately.
invalid-qr-code
Use this QR code to simulate an error flow when scanning an invalid or malformed QR code.
valid-qr-code-with-blocked-deposit
Use this QR code to simulate a scenario where the deposit destination is blocked or unavailable.
valid-qr-code-with-slippage
Use this QR code to simulate a payment flow that experiences slippage, where the final amount differs from the expected amount.
Sandbox QR Codes — Colombia (BREB-QR)
Use the strings below as theqrCode value in the sandbox environment:
Fixed-amount QR (COP 100)
Use this QR code to simulate a successful BREB-QR payment with a fixed amount already encoded in the QR.00020101021126320014CO.COM.CRB.LLA0410@CBI8UE7BZ49250014CO.COM.CRB.RED0103CRB5204000053031705406100.005802CO5909Ripio-PXT6006BOGOTA610611022185260014CO.COM.CRB.INC01040.0090430016CO.COM.CRB.TRXID0119P23e46ff8985de4a29091860014CO.COM.CRB.SEC01643c89cda78bcd348f723c55cd91cc9d65b9478378d2bed60accb5f09b0f361aa180290016CO.COM.CRB.CANAL0105ECOMM81250015CO.COM.CRB.CIVA01020382260014CO.COM.CRB.IVA01040.0083270015CO.COM.CRB.BASE01040.0084250015CO.COM.CRB.CINC01020363042617
Open-amount QR
Use this QR code to simulate a successful BREB-QR payment without a pre-defined amount. The amount must be supplied via the update endpoint before executing.00020101021126320014CO.COM.CRB.LLA0410@CBI8UE7BZ49250014CO.COM.CRB.RED0103CRB5204000053031705802CO5909Ripio-PXT6006BOGOTA610611022185260014CO.COM.CRB.INC01040.0090430016CO.COM.CRB.TRXID0119P23e46ff8985de4a29091860014CO.COM.CRB.SEC01643c89cda78bcd348f723c55cd91cc9d65b9478378d2bed60accb5f09b0f361aa180290016CO.COM.CRB.CANAL0105ECOMM81250015CO.COM.CRB.CIVA01020382260014CO.COM.CRB.IVA01040.0083270015CO.COM.CRB.BASE01040.0084250015CO.COM.CRB.CINC01020363044E9E
Authorizations
Access token obtained via /oauth2/token/. Use as Authorization: Bearer <access_token>.
Body
QR code data containing the payment information for the merchant. This includes payment details such as recipient information and amount to be paid in fiat currency.
1"00020101021226360014BR.GOV.BCB.PIX0114+55119876543215204000053039865802BR5913Store Name XYZ6009SAO PAULO62070503***6304ABCD"
Response
Sell and Pay transaction successfully created
Current status of the Sell and Pay transaction. INCOMPLETE: missing required fields. PENDING: ready to execute. WAITING_DEPOSIT: executed and ready to receive crypto deposit. RECEIVED_DEPOSIT: crypto deposit detected on blockchain. CONFIRMED_DEPOSIT: crypto deposit confirmed. TRADE_COMPLETED: cryptocurrency successfully converted to fiat. QR_EXECUTION_PENDING: preparing payment to merchant. COMPLETED: payment successfully made to merchant. CANCELED: transaction cancelled. REFUND_PENDING: refund being processed. REFUNDED: funds refunded to customer.
INCOMPLETE, PENDING, WAITING_DEPOSIT, RECEIVED_DEPOSIT, CONFIRMED_DEPOSIT, TRADE_COMPLETED, QR_EXECUTION_PENDING, COMPLETED, CANCELED, REFUND_PENDING, REFUNDED "PENDING"
Was this page helpful?