Payout QR
curl --request POST \
--url https://sandbox-rampa.mesadepagos.com/api/v3/transactions/payouts/qr \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fundingSource": "conversion",
"image": "iVBORw0KGgoAAAANSUhEUgAA...",
"externalReference": "ORDER-QR-1001",
"assetDeposit": "USDC",
"blockchain": "Polygon",
"amount": 100
}
'import requests
url = "https://sandbox-rampa.mesadepagos.com/api/v3/transactions/payouts/qr"
payload = {
"fundingSource": "conversion",
"image": "iVBORw0KGgoAAAANSUhEUgAA...",
"externalReference": "ORDER-QR-1001",
"assetDeposit": "USDC",
"blockchain": "Polygon",
"amount": 100
}
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({
fundingSource: 'conversion',
image: 'iVBORw0KGgoAAAANSUhEUgAA...',
externalReference: 'ORDER-QR-1001',
assetDeposit: 'USDC',
blockchain: 'Polygon',
amount: 100
})
};
fetch('https://sandbox-rampa.mesadepagos.com/api/v3/transactions/payouts/qr', 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-rampa.mesadepagos.com/api/v3/transactions/payouts/qr",
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([
'fundingSource' => 'conversion',
'image' => 'iVBORw0KGgoAAAANSUhEUgAA...',
'externalReference' => 'ORDER-QR-1001',
'assetDeposit' => 'USDC',
'blockchain' => 'Polygon',
'amount' => 100
]),
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-rampa.mesadepagos.com/api/v3/transactions/payouts/qr"
payload := strings.NewReader("{\n \"fundingSource\": \"conversion\",\n \"image\": \"iVBORw0KGgoAAAANSUhEUgAA...\",\n \"externalReference\": \"ORDER-QR-1001\",\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 100\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-rampa.mesadepagos.com/api/v3/transactions/payouts/qr")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fundingSource\": \"conversion\",\n \"image\": \"iVBORw0KGgoAAAANSUhEUgAA...\",\n \"externalReference\": \"ORDER-QR-1001\",\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-rampa.mesadepagos.com/api/v3/transactions/payouts/qr")
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 \"fundingSource\": \"conversion\",\n \"image\": \"iVBORw0KGgoAAAANSUhEUgAA...\",\n \"externalReference\": \"ORDER-QR-1001\",\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 100\n}"
response = http.request(request)
puts response.read_body{
"externalReference": "ORDER-QR-1001",
"transactions": {
"transactionId": "550e8400-e29b-41d4-a716-446655440002",
"status": "pending_transaction",
"message": "Payout QR processed successfully"
},
"amountDeposit": "14.44",
"depositAddress": "0x0000000000000000000000000000000000000000"
}{
"statusCode": 400,
"error": "Bad Request",
"message": [
{
"path": [
"amount"
],
"message": "An amount is required for this QR code."
}
]
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"code": "TRANSACTION_NOT_FOUND",
"message": "The transaction was not found."
}{
"statusCode": 409,
"code": "TRANSACTION_REJECTED",
"message": "The transaction was rejected and cannot be processed."
}{
"statusCode": 410,
"code": "QR_EXPIRED",
"message": "The QR code has expired. Generate a new QR code and try again."
}{
"statusCode": 422,
"code": "INSUFFICIENT_FUNDS",
"message": "There are insufficient funds to complete this transaction."
}{
"statusCode": 500,
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected internal server error occurred. Please try again later."
}{
"statusCode": 503,
"code": "PAYMENT_PROVIDER_UNAVAILABLE",
"message": "The payment provider is temporarily unavailable. Please try again later."
}Payout
Payout QR
Procesa un QR de payout. La respuesta depende del proveedor QR y puede variar.
POST
/
v3
/
transactions
/
payouts
/
qr
Payout QR
curl --request POST \
--url https://sandbox-rampa.mesadepagos.com/api/v3/transactions/payouts/qr \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fundingSource": "conversion",
"image": "iVBORw0KGgoAAAANSUhEUgAA...",
"externalReference": "ORDER-QR-1001",
"assetDeposit": "USDC",
"blockchain": "Polygon",
"amount": 100
}
'import requests
url = "https://sandbox-rampa.mesadepagos.com/api/v3/transactions/payouts/qr"
payload = {
"fundingSource": "conversion",
"image": "iVBORw0KGgoAAAANSUhEUgAA...",
"externalReference": "ORDER-QR-1001",
"assetDeposit": "USDC",
"blockchain": "Polygon",
"amount": 100
}
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({
fundingSource: 'conversion',
image: 'iVBORw0KGgoAAAANSUhEUgAA...',
externalReference: 'ORDER-QR-1001',
assetDeposit: 'USDC',
blockchain: 'Polygon',
amount: 100
})
};
fetch('https://sandbox-rampa.mesadepagos.com/api/v3/transactions/payouts/qr', 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-rampa.mesadepagos.com/api/v3/transactions/payouts/qr",
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([
'fundingSource' => 'conversion',
'image' => 'iVBORw0KGgoAAAANSUhEUgAA...',
'externalReference' => 'ORDER-QR-1001',
'assetDeposit' => 'USDC',
'blockchain' => 'Polygon',
'amount' => 100
]),
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-rampa.mesadepagos.com/api/v3/transactions/payouts/qr"
payload := strings.NewReader("{\n \"fundingSource\": \"conversion\",\n \"image\": \"iVBORw0KGgoAAAANSUhEUgAA...\",\n \"externalReference\": \"ORDER-QR-1001\",\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 100\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-rampa.mesadepagos.com/api/v3/transactions/payouts/qr")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fundingSource\": \"conversion\",\n \"image\": \"iVBORw0KGgoAAAANSUhEUgAA...\",\n \"externalReference\": \"ORDER-QR-1001\",\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-rampa.mesadepagos.com/api/v3/transactions/payouts/qr")
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 \"fundingSource\": \"conversion\",\n \"image\": \"iVBORw0KGgoAAAANSUhEUgAA...\",\n \"externalReference\": \"ORDER-QR-1001\",\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 100\n}"
response = http.request(request)
puts response.read_body{
"externalReference": "ORDER-QR-1001",
"transactions": {
"transactionId": "550e8400-e29b-41d4-a716-446655440002",
"status": "pending_transaction",
"message": "Payout QR processed successfully"
},
"amountDeposit": "14.44",
"depositAddress": "0x0000000000000000000000000000000000000000"
}{
"statusCode": 400,
"error": "Bad Request",
"message": [
{
"path": [
"amount"
],
"message": "An amount is required for this QR code."
}
]
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"code": "TRANSACTION_NOT_FOUND",
"message": "The transaction was not found."
}{
"statusCode": 409,
"code": "TRANSACTION_REJECTED",
"message": "The transaction was rejected and cannot be processed."
}{
"statusCode": 410,
"code": "QR_EXPIRED",
"message": "The QR code has expired. Generate a new QR code and try again."
}{
"statusCode": 422,
"code": "INSUFFICIENT_FUNDS",
"message": "There are insufficient funds to complete this transaction."
}{
"statusCode": 500,
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected internal server error occurred. Please try again later."
}{
"statusCode": 503,
"code": "PAYMENT_PROVIDER_UNAVAILABLE",
"message": "The payment provider is temporarily unavailable. Please try again later."
}Cuerpo
application/json
Respuesta
Payout QR creado exitosamente.