curl --request POST \
--url https://api.sandbox.rails.wayex.com/v1/treasury/payouts \
--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"
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', 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",
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"
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")
.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")
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{
"id": "<string>",
"clientId": "<string>",
"beneficiaryId": "<string>",
"amount": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"fee": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"sourceDebit": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"status": "accepted",
"configurationId": "<string>",
"externalReference": "<string>",
"purpose": "<string>",
"reservation": {
"status": "reserved",
"amount": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
}
},
"nextAction": "none",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"walletProviderReference": "<string>",
"downstreamMerchantReference": "<string>",
"evidenceId": "<string>",
"providerReference": "<string>",
"statusReason": "<string>",
"remitter": "wayex",
"onBehalfOf": "<string>",
"statementReference": "<string>"
}Create an AUD payout
Creates an AUD payout to a saved beneficiary and durably reserves its source debit from this tenant account’s AUD wallet.
curl --request POST \
--url https://api.sandbox.rails.wayex.com/v1/treasury/payouts \
--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"
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', 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",
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"
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")
.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")
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{
"id": "<string>",
"clientId": "<string>",
"beneficiaryId": "<string>",
"amount": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"fee": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"sourceDebit": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
},
"status": "accepted",
"configurationId": "<string>",
"externalReference": "<string>",
"purpose": "<string>",
"reservation": {
"status": "reserved",
"amount": {
"amount": "<string>",
"currency": "AUD",
"network": "ethereum"
}
},
"nextAction": "none",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"walletProviderReference": "<string>",
"downstreamMerchantReference": "<string>",
"evidenceId": "<string>",
"providerReference": "<string>",
"statusReason": "<string>",
"remitter": "wayex",
"onBehalfOf": "<string>",
"statementReference": "<string>"
}What this endpoint does
Creates an AUD payout to a saved beneficiary and durably reserves its source debit from this tenant account’s AUD wallet.When to use it
Submit it after choosing the beneficiary, confirming the amount and purpose, and reviewing the effective fee and available balance.Before you call
Use a secret API key withtreasury:write. The beneficiary, its accepted evidence when required, limits, BSB/account rail, and wallet balance must all be eligible. Sumsub share tokens are submitted with beneficiary creation, not here.
Money and balance effect
On acceptance, the payout source debit is reserved so it cannot be spent twice. Settlement captures the reservation; a proven pre-settlement failure releases it, while returns follow the configured return policy.States and completion
Bothaccepted and held payouts have durably reserved the source debit — the response’s reservation object shows reserved. accepted means policy passed; held needs review before submission. submitted reached the bank rail; settled, failed, and returned describe later outcomes.
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
111Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
accepted, held, submitted, settled, failed, returned 1Your 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 - 255Show child attributes
Show child attributes
none, wait_for_settlement, contact_support, retry_new_request, review_balance Optional. 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.
1The specific source-of-funds evidence record backing this payout (auto-selected when you do not pin one).
111wayex, tenant 11
