On/Off Ramps
A ramp moves value between fiat and USDC for one of your wallets:
- On-ramp (
direction: "on"): your Safe is credited with USDC. In the sandbox the fiat debit is simulated and the credit comes from the platform's test-USDC pool — it completes immediately. - Off-ramp (
direction: "off"): a debit from your Safe toward fiat. This rides the normal propose-only payment rails: the API proposes the transfer to the platform's liquidation address, your owners sign it, and the (simulated) fiat payout confirms once the payment executes.
The provider field selects the rail. Only simulated is live today;
privy, stripe, visa, and ousd are recognized and return
RAMP_PROVIDER_NOT_AVAILABLE until their adapters ship behind the same
interface. Ramps are sandbox-only for now.
On-ramp
- curl
- TypeScript
- CLI
curl -X POST https://api.sandbox.safebank.ai/v1/ramps \
-H "X-SafeBank-Api-Key: $SAFEBANK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "walletId": "w_1a2b3c", "direction": "on", "amount": "100.00" }'
const ramp = await sb.ramps.create({ walletId: 'w_1a2b3c', direction: 'on', amount: '100.00' })
console.log(ramp.status, ramp.txHash) // CONFIRMED 0x…
sb ramp on w_1a2b3c --amount 100
Sandbox on-ramps are capped per transaction and per tenant per 24 h
(RAMP_AMOUNT_TOO_LARGE / RAMP_DAILY_CAP).
Off-ramp
- curl
- TypeScript
- CLI
curl -X POST https://api.sandbox.safebank.ai/v1/ramps \
-H "X-SafeBank-Api-Key: $SAFEBANK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "walletId": "w_1a2b3c", "direction": "off", "amount": "50.00" }'
# → status SUBMITTED, paymentId pay_… — sign that payment to release the funds
const ramp = await sb.ramps.create({ walletId: 'w_1a2b3c', direction: 'off', amount: '50.00' })
// sign ramp.paymentId via the payments API; the fiat leg confirms on execution
sb ramp off w_1a2b3c --amount 50 --sign # --sign completes it with your demo signer
An off-ramp stays SUBMITTED until its linked payment executes; then it
flips to CONFIRMED with a simulated fiatRef. If the payment is
cancelled or fails, the ramp is marked FAILED. The platform never signs
your Safe transactions — an off-ramp cannot move funds without your
owners.
Key endpoints
| Method | Path | Scope |
|---|---|---|
POST | /v1/ramps | ramps:write |
GET | /v1/ramps | ramps:read |
GET | /v1/ramps/{id} | ramps:read |
See the REST reference for full request/response schemas.