Create Treasury funding instructions
curl --request POST \
--url https://api.sandbox.rails.wayex.com/v1/treasury/funding-instruments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"type": "aud_account",
"accountName": "<string>",
"includePayId": true
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/treasury/funding-instruments"
payload = {
"type": "aud_account",
"accountName": "<string>",
"includePayId": True
}
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({type: 'aud_account', accountName: '<string>', includePayId: true})
};
fetch('https://api.sandbox.rails.wayex.com/v1/treasury/funding-instruments', 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/funding-instruments",
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([
'type' => 'aud_account',
'accountName' => '<string>',
'includePayId' => true
]),
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/funding-instruments"
payload := strings.NewReader("{\n \"type\": \"aud_account\",\n \"accountName\": \"<string>\",\n \"includePayId\": true\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/funding-instruments")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"aud_account\",\n \"accountName\": \"<string>\",\n \"includePayId\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/treasury/funding-instruments")
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 \"type\": \"aud_account\",\n \"accountName\": \"<string>\",\n \"includePayId\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"clientId": "<string>",
"providerReference": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "aud_account",
"asset": "AUD",
"accountName": "<string>",
"bsb": "<string>",
"accountNumber": "<string>",
"deactivatedAt": "2023-11-07T05:31:56Z",
"payId": "<string>",
"activationMessage": "<string>"
}Fund and check balance
Create Treasury funding instructions
Provisions reusable AUD funding instructions or a stablecoin deposit address for this tenant account. An AUD instrument returns a BSB and account number and, by default, an email payId to pay into as well — set includePayId to false to skip the PayID.
POST
/
v1
/
treasury
/
funding-instruments
Create Treasury funding instructions
curl --request POST \
--url https://api.sandbox.rails.wayex.com/v1/treasury/funding-instruments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"type": "aud_account",
"accountName": "<string>",
"includePayId": true
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/treasury/funding-instruments"
payload = {
"type": "aud_account",
"accountName": "<string>",
"includePayId": True
}
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({type: 'aud_account', accountName: '<string>', includePayId: true})
};
fetch('https://api.sandbox.rails.wayex.com/v1/treasury/funding-instruments', 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/funding-instruments",
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([
'type' => 'aud_account',
'accountName' => '<string>',
'includePayId' => true
]),
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/funding-instruments"
payload := strings.NewReader("{\n \"type\": \"aud_account\",\n \"accountName\": \"<string>\",\n \"includePayId\": true\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/funding-instruments")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"aud_account\",\n \"accountName\": \"<string>\",\n \"includePayId\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/treasury/funding-instruments")
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 \"type\": \"aud_account\",\n \"accountName\": \"<string>\",\n \"includePayId\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"clientId": "<string>",
"providerReference": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "aud_account",
"asset": "AUD",
"accountName": "<string>",
"bsb": "<string>",
"accountNumber": "<string>",
"deactivatedAt": "2023-11-07T05:31:56Z",
"payId": "<string>",
"activationMessage": "<string>"
}What this endpoint does
Provisions reusable AUD funding instructions or a stablecoin deposit address for this tenant account. An AUD instrument returns a BSB and account number and, by default, an emailpayId to pay into as well — set includePayId to false to skip the PayID.
When to use it
Create one when the account does not already have suitable instructions for the required asset, rail, or network.Before you call
Use a secret API key withtreasury:write. The requested rail, asset, and network must be enabled for this tenant account. includePayId applies to AUD instruments only and defaults to true.
Money and balance effect
Provisioning instructions does not credit the wallet. The balance changes only after Wayex detects, validates, and credits incoming funds.States and completion
Creation confirms the instrument was issued. A newly issued AUD account or PayID can take a few minutes to become active for NPP; when the response carries anactivationMessage, show it and wait for activation before relying on the PayID. Track incoming funds separately and wait for the wallet credit before spending them.
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 Funding and balances for the complete workflow.Authorizations
BearerApiKey
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.
Required string length:
8 - 255Body
application/json
Response
201 - application/json
- Option 1
- Option 2
- Option 3
Minimum string length:
1Minimum string length:
1Minimum string length:
1Available options:
active, inactive Available options:
aud_account Available options:
AUD Minimum string length:
1Pattern:
^\d{6}$Pattern:
^\d{1,9}$Minimum string length:
1Minimum string length:
1
