Base URL
All requests to the Surge API must be made over HTTPS.Authentication
The Surge API authenticates merchant requests using API keys. Your key is issued when your merchant account is approved and has the formatsurge_live_sk_....
Include it on every request:
SURGE_API_KEY) and never commit it to version control.
Key rotation
To generate your first key or rotate an existing one, call:name field is optional but recommended — it identifies the key in your rotation history. The new plaintext key is returned once in data.apiKey. Store it immediately. The old key is invalidated on rotation and archived to your key history.
To view past revoked keys:
API key generation requires your account to have API access enabled. If the endpoint returns
403, contact support@gosurge.xyz to have it unlocked.HTTP Conventions
All request bodies must be JSON with the
Content-Type: application/json header.
Amounts & Currency
All monetary amounts in the Surge API are in kobo (the smallest Nigerian currency unit). There are 100 kobo in 1 Naira.
Always pass integer kobo values. Divide by 100 when displaying amounts to customers.
Response Format
All responses follow a consistent envelope:HTTPException) return:
detail or error.message depending on which shape is present.
Idempotency
For write operations (e.g. creating a checkout session), you can send anIdempotency-Key header containing a UUID to safely retry requests without creating duplicates.
Rate Limits
Exceeding the limit returns HTTP
429 Too Many Requests. Retry with exponential back-off.
Error Codes
Settlement & Fees
Surge charges a 2.5% platform fee on each successful payment collected. For every installment:- Surge retains 2.5%
- The merchant receives 97.5% of the installment amount
GET /api/v1/merchant/{merchant_id}/wallet).