Skip to main content
Simulation endpoints are available in development environments only β€” production returns 404 Not Found.
Trigger 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.

Prerequisites

Before you can simulate a payment route, you must create a payment route in the sandbox environment. The payment route creation endpoint is separate from the simulation endpoint. For onramps (fiat β†’ crypto), create a payment route:
For offramps (crypto β†’ fiat), first create a payment account, then create a payment route:
The response includes the id field β€” this is your paymentRouteId to use in simulation requests. See the Onramps and Offramps documentation for complete details on creating payment routes.

Endpoint

The /v1/simulate/automations endpoint has been renamed to /v1/simulate/payment-routes. The old path remains available as a deprecated alias during migration. Update your integrations to use /v1/simulate/payment-routes as the deprecated endpoint will be removed in a future release.
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)
Simulating any other payment route type returns 422 Unprocessable Entity.

Supported chains

Payment routes can only be created on the following testnet chains in the sandbox environment:
  • Ethereum Sepolia
  • Avalanche Fuji
  • Solana Devnet
  • Polygon Amoy
  • Base Sepolia
Once you have a payment route on a supported chain, you can simulate transfers against it.

Amount limits

Simulations accept at most $100 USD per call. For non-USD routes, Rain converts the amount to USD before checking the limit. Larger amounts return 400 with Amount must be at most $100.00 USD. Onramp and offramp simulations require a minimum amount of $2 in the route’s source currency to move funds (for example, 2 MXN on an MXN route). On every route type, smaller amounts only trigger the micro-deposit webhook, create no transfer, and return 202 with { "success": true }.

Headers

Body

Example request

Response

The response format depends on the payment route type.

MXN payment routes (synchronous)

MXN payment route simulations of 2 MXN or more return immediately with the transaction ID:
200 OK
The transaction starts in pending and progresses asynchronously, just like one triggered by a real deposit. Your webhook URL receives the same transactionTransfer webhooks as a real transfer:
  • action created β€” sent when the transfer is initiated.
  • action updated β€” sent on intermediate status changes (for example, awaiting_transfer β†’ processing).
  • action completed β€” sent when the transfer settles.
See Webhooks for payload schemas.

USD payment routes (asynchronous)

USD payment route simulations return HTTP 202 to indicate the request was accepted and the simulation is processing asynchronously:
202 Accepted
The response carries no transaction ID. For amounts of 2 USD or more, find the transfer by calling GET /v1/issuing/transactions?type=transfer filtered by userId once the webhooks arrive.
USD simulations trigger real webhook callbacks asynchronously. Your webhook URL receives transactionTransfer webhooks as the simulation progresses through the transfer lifecycle.

Errors

Behavior notes

  • No real funds move. Simulations are fully mocked end-to-end β€” you don’t need to pre-fund anything.
  • MXN simulations create immediate transaction records. The transaction is queryable via the transactions API and fires webhooks as it progresses.
  • USD simulations process asynchronously. The 202 response indicates the simulation request was accepted. Webhooks fire as the underlying providers process the simulated deposits.

Example