> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all payment routes

> Returns all payment routes for the tenant, optionally filtered by team.

> **Deprecation Notice:** This endpoint was previously named `/v1/automations`. The old path remains available as a deprecated alias. Update your integrations to use `/v1/payment-routes`.



## OpenAPI

````yaml /openapi.json get /payment-routes
openapi: 3.0.3
info:
  title: Issuing API
  description: This is the specification for Rain's Issuing API.
  termsOfService: https://www.rain.xyz/legal/authorized-user-terms
  contact:
    email: support@rain.xyz
  version: 1.3.0
servers:
  - url: https://api-dev.rain.xyz/v1
    description: Sandbox server
  - url: https://api.rain.xyz/v1
    description: Production server
security: []
tags:
  - name: paymentRoutes
    description: >-
      **Endpoint Migration:** The `/v1/automations` endpoints have been renamed
      to `/v1/payment-routes`. The old `/v1/automations` paths remain available
      as deprecated aliases during migration. Update your integrations to use
      `/v1/payment-routes` as the deprecated endpoints will be removed in a
      future release.
  - name: simulate
    description: >-
      Transaction simulation endpoints for testing integration flows in
      non-production environments. These endpoints let you trigger transaction
      events programmatically to automate integration tests and verify webhook
      handling without depending on external systems or staging real deposits.
      **Sandbox only** — all simulation endpoints return `404 Not Found` in
      production.
  - name: raindrops
    description: >-
      Rewards and points management endpoints. Custom API keys need
      `raindrops:read`/`raindrops:write` for general rewards endpoints and
      `raindrops-travel:read`/`raindrops-travel:write` for travel redemption
      endpoints.
    x-group: rewards
paths:
  /payment-routes:
    get:
      tags:
        - paymentRoutes
      summary: Get all payment routes
      description: >-
        Returns all payment routes for the tenant, optionally filtered by team.


        > **Deprecation Notice:** This endpoint was previously named
        `/v1/automations`. The old path remains available as a deprecated alias.
        Update your integrations to use `/v1/payment-routes`.
      operationId: getAutomations
      parameters:
        - name: userId
          in: query
          description: >-
            Filter payment routes by user ID (at most one of userId or
            companyId)
          required: false
          schema:
            type: string
            format: uuid
        - name: companyId
          in: query
          description: >-
            Filter payment routes by company ID (at most one of userId or
            companyId)
          required: false
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/cursorParam'
        - $ref: '#/components/parameters/limitParam'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsListExample'
        '401':
          description: Invalid authorization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 401
                error: Unauthorized
                message: Invalid or missing API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 403
                error: ForbiddenError
                message: Forbidden
        '404':
          description: User or company not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 404
                error: NotFoundError
                message: User or company not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 500
                error: InternalServerError
                message: Internal server error
      security:
        - ApiKeyAuth: []
