Bridge Integration
Bridge is the fiat rail inside Remlo. All Bridge calls go throughlib/bridge.ts or server route handlers. Client components never call Bridge directly.
Runtime model
| Property | Value |
|---|---|
| Production base URL | https://api.bridge.xyz/v0 |
| Sandbox base URL | https://api.sandbox.bridge.xyz/v0 |
| Auth header | Api-Key: <BRIDGE_API_KEY> |
| Idempotency | Idempotency-Key on write requests |
| Verification | Canonical x-webhook-signature header, with legacy bridge-signature accepted for compatibility |
Route mapping
| Remlo route | Bridge operation | Purpose |
|---|---|---|
POST /api/employees/[id]/kyc | POST /customers, POST /kyc_links | Create employee Bridge customer and return a KYC URL |
GET /api/employers/[id]/treasury | No direct Bridge call on read path | Surface treasury state after deposits are accounted for in Remlo |
Reserved in master: POST /api/employers/[id]/treasury | POST /customers/{id}/virtual_accounts | Create a deposit account for employer funding |
GET/POST /api/employees/[id]/card | POST /customers/{id}/card_accounts | Read card status or issue a Visa prepaid debit card |
POST /api/employees/[id]/offramp | POST /transfers | Push payroll balance to ACH, SEPA, SPEI, or PIX from the employee portal |
POST /api/mpp/bridge/offramp | POST /transfers | Machine-paid off-ramp route for agents and external callers |
POST /api/webhooks/bridge | Incoming Bridge webhook | Update KYC and transfer state inside Supabase |
Canonical webhook families
transfer.payment_processedcard_transaction.createdcustomer.updated
transfer.state_changedcard.transactionkyc.status_updated
Supported money paths in current code
- Employee KYC links
- Employee Bridge customer creation
- Employee card issuance
- Employee off-ramp transfers from Bridge wallet balance to bank rails
- Machine-paid off-ramp via the MPP route