simulate-* endpoints that trigger transaction lifecycle progression.
What’s Real vs. Simulated
| Operation | Sandbox Behavior |
|---|---|
| KYB start | Real KYB customer created in sandbox |
| KYB approve/reject | Simulated — instant approval or rejection |
| Create on-ramp account | Real provisioning — returns real-looking bank details |
| Create off-ramp account | Real provisioning — returns real crypto deposit address |
| Create recipient | Real provisioning — returns real recipient ID |
| Simulate transaction | Simulated locally — creates DB record, progresses statuses, fires webhooks |
| List/get transactions | Real queries against sandbox DB |
| Webhook delivery | Real webhooks to your configured URL |
| Actual bank transfer | Does not happen |
| Actual crypto transfer | Does not happen |
Prerequisites
- Sandbox API key (
rfk_sandbox_*) — see Sandbox Environment - Webhook endpoint configured in dashboard (or use webhook.site for testing)
Step 1: KYB Approval
Start KYB for your organization, then instantly approve it using the simulation endpoint.Step 2: Create Ramp Accounts
After KYB approval, create on-ramp and off-ramp accounts. These are provisioned through the sandbox banking infrastructure and return real-looking account details.Step 3: Simulate Transactions
Trigger transaction lifecycle simulation with a chosen scenario. The API responds immediately — the transaction progresses through statuses asynchronously in the background (~1.5s per step).On-Ramp Simulation
Off-Ramp Simulation
Simulation Scenarios
Choose ascenario to control which lifecycle path the transaction follows.
On-Ramp Scenarios
| Scenario | Status Progression | Webhook |
|---|---|---|
success | pending → processing → in_progress → awaiting_confirmation → broadcasted → completed | transaction.completed |
failed | pending → processing → failed | transaction.failed |
rejected | pending → rejected | transaction.failed |
reversed | pending → … → completed → reversed | transaction.completed then transaction.failed |
Off-Ramp Scenarios
| Scenario | Status Progression | Webhook |
|---|---|---|
success | pending → processing → in_progress → awaiting_confirmation → broadcasted → completed | offramp_transaction.completed |
failed | pending → processing → failed | offramp_transaction.failed |
Each status transition takes ~1.5 seconds. A full
success scenario completes in ~7.5 seconds. The reversed scenario takes ~10.5 seconds.Request Parameters
On-ramp simulation:| Field | Type | Default | Description |
|---|---|---|---|
scenario | "success" | "failed" | "rejected" | "reversed" | "success" | Lifecycle path to simulate |
usd_amount | number | 50000 | USD amount for the transaction |
onramp_account_id | number | first account | Target a specific on-ramp account |
| Field | Type | Default | Description |
|---|---|---|---|
scenario | "success" | "failed" | "success" | Lifecycle path to simulate |
usd_amount | number | 50000 | USD amount for the transaction |
offramp_account_id | number | first account | Target a specific off-ramp account |
Step 4: Verify via Webhooks or Polling
When a simulated transaction reaches a terminal state, RebelFi fires the same webhook events as production to your configured endpoint.reversed scenario fires transaction.completed first, then transaction.failed with error "reversed".
Fee Calculation
Simulated transactions use fixed fee rates:| Component | Rate |
|---|---|
| Developer fee | 5 bps |
| Platform fee | 15 bps |
| Total fee | 20 bps |
| Amount | |
|---|---|
| Amount in | $10,000.00 |
| Total fee | $20.00 |
| Delivered | $9,980.00 |
Recipient-Level Simulation
You can also simulate transactions at the recipient level:Simulation Endpoints Reference
Org-Level
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/ramp/org/kyb/simulate-approve | Approve KYB instantly |
| POST | /v1/ramp/org/kyb/simulate-reject | Reject KYB instantly |
| POST | /v1/ramp/org/simulate-transaction | Simulate on-ramp transaction |
| POST | /v1/ramp/org/simulate-offramp-transaction | Simulate off-ramp transaction |
Recipient-Level
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/ramp/recipients/{id}/simulate-transaction | Simulate on-ramp for recipient |
| POST | /v1/ramp/recipients/{id}/simulate-offramp-transaction | Simulate off-ramp for recipient |
Testing Checklist
Use this checklist to validate your integration covers all scenarios:KYB Flow
KYB Flow
- Start KYB and receive KYB URL
- Simulate KYB approval and verify
customer.approvedwebhook - Simulate KYB rejection and verify
customer.declinedwebhook - Verify your app handles both approval and rejection gracefully
On-Ramp
On-Ramp
- Create on-ramp account and store bank details
- Simulate
successscenario — verifytransaction.completedwebhook and amounts - Simulate
failedscenario — verifytransaction.failedwebhook and error handling - Simulate
rejectedscenario — verify your app handles rejections - Simulate
reversedscenario — verify your app handles both completed and reversed events - Verify transaction appears in transaction list
Off-Ramp
Off-Ramp
- Create off-ramp account with bank details
- Simulate
successscenario — verifyofframp_transaction.completedwebhook - Simulate
failedscenario — verifyofframp_transaction.failedwebhook - Verify transaction appears in off-ramp transaction list
Edge Cases
Edge Cases
- Call simulate endpoints before KYB approval — verify
400error - Attempt to simulate with an invalid recipient ID — verify
404error - Verify fee math matches expected values for your transaction amounts
Next Steps
Webhooks
Full webhook event reference
Quick Start
Production integration guide