> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rails.wayex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

## 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 at `awaiting_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 unique `Idempotency-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](/console/payment-routes.md) for the complete workflow.


## OpenAPI

````yaml /api-reference/openapi.json put /v1/payment-routes/{id}/client-gate
openapi: 3.0.0
info:
  title: Wayex API
  description: >-
    Wayex APIs for direct customer payment routes and isolated, prefunded
    Treasury accounts. Each API key is bound to one tenant account and its own
    wallet, settings, webhooks, and reporting.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.sandbox.rails.wayex.com
    description: Sandbox — fully simulated providers, no real funds move
  - url: https://api.rails.wayex.com
    description: Production — live rails, real funds move
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Treasury
    description: >-
      Prefunded AUD and stablecoin wallets for one isolated tenant account.
      Fund, pay, convert, withdraw, track, and reconcile without selecting
      another account.
  - name: Customers
    description: >-
      Onboard end customers, run verification, and manage each customer's
      entitlements.
  - name: Payment routes
    description: >-
      Standing deposit instructions per customer. When a customer funds a route,
      Wayex auto-converts at the live rate and pays out/sends — no quote, no
      lock.
  - name: Transfers
    description: >-
      Read the conversion records produced when customers fund payment routes —
      the live activity feed and per-conversion lifecycle timeline — and, on
      client-gated routes, progress or refund a waiting payment.
  - name: Rates
    description: >-
      The live indicative AUD↔stablecoin rate right now — the all-in rate Wayex
      quotes. Indicative only; the binding price is struck when a route's funds
      land, or when you progress a client-gated payment.
  - name: Revenue
    description: Your developer-fee revenue over time.
  - name: Invoices
    description: >-
      Your monthly invoices — Wayex platform fees due, net of your accrued
      developer-fee credit.
  - name: Webhooks
    description: Subscribe to HMAC-signed event webhooks and inspect deliveries.
  - name: API keys
    description: Create, list, and rotate API keys for programmatic access.
  - name: Fees
    description: >-
      Configure your developer fee — the markup withheld from each conversion
      and credited against your monthly invoice.
  - name: Invitations
    description: Accept a team invitation and activate your account.
  - name: Team
    description: Manage your own team — list members and send console invitations.
  - name: Notification settings
    description: >-
      Manage whether Wayex sends customer-facing notification emails on your
      behalf.