components:
  parameters:
    cursorParam:
      name: cursor
      in: query
      description: The id of the resource after which to start fetching
      required: false
      schema:
        type: string
    limitParam:
      name: limit
      in: query
      description: The number of resources to fetch
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
  schemas:
    AutomationsResponse:
      type: object
      properties:
        paymentRoutes:
          type: array
          items:
            $ref: '#/components/schemas/PaymentRoute'
          description: List of payment routes
        automations:
          type: array
          items:
            $ref: '#/components/schemas/Automation'
          deprecated: true
          description: >-
            Deprecated. Use `paymentRoutes` instead. This field returns
            identical data and will be removed in a future release.
    ErrorResponse:
      type: object
      required:
        - statusCode
        - error
      properties:
        statusCode:
          type: number
          description: Status code indicating the request failed
        error:
          type: string
          description: >-
            Error type name, e.g. 'NotFoundError', 'BadRequestError',
            'InternalServerError'
        message:
          type: string
          description: Human-readable error message describing what went wrong
    PaymentRoute:
      type: object
      required:
        - id
        - source
        - destination
        - status
        - depositAddress
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the payment route
        userId:
          type: string
          format: uuid
          description: User ID (present for individual teams; omit for company teams)
        companyId:
          type: string
          format: uuid
          description: Company ID (present for company teams; omit for individual teams)
        status:
          $ref: '#/components/schemas/PaymentRouteStatus'
        source:
          $ref: '#/components/schemas/AutomationSource'
        destination:
          $ref: '#/components/schemas/AutomationDestination'
        depositAddress:
          oneOf:
            - $ref: '#/components/schemas/AutomationFiatDepositAddress'
            - $ref: '#/components/schemas/AutomationOnchainDepositAddress'
          description: The deposit address for funds to be sent to this payment route
        refundAddress:
          type: string
          description: >-
            The onchain address where funds are returned if a transaction cannot
            be completed. Present when the source is a crypto rail.
        senderFees:
          type: array
          description: >-
            Array of sender fee configurations for this payment route. Present
            when sender fees are configured.
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - flat
                  - variable
                description: The type of fee
              amount:
                type: string
                description: The fee amount
        developerFees:
          type: array
          deprecated: true
          description: >-
            Deprecated: use `senderFees` instead. Returns the same values as
            `senderFees` for backward compatibility.
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - flat
                  - variable
                description: The type of fee
              amount:
                type: string
                description: The fee amount
        createdAt:
          type: string
          format: date-time
          description: When the payment route was created
        updatedAt:
          type: string
          format: date-time
          description: When the payment route was last updated
    Automation:
      type: object
      required:
        - id
        - source
        - destination
        - status
        - depositAddress
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the automation
        userId:
          type: string
          format: uuid
          description: User ID (present for individual teams; omit for company teams)
        companyId:
          type: string
          format: uuid
          description: Company ID (present for company teams; omit for individual teams)
        status:
          $ref: '#/components/schemas/AutomationStatus'
        source:
          $ref: '#/components/schemas/AutomationSource'
        destination:
          $ref: '#/components/schemas/AutomationDestination'
        depositAddress:
          oneOf:
            - $ref: '#/components/schemas/AutomationFiatDepositAddress'
            - $ref: '#/components/schemas/AutomationOnchainDepositAddress'
          description: The deposit address for funds to be sent to this automation
        refundAddress:
          type: string
          description: >-
            The onchain address where funds are returned if a transaction cannot
            be completed. Present when the source is a crypto rail.
        developerFees:
          type: array
          description: >-
            Array of developer fee configurations for this automation. Present
            when developer fees are configured.
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - flat
                  - variable
                description: The type of fee
              amount:
                type: string
                description: The fee amount
        createdAt:
          type: string
          format: date-time
          description: When the automation was created
        updatedAt:
          type: string
          format: date-time
          description: When the automation was last updated
    PaymentRouteStatus:
      type: string
      enum:
        - active
        - frozen
        - deleted
      description: Status of the payment route
    AutomationSource:
      oneOf:
        - title: Crypto Source
          type: object
          description: Crypto source configuration
          required:
            - currency
            - rail
          properties:
            currency:
              $ref: '#/components/schemas/AutomationCryptoCurrency'
            rail:
              $ref: '#/components/schemas/AutomationCryptoRail'
        - title: Fiat Source
          type: object
          description: Fiat source configuration
          required:
            - currency
            - rail
          properties:
            currency:
              $ref: '#/components/schemas/AutomationFiatCurrency'
            rail:
              $ref: '#/components/schemas/AutomationFiatRail'
    AutomationDestination:
      oneOf:
        - title: Onchain Destination
          type: object
          description: Onchain destination with direct address
          required:
            - currency
            - rail
            - address
          properties:
            currency:
              $ref: '#/components/schemas/AutomationCryptoCurrency'
            rail:
              $ref: '#/components/schemas/AutomationCryptoRail'
            address:
              $ref: '#/components/schemas/AutomationOnchainAddress'
        - title: Fiat Destination
          type: object
          description: Fiat destination via payment account
          required:
            - currency
            - rail
            - address
          properties:
            currency:
              $ref: '#/components/schemas/AutomationFiatCurrency'
            rail:
              $ref: '#/components/schemas/AutomationFiatRail'
            address:
              $ref: '#/components/schemas/AutomationPaymentAccountAddress'
            referenceId:
              type: string
              description: Optional reference ID for the fiat transfer
    AutomationFiatDepositAddress:
      title: Fiat Deposit Address
      type: object
      required:
        - type
        - beneficiaryName
        - beneficiaryAddress
        - beneficiaryBankName
        - beneficiaryBankAddress
        - accountNumber
        - routingNumber
      properties:
        type:
          type: string
          enum:
            - fiat
        beneficiaryName:
          type: string
          description: Name of the beneficiary
        beneficiaryAddress:
          type: string
          description: Address of the beneficiary
        beneficiaryBankName:
          type: string
          description: Name of the beneficiary's bank
        beneficiaryBankAddress:
          type: string
          description: Address of the beneficiary's bank
        accountNumber:
          type: string
          description: Bank account number
        routingNumber:
          type: string
          description: Bank routing number
        transferMessage:
          type: string
          description: Message to include with the transfer
    AutomationOnchainDepositAddress:
      title: Onchain Deposit Address
      type: object
      required:
        - type
        - address
      properties:
        type:
          type: string
          enum:
            - onchain
        address:
          type: string
          description: The blockchain deposit address
    AutomationStatus:
      type: string
      enum:
        - active
        - frozen
        - deleted
      description: Status of the automation
    AutomationCryptoCurrency:
      type: string
      enum:
        - usdc
        - rusd
      description: Supported cryptocurrencies
    AutomationCryptoRail:
      type: string
      enum:
        - ethereum
        - polygon
        - optimism
        - arbitrum
        - avalanche
        - base
        - celo
        - solana
      description: Supported blockchain networks for crypto operations
    AutomationFiatCurrency:
      type: string
      enum:
        - usd
      description: Supported fiat currencies
    AutomationFiatRail:
      type: string
      enum:
        - ach
        - wire
      description: Supported fiat payment rails
    AutomationOnchainAddress:
      type: object
      required:
        - type
        - address
      properties:
        type:
          type: string
          enum:
            - onchain
        address:
          type: string
          description: The blockchain address
    AutomationPaymentAccountAddress:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          enum:
            - paymentAccount
        id:
          type: string
          format: uuid
          description: The payment account ID
  examples:
    AutomationsListExample:
      value:
        paymentRoutes:
          - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
            userId: 11111111-1111-1111-1111-111111111111
            status: active
            source:
              currency: usd
              rail: ach
            destination:
              currency: usdc
              rail: base
              address:
                type: onchain
                address: '0x1234567890abcdef1234567890abcdef12345678'
            depositAddress:
              type: fiat
              beneficiaryName: RAIN PAYMENTS INC
              beneficiaryAddress: 123 Finance St, New York, NY 10001, US
              beneficiaryBankName: Partner Bank, N.A.
              beneficiaryBankAddress: 456 Bank Ave, New York, NY 10002, US
              accountNumber: '9876543210'
              routingNumber: '021000021'
              transferMessage: REF-A1B2C3D4
            createdAt: '2025-01-15T10:00:00Z'
            updatedAt: '2025-01-15T10:00:00Z'
        automations:
          - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
            userId: 11111111-1111-1111-1111-111111111111
            status: active
            source:
              currency: usd
              rail: ach
            destination:
              currency: usdc
              rail: base
              address:
                type: onchain
                address: '0x1234567890abcdef1234567890abcdef12345678'
            depositAddress:
              type: fiat
              beneficiaryName: RAIN PAYMENTS INC
              beneficiaryAddress: 123 Finance St, New York, NY 10001, US
              beneficiaryBankName: Partner Bank, N.A.
              beneficiaryBankAddress: 456 Bank Ave, New York, NY 10002, US
              accountNumber: '9876543210'
              routingNumber: '021000021'
              transferMessage: REF-A1B2C3D4
            createdAt: '2025-01-15T10:00:00Z'
            updatedAt: '2025-01-15T10:00:00Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Api-Key
      in: header

````