curl --request POST \
--url https://api.sandbox.rails.wayex.com/v1/treasury/payouts/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"beneficiaryId": "<string>",
"amount": "<string>",
"currency": "AUD",
"externalReference": "<string>",
"purpose": "<string>",
"walletProviderReference": "<string>",
"downstreamMerchantReference": "<string>",
"evidenceId": "<string>",
"onBehalfOf": "<string>",
"statementReference": "<string>"
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/treasury/payouts/preview"
payload = {
"beneficiaryId": "<string>",
"amount": "<string>",
"currency": "AUD",
"externalReference": "<string>",
"purpose": "<string>",
"walletProviderReference": "<string>",
"downstreamMerchantReference": "<string>",
"evidenceId": "<string>",
"onBehalfOf": "<string>",
"statementReference": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
beneficiaryId: '<string>',
amount: '<string>',
currency: 'AUD',
externalReference: '<string>',
purpose: '<string>',
walletProviderReference: '<string>',
downstreamMerchantReference: '<string>',
evidenceId: '<string>',
onBehalfOf: '<string>',
statementReference: '<string>'
})
};
fetch('https://api.sandbox.rails.wayex.com/v1/treasury/payouts/preview', 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.sandbox.rails.wayex.com/v1/treasury/payouts/preview",
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([
'beneficiaryId' => '<string>',
'amount' => '<string>',
'currency' => 'AUD',
'externalReference' => '<string>',
'purpose' => '<string>',
'walletProviderReference' => '<string>',
'downstreamMerchantReference' => '<string>',
'evidenceId' => '<string>',
'onBehalfOf' => '<string>',
'statementReference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.sandbox.rails.wayex.com/v1/treasury/payouts/preview"
payload := strings.NewReader("{\n \"beneficiaryId\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"AUD\",\n \"externalReference\": \"<string>\",\n \"purpose\": \"<string>\",\n \"walletProviderReference\": \"<string>\",\n \"downstreamMerchantReference\": \"<string>\",\n \"evidenceId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"statementReference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.sandbox.rails.wayex.com/v1/treasury/payouts/preview")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"beneficiaryId\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"AUD\",\n \"externalReference\": \"<string>\",\n \"purpose\": \"<string>\",\n \"walletProviderReference\": \"<string>\",\n \"downstreamMerchantReference\": \"<string>\",\n \"evidenceId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"statementReference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/treasury/payouts/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"beneficiaryId\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"AUD\",\n \"externalReference\": \"<string>\",\n \"purpose\": \"<string>\",\n \"walletProviderReference\": \"<string>\",\n \"downstreamMerchantReference\": \"<string>\",\n \"evidenceId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"statementReference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"principal": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"fee": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"sourceDebit": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"asset": "AUD",
"configurationId": "<string>",
"canProceed": true,
"network": "ethereum",
"holdReason": "<string>"
}Preview an AUD payout
Calculates the effective payout fee, total AUD source debit, current eligibility, and any hold reason without creating an operation.
curl --request POST \
--url https://api.sandbox.rails.wayex.com/v1/treasury/payouts/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"beneficiaryId": "<string>",
"amount": "<string>",
"currency": "AUD",
"externalReference": "<string>",
"purpose": "<string>",
"walletProviderReference": "<string>",
"downstreamMerchantReference": "<string>",
"evidenceId": "<string>",
"onBehalfOf": "<string>",
"statementReference": "<string>"
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/treasury/payouts/preview"
payload = {
"beneficiaryId": "<string>",
"amount": "<string>",
"currency": "AUD",
"externalReference": "<string>",
"purpose": "<string>",
"walletProviderReference": "<string>",
"downstreamMerchantReference": "<string>",
"evidenceId": "<string>",
"onBehalfOf": "<string>",
"statementReference": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
beneficiaryId: '<string>',
amount: '<string>',
currency: 'AUD',
externalReference: '<string>',
purpose: '<string>',
walletProviderReference: '<string>',
downstreamMerchantReference: '<string>',
evidenceId: '<string>',
onBehalfOf: '<string>',
statementReference: '<string>'
})
};
fetch('https://api.sandbox.rails.wayex.com/v1/treasury/payouts/preview', 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.sandbox.rails.wayex.com/v1/treasury/payouts/preview",
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([
'beneficiaryId' => '<string>',
'amount' => '<string>',
'currency' => 'AUD',
'externalReference' => '<string>',
'purpose' => '<string>',
'walletProviderReference' => '<string>',
'downstreamMerchantReference' => '<string>',
'evidenceId' => '<string>',
'onBehalfOf' => '<string>',
'statementReference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.sandbox.rails.wayex.com/v1/treasury/payouts/preview"
payload := strings.NewReader("{\n \"beneficiaryId\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"AUD\",\n \"externalReference\": \"<string>\",\n \"purpose\": \"<string>\",\n \"walletProviderReference\": \"<string>\",\n \"downstreamMerchantReference\": \"<string>\",\n \"evidenceId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"statementReference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.sandbox.rails.wayex.com/v1/treasury/payouts/preview")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"beneficiaryId\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"AUD\",\n \"externalReference\": \"<string>\",\n \"purpose\": \"<string>\",\n \"walletProviderReference\": \"<string>\",\n \"downstreamMerchantReference\": \"<string>\",\n \"evidenceId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"statementReference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/treasury/payouts/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"beneficiaryId\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"AUD\",\n \"externalReference\": \"<string>\",\n \"purpose\": \"<string>\",\n \"walletProviderReference\": \"<string>\",\n \"downstreamMerchantReference\": \"<string>\",\n \"evidenceId\": \"<string>\",\n \"onBehalfOf\": \"<string>\",\n \"statementReference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"principal": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"fee": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"sourceDebit": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"asset": "AUD",
"configurationId": "<string>",
"canProceed": true,
"network": "ethereum",
"holdReason": "<string>"
}What this endpoint does
Calculates the effective payout fee, total AUD source debit, current eligibility, and any hold reason without creating an operation.When to use it
Call it after the user enters the payout and before showing the final review screen. Submit the same intent to the create endpoint only after confirmation.Before you call
Use a secret API key withtreasury:write. The saved beneficiary must be active. You may select an existing evidenceId; otherwise Wayex uses the beneficiary’s newest accepted, unexpired evidence when policy requires it.
Money and balance effect
Previewing does not reserve, debit, or send AUD. The returned source debit andcanProceed value are advisory until the create request atomically rechecks policy and reserves funds.
States and completion
canProceed reports current static eligibility. A holdReason explains a current block or review path; the final create response remains authoritative under concurrent balance and provider changes.
Safe retries
Send a uniqueIdempotency-Key for the logical action. If the response is lost, retry the same payload with the same key; never create a new key merely because the first response timed out.
Read Beneficiaries and payouts for the complete workflow.Authorizations
Send the same Wayex API key as Authorization: Bearer <key>.
Headers
A unique key for this logical action. Reuse the same key and identical payload when retrying after an unknown response.
8 - 255Body
1^\d+(\.\d+)?$AUD Your own reference for this payout, echoed back for correlation and reconciliation. This is NOT the idempotency key — use the Idempotency-Key header for retry-safety.
11 - 255Optional. Your own reference for the upstream wallet or provider these funds relate to. Stored and returned for your reconciliation; Wayex does not interpret it.
1Optional. Your own reference for the downstream merchant or end-customer this payout is made for. Reconciliation and reporting metadata only; Wayex does not interpret it.
1Optional. Pin a specific accepted, unexpired source-of-funds evidence record (belonging to this beneficiary) to back this payout. Omit to let Wayex use the beneficiary's newest accepted, unexpired evidence when policy requires it.
1wayex, tenant 1 - 1401 - 280Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
AUD, USDC, USDT 1ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, solana, tron 1
