Skip to main content

Base URL

https://api.stablepay.global/v2

Authentication

All endpoints require Bearer token authentication:
Authorization: Bearer pk_live_your_api_key

Response Format

All responses follow this structure:
{
  "success": true,
  "data": { ... }
}
Error responses:
{
  "error": "Error Type",
  "message": "Description",
  "code": "ERROR_CODE"
}

Endpoints

Users

MethodEndpointDescription
POST/usersCreate a new user
GET/users/:idGet user details
GET/usersList users

KYC

MethodEndpointDescription
POST/users/:id/kyc/pan/verifyVerify PAN
POST/users/:id/kyc/digilocker/initiateStart Aadhaar verification
POST/users/:id/bank-accountsAdd and verify bank account
GET/users/:id/kyc/statusGet KYC status

Transactions

MethodEndpointDescription
POST/transactionsCreate transaction
GET/transactions/:idGet transaction
GET/transactionsList transactions
GET/quotesGet exchange rate quote
GET/quotes/rateGet current exchange rate info

Webhooks

MethodEndpointDescription
GET/webhooksList webhook events
POST/webhooks/:id/retryRetry failed webhook

Pagination

List endpoints support pagination:
?page=1&limit=20
Response includes:
{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 100,
    "totalPages": 5
  }
}