curl --request POST \
--url https://api.bachs.io/v1/payouts/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_currency": "USD",
"to_currency": "NGN",
"amount": "100.00"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({from_currency: 'USD', to_currency: 'NGN', amount: '100.00'})
};
fetch('https://api.bachs.io/v1/payouts/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/payouts/quotes"
payload = {
"from_currency": "USD",
"to_currency": "NGN",
"amount": "100.00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/payouts/quotes"
payload := strings.NewReader("{\n \"from_currency\": \"USD\",\n \"to_currency\": \"NGN\",\n \"amount\": \"100.00\"\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))
}{
"quote_id": "pqt_1a2b3c4d5e6f",
"from_currency": "USD",
"to_currency": "NGN",
"from_amount": "100.00",
"to_amount": "148500.00",
"exchange_rate": "1500.00",
"expires_at": "2026-02-22T12:31:00+00:00"
}{
"detail": "Invalid request parameters",
"error_code": "VALIDATION_ERROR",
"errors": [
{
"field": "amount",
"message": "Amount must be a positive decimal string",
"type": "value_error"
}
]
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "API key does not have permission for this operation",
"error_code": "FORBIDDEN"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}{
"detail": "Rate limit exceeded. Please retry after a few seconds.",
"error_code": "TOO_MANY_REQUESTS"
}{
"detail": "An unexpected error occurred. Please try again later.",
"error_code": "INTERNAL_SERVER_ERROR"
}Create Payout Quote
Lock an exchange rate for a payout that delivers a different currency from the balance it debits. Returns a quote_id to pass to Create Payout in place of amount, along with the rate and the amount the destination receives. Same-currency payouts need no quote. The quote carries no fee: the payout fee is charged on top of the amount when the payout is created.
curl --request POST \
--url https://api.bachs.io/v1/payouts/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_currency": "USD",
"to_currency": "NGN",
"amount": "100.00"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({from_currency: 'USD', to_currency: 'NGN', amount: '100.00'})
};
fetch('https://api.bachs.io/v1/payouts/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/payouts/quotes"
payload = {
"from_currency": "USD",
"to_currency": "NGN",
"amount": "100.00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/payouts/quotes"
payload := strings.NewReader("{\n \"from_currency\": \"USD\",\n \"to_currency\": \"NGN\",\n \"amount\": \"100.00\"\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))
}{
"quote_id": "pqt_1a2b3c4d5e6f",
"from_currency": "USD",
"to_currency": "NGN",
"from_amount": "100.00",
"to_amount": "148500.00",
"exchange_rate": "1500.00",
"expires_at": "2026-02-22T12:31:00+00:00"
}{
"detail": "Invalid request parameters",
"error_code": "VALIDATION_ERROR",
"errors": [
{
"field": "amount",
"message": "Amount must be a positive decimal string",
"type": "value_error"
}
]
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "API key does not have permission for this operation",
"error_code": "FORBIDDEN"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}{
"detail": "Rate limit exceeded. Please retry after a few seconds.",
"error_code": "TOO_MANY_REQUESTS"
}{
"detail": "An unexpected error occurred. Please try again later.",
"error_code": "INTERNAL_SERVER_ERROR"
}Authorizations
Bearer token authentication. Pass your API key as Authorization: Bearer sk_.... See Authentication for keys, scopes, and sandbox vs production.
Body
Response
Success - Payout quote generated
Response containing payout quote details.
Payout quote ID.
Debited currency.
Destination currency.
The amount debited from your balance in from_currency, before the withdrawal fee is deducted.
The amount the destination will receive in to_currency, net of the withdrawal fee. This is NOT a gross currency conversion of from_amount: the fee is deducted from from_amount before the exchange rate is applied, so to_amount already reflects what lands on the other side.
Applied quote exchange rate.
Quote expiration timestamp.

