# Payment Rails

Use account rails correctly across deposits, conversions, and withdrawals.

Product: Direct Trade API
Guides follow API reference 0.1.0 and event reference 0.1.0.
Canonical page: https://docs.axiym.io/direct-trade-api/integration-guide/fundamentals/payment-rails

A payment rail is the bank channel or blockchain network associated with an
Axiym account or external payment.

The Axiym account response exposes a `paymentRails` code such as `ZENUS_BANK`
or `TRON`. This value describes the account's rail. It is informational for
request construction: you do not submit `paymentRails` when creating a
conversion or withdrawal.

## Use the operation-specific details

| Workflow                     | What to use                                                                                                                                              |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Register an external account | Supply the owned bank-account details, or the wallet currency, address, and network.                                                                     |
| Deposit funds                | Send from the active registered external account using deposit instructions retrieved for the receiving Axiym account.                                   |
| Convert funds                | Select a `pairId`. The pair exposes the sell and buy currencies and payment rails; its identifier resolves the corresponding Axiym accounts server-side. |
| Withdraw funds               | Select an active registered external account whose currency matches the source Axiym account, then pass its `destinationId`.                             |

Do not construct bank details or wallet addresses from `paymentRails`. Always
use the registered external account and operation-specific details returned by
the API.

For wallet operations, also read
[Blockchain networks](/trade-api/integration-guide/fundamentals/blockchain-networks).

## Sandbox rail behavior

| Rail       | Sandbox behavior                                                                                                                             |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Bank       | Uses the Axiym-provided simulation process and registered external-account fixtures. No real bank payment should be sent to or from sandbox. |
| Blockchain | Uses the test network and test asset configured for the sandbox account. Never substitute a production network or asset.                     |

Conversions move balances between sandbox Axiym accounts but do not themselves
send a bank or blockchain payment.

## Bank and wallet outcomes

Bank and blockchain rails expose different reconciliation data:

* bank operations can include Axiym payment codes and bank-reported reasons;
* wallet operations include a network and can include `transactionHash` after
  completion; and
* both appear as balance movements on the relevant account statement.

The [Add to the address book](/trade-api/integration-guide/add-to-address-book),
[Deposit funds](/trade-api/integration-guide/deposit-funds), and
[Withdraw funds](/trade-api/integration-guide/withdraw-funds) guides show how
to use rail-specific details without hard-coding rail logic into unrelated
requests.
