Create a Quote
curl --request POST \
--url https://sandbox.api.mnai.com/v1/users/{userId}/quotes \
--header 'Content-Type: application/json' \
--header 'X-Meridian-Api-Key: <x-meridian-api-key>' \
--header 'X-Meridian-Signature: <api-key>' \
--header 'X-Meridian-Timestamp: <x-meridian-timestamp>' \
--data '
{
"amount": "50",
"fromCurrency": "USD",
"toCurrency": "PHP"
}
'import requests
url = "https://sandbox.api.mnai.com/v1/users/{userId}/quotes"
payload = {
"amount": "50",
"fromCurrency": "USD",
"toCurrency": "PHP"
}
headers = {
"X-Meridian-Api-Key": "<x-meridian-api-key>",
"X-Meridian-Timestamp": "<x-meridian-timestamp>",
"X-Meridian-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Meridian-Api-Key': '<x-meridian-api-key>',
'X-Meridian-Timestamp': '<x-meridian-timestamp>',
'X-Meridian-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: '50', fromCurrency: 'USD', toCurrency: 'PHP'})
};
fetch('https://sandbox.api.mnai.com/v1/users/{userId}/quotes', 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.api.mnai.com/v1/users/{userId}/quotes",
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([
'amount' => '50',
'fromCurrency' => 'USD',
'toCurrency' => 'PHP'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Meridian-Api-Key: <x-meridian-api-key>",
"X-Meridian-Signature: <api-key>",
"X-Meridian-Timestamp: <x-meridian-timestamp>"
],
]);
$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.api.mnai.com/v1/users/{userId}/quotes"
payload := strings.NewReader("{\n \"amount\": \"50\",\n \"fromCurrency\": \"USD\",\n \"toCurrency\": \"PHP\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Meridian-Api-Key", "<x-meridian-api-key>")
req.Header.Add("X-Meridian-Timestamp", "<x-meridian-timestamp>")
req.Header.Add("X-Meridian-Signature", "<api-key>")
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.api.mnai.com/v1/users/{userId}/quotes")
.header("X-Meridian-Api-Key", "<x-meridian-api-key>")
.header("X-Meridian-Timestamp", "<x-meridian-timestamp>")
.header("X-Meridian-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"50\",\n \"fromCurrency\": \"USD\",\n \"toCurrency\": \"PHP\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.mnai.com/v1/users/{userId}/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Meridian-Api-Key"] = '<x-meridian-api-key>'
request["X-Meridian-Timestamp"] = '<x-meridian-timestamp>'
request["X-Meridian-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"50\",\n \"fromCurrency\": \"USD\",\n \"toCurrency\": \"PHP\"\n}"
response = http.request(request)
puts response.read_body{
"quote": {
"id": "quote_01HT2P6W9PC2QV4W0Q63QMFJ44",
"userId": "usr_01HT2P6W9PC2QV4W0Q63QMFJ44",
"fromAmount": "50",
"remainingBalance": "150",
"toAmount": "2800.00",
"exchangeRate": "56.00",
"fromCurrency": "USD",
"toCurrency": "PHP",
"expiresAt": "2026-06-10T14:30:00Z"
}
}{
"hasValidationErrors": true,
"message": "<string>",
"validationErrors": [
{
"type": "InvalidFormat",
"fieldRef": "<string>",
"message": "<string>"
}
],
"errorCode": "<string>"
}{
"hasValidationErrors": true,
"message": "<string>",
"validationErrors": [
{
"type": "InvalidFormat",
"fieldRef": "<string>",
"message": "<string>"
}
],
"errorCode": "<string>"
}Withdrawals
Create a quote
deprecated
Create a currency conversion quote that locks an exchange rate before initiating a withdrawal.
POST
/
v1
/
users
/
{userId}
/
quotes
Create a Quote
curl --request POST \
--url https://sandbox.api.mnai.com/v1/users/{userId}/quotes \
--header 'Content-Type: application/json' \
--header 'X-Meridian-Api-Key: <x-meridian-api-key>' \
--header 'X-Meridian-Signature: <api-key>' \
--header 'X-Meridian-Timestamp: <x-meridian-timestamp>' \
--data '
{
"amount": "50",
"fromCurrency": "USD",
"toCurrency": "PHP"
}
'import requests
url = "https://sandbox.api.mnai.com/v1/users/{userId}/quotes"
payload = {
"amount": "50",
"fromCurrency": "USD",
"toCurrency": "PHP"
}
headers = {
"X-Meridian-Api-Key": "<x-meridian-api-key>",
"X-Meridian-Timestamp": "<x-meridian-timestamp>",
"X-Meridian-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Meridian-Api-Key': '<x-meridian-api-key>',
'X-Meridian-Timestamp': '<x-meridian-timestamp>',
'X-Meridian-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: '50', fromCurrency: 'USD', toCurrency: 'PHP'})
};
fetch('https://sandbox.api.mnai.com/v1/users/{userId}/quotes', 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.api.mnai.com/v1/users/{userId}/quotes",
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([
'amount' => '50',
'fromCurrency' => 'USD',
'toCurrency' => 'PHP'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Meridian-Api-Key: <x-meridian-api-key>",
"X-Meridian-Signature: <api-key>",
"X-Meridian-Timestamp: <x-meridian-timestamp>"
],
]);
$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.api.mnai.com/v1/users/{userId}/quotes"
payload := strings.NewReader("{\n \"amount\": \"50\",\n \"fromCurrency\": \"USD\",\n \"toCurrency\": \"PHP\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Meridian-Api-Key", "<x-meridian-api-key>")
req.Header.Add("X-Meridian-Timestamp", "<x-meridian-timestamp>")
req.Header.Add("X-Meridian-Signature", "<api-key>")
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.api.mnai.com/v1/users/{userId}/quotes")
.header("X-Meridian-Api-Key", "<x-meridian-api-key>")
.header("X-Meridian-Timestamp", "<x-meridian-timestamp>")
.header("X-Meridian-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"50\",\n \"fromCurrency\": \"USD\",\n \"toCurrency\": \"PHP\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.mnai.com/v1/users/{userId}/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Meridian-Api-Key"] = '<x-meridian-api-key>'
request["X-Meridian-Timestamp"] = '<x-meridian-timestamp>'
request["X-Meridian-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"50\",\n \"fromCurrency\": \"USD\",\n \"toCurrency\": \"PHP\"\n}"
response = http.request(request)
puts response.read_body{
"quote": {
"id": "quote_01HT2P6W9PC2QV4W0Q63QMFJ44",
"userId": "usr_01HT2P6W9PC2QV4W0Q63QMFJ44",
"fromAmount": "50",
"remainingBalance": "150",
"toAmount": "2800.00",
"exchangeRate": "56.00",
"fromCurrency": "USD",
"toCurrency": "PHP",
"expiresAt": "2026-06-10T14:30:00Z"
}
}{
"hasValidationErrors": true,
"message": "<string>",
"validationErrors": [
{
"type": "InvalidFormat",
"fieldRef": "<string>",
"message": "<string>"
}
],
"errorCode": "<string>"
}{
"hasValidationErrors": true,
"message": "<string>",
"validationErrors": [
{
"type": "InvalidFormat",
"fieldRef": "<string>",
"message": "<string>"
}
],
"errorCode": "<string>"
}Legacy endpoint. This is part of the legacy withdrawal flow and will be deprecated. An upcoming Transactions Intent API will replace it. Avoid building new integrations against this endpoint — contact your Solutions Engineer for migration guidance.
Authorizations
Meridian HMAC header authentication.
Required headers:
- X-Meridian-Api-Key
- X-Meridian-Timestamp
- X-Meridian-Signature
X-Meridian-Signature is the HMAC SHA-256 signature of the canonical request string, computed per request as HMAC-SHA256(apiKey + timestamp + method + path + body). See Authentication for how to construct it.
Headers
API key issued by Meridian during provisioning.
Current time in milliseconds since the Unix epoch. Must be within 10 seconds of the request.
Path Parameters
ID of the user the quote is created for
Body
application/json
Details of the quote to be created
Response
Quote created successfully
Show child attributes
Show child attributes
⌘I