API Reference
Full endpoint documentation.
Base URL: https://api.mainstreetspine.com/v1
Authentication
All API requests require a bearer token in the Authorization header.
Authorization: Bearer sk_live_••••••••••••••••
Virtual Accounts
POST /virtual-accounts
Create a new virtual account for an SMB entity on your platform.
{
"platform_id": "string",
"entity_ref": "string",
"type": "checking | savings",
"metadata": "object (optional)"
}GET /virtual-accounts/:id
Retrieve a virtual account and its current balance.
GET /virtual-accounts/:id/transactions
List all transactions for a virtual account. Supports cursor-based pagination.
Payments
POST /payments
Initiate a payment from a virtual account. Supports ACH standard, ACH same-day, RTP, and FedNow.
{
"virtual_account_id": "string",
"amount": 42500,
"rail": "ach_standard | ach_same_day | rtp | fednow",
"destination": {
"account_number": "string",
"routing_number": "string",
"name": "string"
},
"idempotency_key": "string"
}KYB
POST /kyb
Submit a Know-Your-Business verification request for a virtual account entity.
GET /kyb/:id
Retrieve KYB status. Returns pending, approved, pending_review, or rejected.
Ledger
GET /ledger/entries
Query ledger entries for a platform or individual virtual account. Filter by date range, type, or account.
POST /ledger/entries
Create a manual journal entry. Used for adjustments, fee postings, and corrections.
Webhooks
POST /webhooks
Register a new webhook endpoint for your platform.
GET /webhooks
List all registered webhooks and their delivery status.
Error Codes
The API uses standard HTTP status codes. All error responses include a JSON body with code and message fields.
- 400 — Invalid request parameters
- 401 — Invalid or missing API key
- 404 — Resource not found
- 409 — Idempotency conflict
- 422 — KYB or compliance rejection
- 429 — Rate limit exceeded
- 500 — Internal server error
Need help? Contact [email protected] with your request ID and we'll respond within one business day.