Set a payment route’s client gate
curl --request PUT \
--url https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate"
payload = { "enabled": True }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({enabled: true})
};
fetch('https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate', 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/payment-routes/{id}/client-gate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => 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/payment-routes/{id}/client-gate"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"counterpartyId": "<string>",
"customerId": "<string>",
"direction": "aud_to_stablecoin",
"destination": {
"network": "ethereum",
"address": "<string>",
"currency": "USDC"
},
"status": "active",
"instructions": {
"title": "<string>",
"reference": "<string>",
"deposit": {
"kind": "aud",
"bsb": "<string>",
"accountNumber": "<string>",
"reference": "<string>",
"payId": {
"type": "email",
"value": "<string>"
},
"payeeName": "<string>"
},
"destinationSummary": "<string>",
"steps": [
"<string>"
],
"limits": {
"min": "<string>",
"max": "<string>",
"daily": "<string>"
},
"routeStatus": "active"
},
"createdAt": "2023-11-07T05:31:56Z",
"limits": {
"min": "<string>",
"max": "<string>",
"daily": "<string>"
},
"clientGate": true,
"clientGateActive": true,
"deactivatedAt": "2023-11-07T05:31:56Z",
"deactivatedBy": "<string>",
"deactivationNote": "<string>"
}Direct payment routes
Set a payment route’s client gate
Turns the client gate on or off for an AUD-to-stablecoin route. While it is on, each funding of the route waits at awaiting_client_action after screening, before anything converts, until you progress or refund it.
PUT
/
v1
/
payment-routes
/
{id}
/
client-gate
Set a payment route’s client gate
curl --request PUT \
--url https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate"
payload = { "enabled": True }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({enabled: true})
};
fetch('https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate', 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/payment-routes/{id}/client-gate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => 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/payment-routes/{id}/client-gate"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/payment-routes/{id}/client-gate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"counterpartyId": "<string>",
"customerId": "<string>",
"direction": "aud_to_stablecoin",
"destination": {
"network": "ethereum",
"address": "<string>",
"currency": "USDC"
},
"status": "active",
"instructions": {
"title": "<string>",
"reference": "<string>",
"deposit": {
"kind": "aud",
"bsb": "<string>",
"accountNumber": "<string>",
"reference": "<string>",
"payId": {
"type": "email",
"value": "<string>"
},
"payeeName": "<string>"
},
"destinationSummary": "<string>",
"steps": [
"<string>"
],
"limits": {
"min": "<string>",
"max": "<string>",
"daily": "<string>"
},
"routeStatus": "active"
},
"createdAt": "2023-11-07T05:31:56Z",
"limits": {
"min": "<string>",
"max": "<string>",
"daily": "<string>"
},
"clientGate": true,
"clientGateActive": true,
"deactivatedAt": "2023-11-07T05:31:56Z",
"deactivatedBy": "<string>",
"deactivationNote": "<string>"
}What this endpoint does
Turns the client gate on or off for an AUD-to-stablecoin route. While it is on, each funding of the route waits atawaiting_client_action after screening, before anything converts, until you progress or refund it.
When to use it
Use it when you want to approve each payment on a route before it converts, or to return to automatic conversion. Send{ "enabled": true } or { "enabled": false }.
Before you call
Use a secret API key with route write access and pass an AUD-to-stablecoin route owned by this tenant account. The capability must be enabled for your account by Wayex (403 onramp_client_gate_not_available otherwise, in either direction). A request made from a console session also needs a recent second-factor confirmation.
Money and balance effect
This changes the route only. Turning the gate off does not release or convert payments already waiting — progress or refund each of those.States and completion
The response is the route.clientGate is present (true) only while the gate is on; clientGateActive shows whether it is in effect right now (false when Wayex has disabled the capability for your account, in which case new fundings convert automatically). An off-ramp route is refused with 409 route_direction_unsupported.
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 Payment routes for the complete workflow.Authorizations
BearerApiKey
Headers
Response
The updated payment route.
- Option 1
- Option 2

