Skip to main content
Test the full ramp lifecycle in sandbox without moving real money or crypto. Sandbox uses the same API endpoints and SDK methods as production — the only sandbox-specific calls are simulate-* endpoints that trigger transaction lifecycle progression.

What’s Real vs. Simulated

OperationSandbox Behavior
KYB startReal KYB customer created in sandbox
KYB approve/rejectSimulated — instant approval or rejection
Create on-ramp accountReal provisioning — returns real-looking bank details
Create off-ramp accountReal provisioning — returns real crypto deposit address
Create recipientReal provisioning — returns real recipient ID
Simulate transactionSimulated locally — creates DB record, progresses statuses, fires webhooks
List/get transactionsReal queries against sandbox DB
Webhook deliveryReal webhooks to your configured URL
Actual bank transferDoes not happen
Actual crypto transferDoes not happen

Prerequisites

Step 1: KYB Approval

Start KYB for your organization, then instantly approve it using the simulation endpoint.
# Start KYB
curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/org/kyb/start" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx"

# Simulate approval (sandbox only)
curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/org/kyb/simulate-approve" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx"
You can also simulate a KYB rejection:
curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/org/kyb/simulate-reject" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx"

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.
# On-ramp account (USD → USDC)
curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/org/onramp-accounts" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"destinationAsset": "USDC", "orgWalletId": 1}'

# Off-ramp account (USDC → USD)
curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/org/offramp-accounts" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "org_wallet_id": 1,
    "source_asset": "USDC",
    "rail": "ach",
    "bank_details": {
      "routing_number": "021000021",
      "account_number": "987654321",
      "account_type": "checking",
      "account_holder_name": "Acme Corp",
      "bank_name": "Chase Bank"
    }
  }'

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

curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/org/simulate-transaction" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"scenario": "success", "usd_amount": 10000}'
Response:
{
  "success": true,
  "data": {
    "simulation_id": "sim_a1b2c3d4e5f6",
    "state": "accepted"
  }
}

Off-Ramp Simulation

curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/org/simulate-offramp-transaction" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"scenario": "success", "usd_amount": 25000}'

Simulation Scenarios

Choose a scenario to control which lifecycle path the transaction follows.

On-Ramp Scenarios

ScenarioStatus ProgressionWebhook
successpending → processing → in_progress → awaiting_confirmation → broadcasted → completedtransaction.completed
failedpending → processing → failedtransaction.failed
rejectedpending → rejectedtransaction.failed
reversedpending → … → completed → reversedtransaction.completed then transaction.failed

Off-Ramp Scenarios

ScenarioStatus ProgressionWebhook
successpending → processing → in_progress → awaiting_confirmation → broadcasted → completedofframp_transaction.completed
failedpending → processing → failedofframp_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:
FieldTypeDefaultDescription
scenario"success" | "failed" | "rejected" | "reversed""success"Lifecycle path to simulate
usd_amountnumber50000USD amount for the transaction
onramp_account_idnumberfirst accountTarget a specific on-ramp account
Off-ramp simulation:
FieldTypeDefaultDescription
scenario"success" | "failed""success"Lifecycle path to simulate
usd_amountnumber50000USD amount for the transaction
offramp_account_idnumberfirst accountTarget 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.
# Poll transaction status
curl "https://sandbox-api.rebelfi.io/v1/ramp/org/transactions" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx"
Use webhook.site to quickly stand up a test endpoint and inspect incoming webhook payloads.
See Webhooks for the full event reference. The reversed scenario fires transaction.completed first, then transaction.failed with error "reversed".

Fee Calculation

Simulated transactions use fixed fee rates:
ComponentRate
Developer fee5 bps
Platform fee15 bps
Total fee20 bps
Example — $10,000 transaction:
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:
# Simulate on-ramp for a specific recipient
curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/recipients/1/simulate-transaction" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"scenario": "success", "usd_amount": 10000}'

# Simulate off-ramp for a specific recipient
curl -X POST "https://sandbox-api.rebelfi.io/v1/ramp/recipients/1/simulate-offramp-transaction" \
  -H "x-api-key: rfk_sandbox_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"scenario": "success", "usd_amount": 25000}'

Simulation Endpoints Reference

Org-Level

MethodPathPurpose
POST/v1/ramp/org/kyb/simulate-approveApprove KYB instantly
POST/v1/ramp/org/kyb/simulate-rejectReject KYB instantly
POST/v1/ramp/org/simulate-transactionSimulate on-ramp transaction
POST/v1/ramp/org/simulate-offramp-transactionSimulate off-ramp transaction

Recipient-Level

MethodPathPurpose
POST/v1/ramp/recipients/{id}/simulate-transactionSimulate on-ramp for recipient
POST/v1/ramp/recipients/{id}/simulate-offramp-transactionSimulate off-ramp for recipient
Simulation endpoints are only available in the sandbox environment. Calling them in production returns a 400 error.

Testing Checklist

Use this checklist to validate your integration covers all scenarios:
  • Start KYB and receive KYB URL
  • Simulate KYB approval and verify customer.approved webhook
  • Simulate KYB rejection and verify customer.declined webhook
  • Verify your app handles both approval and rejection gracefully
  • Create on-ramp account and store bank details
  • Simulate success scenario — verify transaction.completed webhook and amounts
  • Simulate failed scenario — verify transaction.failed webhook and error handling
  • Simulate rejected scenario — verify your app handles rejections
  • Simulate reversed scenario — verify your app handles both completed and reversed events
  • Verify transaction appears in transaction list
  • Create off-ramp account with bank details
  • Simulate success scenario — verify offramp_transaction.completed webhook
  • Simulate failed scenario — verify offramp_transaction.failed webhook
  • Verify transaction appears in off-ramp transaction list
  • Call simulate endpoints before KYB approval — verify 400 error
  • Attempt to simulate with an invalid recipient ID — verify 404 error
  • Verify fee math matches expected values for your transaction amounts

Next Steps

Webhooks

Full webhook event reference

Quick Start

Production integration guide