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

# Simulate a payment route

> Triggers a transfer transaction against a configured payment route, exactly as if a real deposit had triggered it. Use this to test the transfer and webhook lifecycle end-to-end.

Supported payment route types:
- **MXN payment routes** — Both onramps (SPEI → crypto) and offramps (crypto → SPEI)
- **USD payment routes** — Both onramps (ACH/wire → crypto) and offramps (crypto → ACH/wire)

**Sandbox only.** This endpoint returns `404 Not Found` in production environments.



## OpenAPI

````yaml /openapi.json post /simulate/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:
  /simulate/payment-routes:
    post:
      tags:
        - simulate
      summary: Simulate a payment route
      description: >-
        Triggers a transfer transaction against a configured payment route,
        exactly as if a real deposit had triggered it. Use this to test the
        transfer and webhook lifecycle end-to-end.


        Supported payment route types:

        - **MXN payment routes** — Both onramps (SPEI → crypto) and offramps
        (crypto → SPEI)

        - **USD payment routes** — Both onramps (ACH/wire → crypto) and offramps
        (crypto → ACH/wire)


        **Sandbox only.** This endpoint returns `404 Not Found` in production
        environments.
      operationId: simulatePaymentRoute
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Optional idempotency/correlation key (1-64 chars). If omitted, each
            call produces a new simulation.
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 64
      requestBody:
        description: Payment route simulation request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulatePaymentRouteRequest'
        required: true
      responses:
        '200':
          description: MXN payment route simulation completed synchronously
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatePaymentRouteSyncResponse'
        '202':
          description: USD payment route simulation accepted for asynchronous processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatePaymentRouteAsyncResponse'
        '400':
          description: Invalid body — missing required fields or malformed amount
        '404':
          description: >-
            Endpoint not available in production, or the paymentRouteId doesn't
            exist or belong to your tenant
        '422':
          description: >-
            The payment route exists but is not eligible for simulation
            (unsupported flow type or missing required configuration)
        '500':
          description: Unhandled error during simulation
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SimulatePaymentRouteRequest:
      type: object
      required:
        - paymentRouteId
        - amount
      properties:
        paymentRouteId:
          type: string
          format: uuid
          description: >-
            The Rain payment route ID to simulate. Must belong to the calling
            tenant.
        amount:
          type: string
          pattern: ^[0-9]+(\.[0-9]+)?$
          description: >-
            The source-currency amount to simulate, as a positive decimal string
            in major units (for example, 100 or 1500.50).
    SimulatePaymentRouteSyncResponse:
      type: object
      required:
        - transactionId
      properties:
        transactionId:
          type: string
          format: uuid
          description: >-
            The transaction ID. Call GET /v1/transactions/:transactionId to
            fetch full details and current status.
    SimulatePaymentRouteAsyncResponse:
      type: object
      required:
        - simulationId
        - flow
        - status
        - provider
      properties:
        simulationId:
          type: string
          description: Identifier for tracking the simulation.
        flow:
          type: string
          enum:
            - usd_onramp
            - usd_offramp
          description: The simulation flow type.
        status:
          type: string
          enum:
            - accepted
          description: Always accepted for successful submissions.
        provider:
          type: object
          description: Provider-specific identifiers for the simulated deposits.
          properties:
            accountProviderDepositId:
              type: string
              description: >-
                The account provider's deposit identifier. Present only for
                onramp flows.
            minterDepositId:
              type: string
              description: The minter's deposit identifier. Present only for offramp flows.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Api-Key
      in: header

````