Introduction
Base URLs & Environments
API base URLs, sandbox vs live environments, and versioning policy.
Base URL
All API requests use the same base URL:
https://api.ouipay.com/v1Environments
| Environment | Keys | Providers | Money moves? |
|---|---|---|---|
| Sandbox | sk_test_ | Simulated: real response shapes | No |
| Live | sk_live_ | Real payment providers | Yes |
Sandbox returns the same response shapes as live, with simulated provider outcomes. The same code path serves both modes: switch the key to go live.
Sandbox vs live
Use sk_test_ keys for development and testing. Test keys never move real
money; live keys always do.
Versioning
The API is versioned in the path: /v1/. Within a version:
- Backward-compatible only: new fields, new enum values, new endpoints
- Unknown values: treat unknown enum values and new fields gracefully; they are not breaking changes
- Breaking changes ship under a new version path (
/v2/) with a deprecation window for the old one
Request format
- Content-Type:
application/jsonfor all requests with a body - IDs: ULIDs, e.g.
01M2S17G4A0N9MDMXYSCCX8SPS - Money: integer minor units plus ISO 4217 currency code:
50000with"NGN"is ₦500.00 - Timestamps: ISO 8601 / RFC 3339 in UTC:
2026-09-18T01:13:59Z
Response format
All responses wrap data in a data envelope:
{
"data": {
"id": "01M2S17...",
"status": "completed"
}
}Error responses use an error envelope:
{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "The wallet balance is insufficient for this payment.",
"request_id": "OUI-REQ-01M2S18..."
}
}