Create ACH deposit with crypto to BOB conversion
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"
}Payin
Create ACH deposit with crypto to BOB conversion
Generates a crypto address and amount to fund the authenticated business merchant account. amount is the BOB amount to receive. Once the full crypto amount is confirmed, an ACH transfer is requested from the Mesa de Pagos account. The operation is recorded as prefunding with fundingSource conversion and its status changes are notified through transaction_updated. externalReference must be unique. Response amounts are expressed as decimal strings.
POST
/
v3
/
transactions
/
deposit
/
ach
Create ACH deposit with crypto to BOB conversion
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"
}Body
application/json
Response
Deposit awaiting receipt of crypto.
Available options:
pending_transaction, pending_approval, processing_transaction, completed_transaction, reject_transaction, expired_transaction, cancelled_transaction, failed_transaction, received_transaction, returned_transaction, insufficient_funds Example:
"pending_transaction"