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

# List rails

> List rails supported by on-ramp and off-ramp orders.

**List rails** returns the rails supported by each ramp type (`on-ramp` and `off-ramp`), or by the given `rampType` only, using the same filters (`type`, `network`, `method` and `asset`) as [List rails](https://developer.uphold.com/rest-apis/core-api/assets/list-rails.md) in the Core API.
Each rail has the same schema as in the Core API, plus its `rampType`.
The `features` field indicates whether a rail can be used as the order origin (`deposit`) or destination (`withdraw`):

| Ramp type | `deposit` (origin) | `withdraw` (destination) |
| - | - | - |
| `on-ramp` | `credit-card`, `debit-card`, `apple-pay`, `google-pay`, `paypal` | `crypto-transaction` |
| `off-ramp` | `crypto-transaction` | `debit-card` |

It needs no specific scope. If the [subject](https://developer.uphold.com/rest-apis/authentication.md#subjects) calling the endpoint is a user, the response will be contextualized accordingly.
Each ramp type only lists rails with a method it supports, so filtering by any other method (e.g. `credit-card` for `off-ramp`) returns no rails for that ramp type.
A listed rail that your organization or the user can't use for that ramp type is returned with empty `features`.

## Why not use the Core API rails

[List rails](https://developer.uphold.com/rest-apis/core-api/assets/list-rails.md) in the Core API returns the rails for Core transactions, which move funds into and out of the accounts of a user. Its `features` don't tell you what an order can do, because:

* **The rails of each ramp type are enabled separately.** Your organization's rails for on-ramp and off-ramp orders are configured independently of its Core API rails, and of each other. A rail can be available for orders but not for Core transactions, or the other way around.
* **An order uses each rail in one direction only.** For example, a Core crypto rail can have both `deposit` and `withdraw`, but an on-ramp order only withdraws to it, and an off-ramp order only deposits from it. Off-ramp orders only pay out to debit cards.
* **Rails that orders don't support are left out.** Methods no ramp type uses, such as `bank-transfer`, are never returned.

Use this endpoint, not the Core one, to decide which payment methods, assets and networks to offer for an order.


## OpenAPI

````yaml _media/specs/on-off-ramp-openapi.mintlify.json get /on-off-ramp/rails
openapi: 3.1.0
info:
  version: 0.1.0
  title: On & Off Ramp API
  description: >-
    The On & Off Ramp API offers a set of endpoints to move value between fiat
    and crypto through a single atomic order per direction: on-ramp or off-ramp.
  contact:
    name: Uphold API Team
    email: developer@uphold.com
    url: https://developer.uphold.com
servers:
  - url: https://api.enterprise.sandbox.uphold.com
    description: Sandbox
  - url: https://api.enterprise.uphold.com
    description: Production
security:
  - OAuth2: []
tags:
  - name: Orders
    description: On & Off Ramp orders.
  - name: Metadata
    description: Metadata.
  - name: Rails
    description: On & Off Ramp rails.
paths:
  /on-off-ramp/rails:
    get:
      tags:
        - Rails
      summary: List rails
      description: List rails supported by on-ramp and off-ramp orders.
      operationId: on-off-ramp.list-rails
      parameters:
        - $ref: '#/components/parameters/list-rails-ramp-type-filter'
        - $ref: '#/components/parameters/list-rails-type-filter'
        - $ref: '#/components/parameters/list-rails-network-code-filter'
        - $ref: '#/components/parameters/list-rails-method-filter'
        - $ref: '#/components/parameters/list-rails-asset-code-filter'
      responses:
        '200':
          $ref: '#/components/responses/list-rails-response'
components:
  parameters:
    list-rails-ramp-type-filter:
      name: rampType
      description: >-
        Filter rails by ramp type. Without it, the rails of every ramp type are
        listed.
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/order-type'
      examples:
        On-ramp:
          value: on-ramp
        Off-ramp:
          value: off-ramp
    list-rails-type-filter:
      name: type
      description: Filter rails by type.
      in: query
      explode: false
      required: false
      schema:
        type: array
        maxItems: 25
        uniqueItems: true
        items:
          $ref: '#/components/schemas/rail-type'
      examples:
        Crypto Rail Type:
          value:
            - crypto
    list-rails-network-code-filter:
      name: network
      description: Filter rails by network code.
      in: query
      explode: false
      required: false
      schema:
        type: array
        maxItems: 25
        uniqueItems: true
        items:
          type: string
          minLength: 1
      examples:
        Bitcoin Network:
          value:
            - bitcoin
    list-rails-method-filter:
      name: method
      description: Filter rails by method.
      in: query
      style: form
      explode: false
      required: false
      schema:
        type: array
        maxItems: 25
        uniqueItems: true
        items:
          $ref: '#/components/schemas/rail-method'
      examples:
        Debit Card Method:
          value:
            - debit-card
    list-rails-asset-code-filter:
      name: asset
      description: Filter rails by asset code.
      in: query
      style: form
      explode: false
      required: false
      schema:
        type: array
        maxItems: 100
        uniqueItems: true
        items:
          type: string
          minLength: 1
      examples:
        BTC Asset:
          value:
            - BTC
  responses:
    list-rails-response:
      description: Rails retrieved.
      content:
        application/json:
          schema:
            type: object
            properties:
              rails:
                type: array
                items:
                  allOf:
                    - type: object
                      properties:
                        rampType:
                          allOf:
                            - $ref: '#/components/schemas/order-type'
                            - description: The ramp type the rail is listed for.
                      required:
                        - rampType
                    - $ref: '#/components/schemas/rail'
          examples:
            On-ramp Rails Retrieved:
              value:
                rails:
                  - rampType: on-ramp
                    type: crypto
                    network: bitcoin
                    method: crypto-transaction
                    asset: BTC
                    decimals: 8
                    features:
                      - withdraw
                  - rampType: on-ramp
                    type: card
                    network: visa
                    method: debit-card
                    asset: USD
                    decimals: 2
                    features:
                      - deposit
                  - rampType: on-ramp
                    type: apm
                    network: paypal
                    method: paypal
                    asset: USD
                    decimals: 2
                    features:
                      - deposit
            Off-ramp Rails Retrieved:
              value:
                rails:
                  - rampType: off-ramp
                    type: crypto
                    network: bitcoin
                    method: crypto-transaction
                    asset: BTC
                    decimals: 8
                    features:
                      - deposit
                  - rampType: off-ramp
                    type: card
                    network: visa
                    method: debit-card
                    asset: USD
                    decimals: 2
                    features:
                      - withdraw
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
          examples:
            Request ID:
              value: a4e390583b3ac581-MRS
  schemas:
    order-type:
      description: >-
        Whether the order is an on-ramp (fiat to crypto) or off-ramp (crypto to
        fiat) order.
      type: string
      enum:
        - on-ramp
        - off-ramp
    rail-type:
      type: string
      enum:
        - crypto
        - card
        - bank
        - apm
    rail-method:
      type: string
      enum:
        - crypto-transaction
        - credit-card
        - debit-card
        - bank-transfer
        - apple-pay
        - google-pay
        - paypal
        - venmo
    rail:
      type: object
      discriminator:
        propertyName: type
        mapping:
          crypto: '#/components/schemas/rail-crypto'
          card: '#/components/schemas/rail-card'
          bank: '#/components/schemas/rail-bank'
          apm: '#/components/schemas/rail-apm'
      oneOf:
        - $ref: '#/components/schemas/rail-crypto'
          title: Crypto
        - $ref: '#/components/schemas/rail-card'
          title: Card
        - $ref: '#/components/schemas/rail-bank'
          title: Bank
        - $ref: '#/components/schemas/rail-apm'
          title: Alternative payment method
    rail-crypto:
      type: object
      allOf:
        - $ref: '#/components/schemas/rail-base'
        - type: object
          properties:
            type:
              enum:
                - crypto
            method:
              enum:
                - crypto-transaction
            contractAddress:
              description: The contract address for the asset within the network.
              type: string
    rail-card:
      type: object
      allOf:
        - $ref: '#/components/schemas/rail-base'
        - type: object
          properties:
            type:
              enum:
                - card
            method:
              enum:
                - credit-card
                - debit-card
    rail-bank:
      type: object
      allOf:
        - $ref: '#/components/schemas/rail-base'
        - type: object
          properties:
            type:
              enum:
                - bank
            method:
              enum:
                - bank-transfer
            constraints:
              description: The constraints for the rail.
              type: array
              items:
                $ref: '#/components/schemas/rail-bank-constraint'
    rail-apm:
      type: object
      allOf:
        - $ref: '#/components/schemas/rail-base'
        - type: object
          properties:
            type:
              enum:
                - apm
            method:
              enum:
                - apple-pay
                - google-pay
                - paypal
                - venmo
    rail-base:
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/rail-type'
            - description: The type of the rail.
        network:
          description: The network code of the rail.
          type: string
        method:
          allOf:
            - $ref: '#/components/schemas/rail-method'
            - description: >-
                The method through which operations are carried over the
                network.
        asset:
          description: The asset code of the rail.
          type: string
        decimals:
          description: The number of decimal places for the asset within the network.
          type: integer
          minimum: 0
        features:
          description: The features of the asset within the network.
          type: array
          items:
            type: string
            enum:
              - withdraw
              - deposit
      required:
        - type
        - network
        - method
        - asset
        - decimals
        - features
    rail-bank-constraint:
      oneOf:
        - $ref: '#/components/schemas/rail-bank-constraint-allowed-deposit-accounts'
      discriminator:
        propertyName: rule
        mapping:
          allowed-deposit-accounts: '#/components/schemas/rail-bank-constraint-allowed-deposit-accounts'
    rail-bank-constraint-allowed-deposit-accounts:
      type: object
      properties:
        rule:
          type: string
          enum:
            - allowed-deposit-accounts
        allowed:
          type: string
          enum:
            - default-only
      required:
        - rule
        - allowed
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication
      flows:
        clientCredentials:
          tokenUrl: /core/oauth2/token
          scopes:
            on-off-ramp.orders:create: Grants access to create orders.
            on-off-ramp.orders:read: Grants access to view orders.
            on-off-ramp.orders.metadata:read: Grants access to view orders metadata.
            on-off-ramp.orders.metadata:write: Grants access to modify orders metadata.
            on-off-ramp.orders.quotes:create: Grants access to create order quotes.

````