curl --request POST \
--url https://sandbox-rampa.mesadepagos.com/api/v3/transactions/deposit/ach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assetDeposit": "USDC",
"blockchain": "Polygon",
"amount": 696,
"externalReference": "DEPOSIT-1001"
}
'import requests
url = "https://sandbox-rampa.mesadepagos.com/api/v3/transactions/deposit/ach"
payload = {
"assetDeposit": "USDC",
"blockchain": "Polygon",
"amount": 696,
"externalReference": "DEPOSIT-1001"
}
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({
assetDeposit: 'USDC',
blockchain: 'Polygon',
amount: 696,
externalReference: 'DEPOSIT-1001'
})
};
fetch('https://sandbox-rampa.mesadepagos.com/api/v3/transactions/deposit/ach', 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/deposit/ach",
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([
'assetDeposit' => 'USDC',
'blockchain' => 'Polygon',
'amount' => 696,
'externalReference' => 'DEPOSIT-1001'
]),
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/deposit/ach"
payload := strings.NewReader("{\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 696,\n \"externalReference\": \"DEPOSIT-1001\"\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/deposit/ach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 696,\n \"externalReference\": \"DEPOSIT-1001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-rampa.mesadepagos.com/api/v3/transactions/deposit/ach")
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 \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 696,\n \"externalReference\": \"DEPOSIT-1001\"\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionStatus": "pending_transaction",
"externalReference": "DEPOSIT-1001",
"cryptoAmount": "100.00000000",
"fiatAmount": "696.00",
"fiatCurrency": "BOB",
"depositAddress": "0x0000000000000000000000000000000000000000",
"exchangeRate": "6.96000000",
"asset": "USDC",
"blockchain": "Polygon"
}Crear deposito ACH con conversion crypto a BOB
Genera una direccion y un monto crypto para fondear la cuenta de comercios del negocio autenticado. amount representa los BOB a recibir. Tras la confirmacion del monto crypto completo, se solicita el ACH desde la cuenta de Mesa de Pagos. La operacion se registra como prefunding con fundingSource conversion y sus cambios de estado se notifican por transaction_updated. externalReference debe ser unica. Los importes de la respuesta se expresan como strings decimales.
curl --request POST \
--url https://sandbox-rampa.mesadepagos.com/api/v3/transactions/deposit/ach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assetDeposit": "USDC",
"blockchain": "Polygon",
"amount": 696,
"externalReference": "DEPOSIT-1001"
}
'import requests
url = "https://sandbox-rampa.mesadepagos.com/api/v3/transactions/deposit/ach"
payload = {
"assetDeposit": "USDC",
"blockchain": "Polygon",
"amount": 696,
"externalReference": "DEPOSIT-1001"
}
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({
assetDeposit: 'USDC',
blockchain: 'Polygon',
amount: 696,
externalReference: 'DEPOSIT-1001'
})
};
fetch('https://sandbox-rampa.mesadepagos.com/api/v3/transactions/deposit/ach', 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/deposit/ach",
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([
'assetDeposit' => 'USDC',
'blockchain' => 'Polygon',
'amount' => 696,
'externalReference' => 'DEPOSIT-1001'
]),
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/deposit/ach"
payload := strings.NewReader("{\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 696,\n \"externalReference\": \"DEPOSIT-1001\"\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/deposit/ach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 696,\n \"externalReference\": \"DEPOSIT-1001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-rampa.mesadepagos.com/api/v3/transactions/deposit/ach")
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 \"assetDeposit\": \"USDC\",\n \"blockchain\": \"Polygon\",\n \"amount\": 696,\n \"externalReference\": \"DEPOSIT-1001\"\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionStatus": "pending_transaction",
"externalReference": "DEPOSIT-1001",
"cryptoAmount": "100.00000000",
"fiatAmount": "696.00",
"fiatCurrency": "BOB",
"depositAddress": "0x0000000000000000000000000000000000000000",
"exchangeRate": "6.96000000",
"asset": "USDC",
"blockchain": "Polygon"
}Autorizaciones
JWT obtenido desde /v2/auth/login o /v3/auth/login
Cuerpo
USDC, USDT "USDC"
Ethereum, Polygon "Polygon"
Monto BOB a abonar a la cuenta de comercios del negocio autenticado.
0 < x <= 999999999999.99Debe ser un múltiplo de 0.01696
1 - 100"DEPOSIT-1001"
Respuesta
Deposito pendiente de recibir crypto.
pending_transaction, pending_approval, processing_transaction, completed_transaction, reject_transaction, expired_transaction, cancelled_transaction, failed_transaction, received_transaction, returned_transaction, insufficient_funds "pending_transaction"
"DEPOSIT-1001"
Monto crypto que debe recibirse para ejecutar el abono, incluido el descuento configurado.
"100.00000000"
"696.00"
BOB "BOB"
Direccion unica para recibir el asset en la blockchain solicitada.
"0x0000000000000000000000000000000000000000"
Tipo de cambio aplicado, expresado en BOB por unidad crypto.
"6.96000000"
USDC, USDT "USDC"
Ethereum, Polygon "Polygon"