Skip to main content
POST
/
v1
/
quotes
Create a quote
curl --request POST \
  --url https://api.example.com/v1/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fromCurrency": "NGN",
  "intent": "payout",
  "targetAmount": "100",
  "toCurrency": "GBP"
}
'
import requests

url = "https://api.example.com/v1/quotes"

payload = {
    "fromCurrency": "NGN",
    "intent": "payout",
    "targetAmount": "100",
    "toCurrency": "GBP"
}
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({fromCurrency: 'NGN', intent: 'payout', targetAmount: '100', toCurrency: 'GBP'})
};

fetch('https://api.example.com/v1/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://api.example.com/v1/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([
    'fromCurrency' => 'NGN',
    'intent' => 'payout',
    'targetAmount' => '100',
    'toCurrency' => 'GBP'
  ]),
  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://api.example.com/v1/quotes"

	payload := strings.NewReader("{\n  \"fromCurrency\": \"NGN\",\n  \"intent\": \"payout\",\n  \"targetAmount\": \"100\",\n  \"toCurrency\": \"GBP\"\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://api.example.com/v1/quotes")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fromCurrency\": \"NGN\",\n  \"intent\": \"payout\",\n  \"targetAmount\": \"100\",\n  \"toCurrency\": \"GBP\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/quotes")

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  \"fromCurrency\": \"NGN\",\n  \"intent\": \"payout\",\n  \"targetAmount\": \"100\",\n  \"toCurrency\": \"GBP\"\n}"

response = http.request(request)
puts response.read_body
{
  "expiresAt": "2026-04-13T12:00:30Z",
  "fromCurrency": "NGN",
  "id": "uuid-here",
  "rate": "2524.47560000",
  "targetAmount": "100",
  "toCurrency": "GBP",
  "totalDebitAmount": "252447.5600"
}

Authorizations

Authorization
string
header
required

Enter Auth0 JWT token

Headers

Idempotency-Key
string

Client-generated idempotency key

Body

application/json

The intent field discriminates the body: a payout quote requires targetAmount; a convert quote requires amount. The runtime body is a single CreateQuoteDto validated per-intent.

fromCurrency
string
required

Source currency (debited from the client)

Example:

"NGN"

intent
enum<string>
required

Must be 'payout' for this variant.

Available options:
payout
Example:

"payout"

targetAmount
string
required

Amount the beneficiary receives, in toCurrency (required).

Example:

"100"

toCurrency
string
required

Target currency (received by the beneficiary)

Example:

"GBP"

Response

The minted quote. Both intents return the same shape.

expiresAt
string
required

Quote expiry timestamp (ISO 8601)

Example:

"2026-04-13T12:00:30Z"

fromCurrency
string
required

Source currency (debited from the caller)

Example:

"NGN"

id
string
required

Quote identifier

Example:

"uuid-here"

rate
string
required

All-in rate: fromCurrency per 1 toCurrency. Always present; a same-currency or stablecoin-par quote (no FX leg) reports "1.00000000".

Example:

"2524.47560000"

targetAmount
string
required

Amount received in toCurrency

Example:

"100"

toCurrency
string
required

Target currency (received by the beneficiary, or credited to the caller's own balance for a convert quote)

Example:

"GBP"

totalDebitAmount
string
required

Total amount debited from the caller in fromCurrency. The quote prices FX + markup only, so this is the FX base; a payout's fixed fee is added at payout creation.

Example:

"252447.5600"

status
enum<string>

Quote status (only included on GET)

Available options:
active,
used,
expired