curl --request PUT \
--url https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "10000.50",
"depositCurrency": "USDC",
"depositNetwork": "POLYGON",
"refundAddress": "0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32"
}
'import requests
url = "https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/"
payload = {
"amount": "10000.50",
"depositCurrency": "USDC",
"depositNetwork": "POLYGON",
"refundAddress": "0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '10000.50',
depositCurrency: 'USDC',
depositNetwork: 'POLYGON',
refundAddress: '0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32'
})
};
fetch('https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/', 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/{sell_and_pay_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '10000.50',
'depositCurrency' => 'USDC',
'depositNetwork' => 'POLYGON',
'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/{sell_and_pay_id}/"
payload := strings.NewReader("{\n \"amount\": \"10000.50\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"POLYGON\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"10000.50\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"POLYGON\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"10000.50\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"POLYGON\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}"
response = http.request(request)
puts response.read_body{
"id": "a3b2c1d0-1234-5678-90ab-cdef12345678",
"createdAt": "2024-01-26T12:45:00.078230Z",
"expiresAt": "2024-01-26T13:45:00.078230Z",
"customerId": "b6cecc1f-c90d-424b-adaa-c82b780696c1",
"trade": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"externalRef": "<string>",
"customerId": "<string>",
"quoteId": "<string>",
"txnId": "<string>",
"baseAsset": "<string>",
"quoteAsset": "<string>",
"baseAmount": "<string>",
"quoteAmount": "<string>",
"rate": "<string>",
"marketRate": "<string>",
"chargedFee": "<string>",
"cryptoChargedFee": "<string>",
"deferredChargedFee": "<string>",
"feeChargedInFiat": "<string>"
},
"paymentOrder": {
"id": "<string>",
"customerId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"merchant": "<string>",
"qrCode": "<string>",
"amount": "<string>",
"currency": "<string>",
"providerTxnId": "<string>"
},
"amount": "10000.50",
"cryptoAmount": "10.25",
"paymentCurrency": "ARS",
"depositCurrency": "USDC",
"depositNetwork": "ETHEREUM",
"depositAddress": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"cryptoDeposit": {
"id": "<string>",
"txnId": "<string>",
"hash": "<string>",
"currencyCode": "<string>",
"addressDestination": "<string>",
"confirmationDate": "2023-11-07T05:31:56Z",
"amount": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"customerId": "<string>",
"status": "<string>",
"network": "<string>"
},
"status": "PENDING",
"refundAddress": "<string>",
"refundTxnHash": "0xdef789abc456..."
}Update Sell and Pay transaction
Updates an existing Sell and Pay transaction to complete or modify its details. Use this endpoint to add missing required fields (depositCurrency, depositNetwork, refundAddress) or update the payment amount. When all required fields are provided, the transaction status will automatically change from INCOMPLETE to PENDING, making it ready for execution.
curl --request PUT \
--url https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "10000.50",
"depositCurrency": "USDC",
"depositNetwork": "POLYGON",
"refundAddress": "0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32"
}
'import requests
url = "https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/"
payload = {
"amount": "10000.50",
"depositCurrency": "USDC",
"depositNetwork": "POLYGON",
"refundAddress": "0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '10000.50',
depositCurrency: 'USDC',
depositNetwork: 'POLYGON',
refundAddress: '0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32'
})
};
fetch('https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/', 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/{sell_and_pay_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '10000.50',
'depositCurrency' => 'USDC',
'depositNetwork' => 'POLYGON',
'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/{sell_and_pay_id}/"
payload := strings.NewReader("{\n \"amount\": \"10000.50\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"POLYGON\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"10000.50\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"POLYGON\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"10000.50\",\n \"depositCurrency\": \"USDC\",\n \"depositNetwork\": \"POLYGON\",\n \"refundAddress\": \"0x4e88BBeFF059BDDF5BF90ee0816E86eDf4214b32\"\n}"
response = http.request(request)
puts response.read_body{
"id": "a3b2c1d0-1234-5678-90ab-cdef12345678",
"createdAt": "2024-01-26T12:45:00.078230Z",
"expiresAt": "2024-01-26T13:45:00.078230Z",
"customerId": "b6cecc1f-c90d-424b-adaa-c82b780696c1",
"trade": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"externalRef": "<string>",
"customerId": "<string>",
"quoteId": "<string>",
"txnId": "<string>",
"baseAsset": "<string>",
"quoteAsset": "<string>",
"baseAmount": "<string>",
"quoteAmount": "<string>",
"rate": "<string>",
"marketRate": "<string>",
"chargedFee": "<string>",
"cryptoChargedFee": "<string>",
"deferredChargedFee": "<string>",
"feeChargedInFiat": "<string>"
},
"paymentOrder": {
"id": "<string>",
"customerId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"merchant": "<string>",
"qrCode": "<string>",
"amount": "<string>",
"currency": "<string>",
"providerTxnId": "<string>"
},
"amount": "10000.50",
"cryptoAmount": "10.25",
"paymentCurrency": "ARS",
"depositCurrency": "USDC",
"depositNetwork": "ETHEREUM",
"depositAddress": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"cryptoDeposit": {
"id": "<string>",
"txnId": "<string>",
"hash": "<string>",
"currencyCode": "<string>",
"addressDestination": "<string>",
"confirmationDate": "2023-11-07T05:31:56Z",
"amount": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"customerId": "<string>",
"status": "<string>",
"network": "<string>"
},
"status": "PENDING",
"refundAddress": "<string>",
"refundTxnHash": "0xdef789abc456..."
}Authorizations
Access token obtained via /oauth2/token/. Use as Authorization: Bearer <access_token>.
Path Parameters
Body
Request body for updating a Sell and Pay transaction. All fields are optional, allowing partial updates to the transaction details.
Response
Sell and Pay transaction successfully updated
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?