paths:
  /v1/payment-routes/{id}/client-gate:
    put:
      tags:
        - Payment routes
      summary: Set a payment route’s client gate
      description: >-
        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.
        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 }`.
      operationId: PaymentRouteController2_setClientGate_v1
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            A unique key for this logical action. Reuse the same key and
            identical payload when retrying after an unknown response.
          schema:
            type: string
            minLength: 8
            maxLength: 255
          example: 13bda8d7-87bd-4fa4-b7d5-e740725f9bd2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
              required:
                - enabled
      responses:
        '200':
          description: The updated payment route.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      counterpartyId:
                        description: >-
                          The client account (counterparty) this route belongs
                          to. For API callers this is always your own account
                          id.
                        type: string
                        minLength: 1
                      customerId:
                        type: string
                        minLength: 1
                      direction:
                        type: string
                        enum:
                          - aud_to_stablecoin
                      destination:
                        type: object
                        properties:
                          network:
                            description: The network the stablecoin is delivered on.
                            type: string
                            enum:
                              - ethereum
                              - base
                              - arbitrum
                              - optimism
                              - polygon
                              - bsc
                              - avalanche
                              - solana
                              - tron
                          address:
                            description: >-
                              The destination crypto address the converted
                              stablecoin is sent to.
                            type: string
                            minLength: 1
                          currency:
                            description: Which stablecoin to deliver.
                            type: string
                            enum:
                              - USDC
                              - USDT
                        required:
                          - network
                          - address
                          - currency
                      limits:
                        type: object
                        properties:
                          min:
                            type: string
                          max:
                            type: string
                          daily:
                            type: string
                      clientGate:
                        type: boolean
                      clientGateActive:
                        type: boolean
                      status:
                        type: string
                        enum:
                          - active
                          - inactive
                      deactivatedAt:
                        description: >-
                          When the route was deactivated. Present only on an
                          `inactive` route.
                        type: string
                        format: date-time
                      deactivatedBy:
                        description: >-
                          Who deactivated the route: the console user id, or the
                          API key id for an API call. Present only on an
                          `inactive` route.
                        type: string
                        minLength: 1
                      deactivationNote:
                        description: The reason given when the route was deactivated.
                        type: string
                        minLength: 1
                      instructions:
                        type: object
                        properties:
                          title:
                            type: string
                            minLength: 1
                          reference:
                            type: string
                            minLength: 1
                          deposit:
                            oneOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - aud
                                  bsb:
                                    type: string
                                    minLength: 1
                                  accountNumber:
                                    type: string
                                    minLength: 1
                                  payId:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - email
                                          - phone
                                          - abn
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - type
                                      - value
                                  reference:
                                    type: string
                                    minLength: 1
                                  payeeName:
                                    description: >-
                                      The account name for the payer to enter —
                                      the name their bank matches for this BSB
                                      and account number. Absent on routes
                                      created before this field existed; use
                                      "Wayex" there.
                                    type: string
                                    minLength: 1
                                    maxLength: 140
                                required:
                                  - kind
                                  - bsb
                                  - accountNumber
                                  - reference
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - crypto
                                  network:
                                    type: string
                                    enum:
                                      - ethereum
                                      - base
                                      - arbitrum
                                      - optimism
                                      - polygon
                                      - bsc
                                      - avalanche
                                      - solana
                                      - tron
                                  address:
                                    type: string
                                    minLength: 1
                                  asset:
                                    type: string
                                    enum:
                                      - USDC
                                      - USDT
                                required:
                                  - kind
                                  - network
                                  - address
                                  - asset
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - crypto
                                  networkScope:
                                    type: string
                                    enum:
                                      - evm
                                  acceptedNetworks:
                                    type: array
                                    minItems: 1
                                    items:
                                      type: string
                                      enum:
                                        - ethereum
                                        - base
                                        - arbitrum
                                        - optimism
                                        - polygon
                                        - bsc
                                        - avalanche
                                        - solana
                                        - tron
                                  address:
                                    type: string
                                    minLength: 1
                                  asset:
                                    type: string
                                    enum:
                                      - USDC
                                      - USDT
                                required:
                                  - kind
                                  - networkScope
                                  - acceptedNetworks
                                  - address
                                  - asset
                          destinationSummary:
                            type: string
                            minLength: 1
                          limits:
                            type: object
                            properties:
                              min:
                                type: string
                              max:
                                type: string
                              daily:
                                type: string
                          steps:
                            type: array
                            items:
                              type: string
                          routeStatus:
                            description: >-
                              The route status at read time. `inactive` means
                              the route was deactivated; do not share these
                              instructions.
                            type: string
                            enum:
                              - active
                              - inactive
                        required:
                          - title
                          - reference
                          - deposit
                          - destinationSummary
                          - steps
                      createdAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - counterpartyId
                      - customerId
                      - direction
                      - destination
                      - status
                      - instructions
                      - createdAt
                  - type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      counterpartyId:
                        description: >-
                          The client account (counterparty) this route belongs
                          to. For API callers this is always your own account
                          id.
                        type: string
                        minLength: 1
                      customerId:
                        type: string
                        minLength: 1
                      direction:
                        type: string
                        enum:
                          - stablecoin_to_aud
                      destination:
                        oneOf:
                          - type: object
                            properties:
                              bankAccount:
                                type: object
                                properties:
                                  accountHolderName:
                                    description: Name on the destination AUD bank account.
                                    type: string
                                    minLength: 1
                                  bsb:
                                    description: >-
                                      The 6-digit BSB of the destination AUD
                                      bank account (`NNNNNN` or `NNN-NNN`).
                                    type: string
                                    pattern: ^\d{3}-?\d{3}$
                                  accountNumber:
                                    description: The destination AUD bank account number.
                                    type: string
                                    pattern: ^\d{1,9}$
                                required:
                                  - accountHolderName
                                  - bsb
                                  - accountNumber
                              asset:
                                type: string
                                enum:
                                  - USDC
                                  - USDT
                              network:
                                type: string
                                enum:
                                  - ethereum
                                  - base
                                  - arbitrum
                                  - optimism
                                  - polygon
                                  - bsc
                                  - avalanche
                                  - solana
                                  - tron
                            required:
                              - bankAccount
                              - asset
                              - network
                          - type: object
                            properties:
                              bankAccount:
                                type: object
                                properties:
                                  accountHolderName:
                                    description: Name on the destination AUD bank account.
                                    type: string
                                    minLength: 1
                                  bsb:
                                    description: >-
                                      The 6-digit BSB of the destination AUD
                                      bank account (`NNNNNN` or `NNN-NNN`).
                                    type: string
                                    pattern: ^\d{3}-?\d{3}$
                                  accountNumber:
                                    description: The destination AUD bank account number.
                                    type: string
                                    pattern: ^\d{1,9}$
                                required:
                                  - accountHolderName
                                  - bsb
                                  - accountNumber
                              asset:
                                type: string
                                enum:
                                  - USDC
                                  - USDT
                              networkScope:
                                type: string
                                enum:
                                  - evm
                              acceptedNetworks:
                                type: array
                                minItems: 1
                                items:
                                  type: string
                                  enum:
                                    - ethereum
                                    - base
                                    - arbitrum
                                    - optimism
                                    - polygon
                                    - bsc
                                    - avalanche
                                    - solana
                                    - tron
                            required:
                              - bankAccount
                              - asset
                              - networkScope
                              - acceptedNetworks
                          - type: object
                            properties:
                              payId:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - email
                                      - phone
                                      - abn
                                  value:
                                    type: string
                                    minLength: 1
                                required:
                                  - type
                                  - value
                              asset:
                                type: string
                                enum:
                                  - USDC
                                  - USDT
                              network:
                                type: string
                                enum:
                                  - ethereum
                                  - base
                                  - arbitrum
                                  - optimism
                                  - polygon
                                  - bsc
                                  - avalanche
                                  - solana
                                  - tron
                            required:
                              - payId
                              - asset
                              - network
                          - type: object
                            properties:
                              payId:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - email
                                      - phone
                                      - abn
                                  value:
                                    type: string
                                    minLength: 1
                                required:
                                  - type
                                  - value
                              asset:
                                type: string
                                enum:
                                  - USDC
                                  - USDT
                              networkScope:
                                type: string
                                enum:
                                  - evm
                              acceptedNetworks:
                                type: array
                                minItems: 1
                                items:
                                  type: string
                                  enum:
                                    - ethereum
                                    - base
                                    - arbitrum
                                    - optimism
                                    - polygon
                                    - bsc
                                    - avalanche
                                    - solana
                                    - tron
                            required:
                              - payId
                              - asset
                              - networkScope
                              - acceptedNetworks
                      limits:
                        type: object
                        properties:
                          min:
                            type: string
                          max:
                            type: string
                          daily:
                            type: string
                      status:
                        type: string
                        enum:
                          - active
                          - inactive
                      deactivatedAt:
                        description: >-
                          When the route was deactivated. Present only on an
                          `inactive` route.
                        type: string
                        format: date-time
                      deactivatedBy:
                        description: >-
                          Who deactivated the route: the console user id, or the
                          API key id for an API call. Present only on an
                          `inactive` route.
                        type: string
                        minLength: 1
                      deactivationNote:
                        description: The reason given when the route was deactivated.
                        type: string
                        minLength: 1
                      instructions:
                        type: object
                        properties:
                          title:
                            type: string
                            minLength: 1
                          reference:
                            type: string
                            minLength: 1
                          deposit:
                            oneOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - aud
                                  bsb:
                                    type: string
                                    minLength: 1
                                  accountNumber:
                                    type: string
                                    minLength: 1
                                  payId:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - email
                                          - phone
                                          - abn
                                      value:
                                        type: string
                                        minLength: 1
                                    required:
                                      - type
                                      - value
                                  reference:
                                    type: string
                                    minLength: 1
                                  payeeName:
                                    description: >-
                                      The account name for the payer to enter —
                                      the name their bank matches for this BSB
                                      and account number. Absent on routes
                                      created before this field existed; use
                                      "Wayex" there.
                                    type: string
                                    minLength: 1
                                    maxLength: 140
                                required:
                                  - kind
                                  - bsb
                                  - accountNumber
                                  - reference
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - crypto
                                  network:
                                    type: string
                                    enum:
                                      - ethereum
                                      - base
                                      - arbitrum
                                      - optimism
                                      - polygon
                                      - bsc
                                      - avalanche
                                      - solana
                                      - tron
                                  address:
                                    type: string
                                    minLength: 1
                                  asset:
                                    type: string
                                    enum:
                                      - USDC
                                      - USDT
                                required:
                                  - kind
                                  - network
                                  - address
                                  - asset
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - crypto
                                  networkScope:
                                    type: string
                                    enum:
                                      - evm
                                  acceptedNetworks:
                                    type: array
                                    minItems: 1
                                    items:
                                      type: string
                                      enum:
                                        - ethereum
                                        - base
                                        - arbitrum
                                        - optimism
                                        - polygon
                                        - bsc
                                        - avalanche
                                        - solana
                                        - tron
                                  address:
                                    type: string
                                    minLength: 1
                                  asset:
                                    type: string
                                    enum:
                                      - USDC
                                      - USDT
                                required:
                                  - kind
                                  - networkScope
                                  - acceptedNetworks
                                  - address
                                  - asset
                          destinationSummary:
                            type: string
                            minLength: 1
                          limits:
                            type: object
                            properties:
                              min:
                                type: string
                              max:
                                type: string
                              daily:
                                type: string
                          steps:
                            type: array
                            items:
                              type: string
                          routeStatus:
                            description: >-
                              The route status at read time. `inactive` means
                              the route was deactivated; do not share these
                              instructions.
                            type: string
                            enum:
                              - active
                              - inactive
                        required:
                          - title
                          - reference
                          - deposit
                          - destinationSummary
                          - steps
                      createdAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - counterpartyId
                      - customerId
                      - direction
                      - destination
                      - status
                      - instructions
                      - createdAt
        '400':
          description: 'The body is not `{ "enabled": boolean }`.'
        '403':
          description: >-
            The capability is not enabled for your account
            (`onramp_client_gate_not_available`) or no fresh second factor was
            presented from a console session (`step_up_required`).
        '404':
          description: No such payment route for this account.
        '409':
          description: >-
            The route is not an AUD-to-stablecoin route
            (`route_direction_unsupported`).
      security:
        - Bearer: []
        - ApiKey: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: Wayex API key
      description: 'Send the same Wayex API key as `Authorization: Bearer <key>`.'
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        A Wayex API key. Use a secret key (`sk_…`) — it works on every endpoint.
        Publishable keys (`pk_…`) are accepted only on a small set of read
        endpoints: `GET /v1/rates`, `GET /v1/activity`, `GET
        /v1/developer-fees`, `GET /v1/revenue`, and `GET /v1/reports/revenue`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.