Beta FeatureThe Transaction Simulations feature is currently in beta. API endpoints and behavior may change as we continue to refine the product. Simulation endpoints are available in development environments only β production returns 404 Not Found.
Transaction simulation allows you to test your integration against Rainβs APIs without processing real transactions. Simulations create real transaction records, trigger webhooks, and update balances β all without moving actual funds.
Use simulation to:
- Verify webhook handling for each transaction type
- Test decline scenarios and error handling
- Validate end-to-end flows before going live
Available simulations
Rain provides simulation endpoints for the complete card transaction lifecycle, plus collateral funding and payment route transfers.
Card authorization lifecycle
3DS authentication
Collateral and transfers
Getting started
-
Get sandbox access. Simulation endpoints are only available in the sandbox environment.
-
Create test cards. You need at least one active card to simulate card transactions. Use the Create a card endpoint to issue cards in sandbox.
-
Fund collateral. For Rain-Managed programs fund the userβs collateral contract; for Partner-Managed programs fund your programβs contract. Unfunded contracts decline simulated authorizations with
account_credit_limit_exceeded.
-
Configure webhooks. Set up a webhook endpoint to receive transaction events. Simulations fire the same webhooks as real transactions.
-
Simulate a transaction. Start with a card authorization to see the full flow.
Common patterns
Testing the full authorization lifecycle
Testing decline scenarios
Use the declineReason parameter to simulate declined authorizations:
See Card authorizations for the full list of supported decline reasons.