E-Wallet Smart Money Management

Setting up your digital wallet...

πŸ”’ Securing your data
πŸ’³ Preparing wallet features
πŸš€ Almost ready!
E - Wallet
Essential Nigeria
Wallet API v1.0
Live
πŸ“–

API Documentation

Essential Nigeria Wallet β€” Backend REST API

Base URL

https://api-ewallet.eroot.ng/api

Version

v1.0.0

Format

application/json

About this API

This is the backend API powering the Essential Nigeria e-wallet platform. It handles user authentication, dedicated virtual accounts via Paystack, peer-to-peer transfers, cooperative savings (Ajo), fixed deposits, voucher management, and webhook processing.

πŸ”

Authentication

Protected endpoints require a JWT Bearer token in the Authorization header. Obtain a token via POST /login.

Authorization Header
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGci...
Token Expiry: Tokens expire per the JWT_TTL config value (default 60 minutes). On expiry the API returns 401 Token expired.
⚠️

Error Codes

Code Meaning Common Cause
200 OK Request succeeded
201 Created Resource created successfully
400 Bad Request Missing required field or invalid parameter
401 Unauthorized Missing, expired, or invalid JWT token
403 Forbidden Action not permitted for this user
404 Not Found Resource does not exist
422 Unprocessable Entity Validation failed β€” check errors object
500 Internal Server Error Unexpected server-side exception
502 Bad Gateway Upstream Paystack API call failed
Error Response Shape
{
    "error": "Invalid credentials",        // single error string
    "errors": {                             // validation error map (422)
        "email": ["The email field is required."],
        "amount": ["The amount must be at least 1."]
    },
    "message": "Human-readable description"
}
πŸ‘€

Auth Endpoints

🏦

Customers

πŸ’³

Dedicated Virtual Accounts

Dedicated Virtual Accounts (DVAs) are unique bank account numbers assigned to each user via Paystack. Incoming transfers to the DVA are detected and credited to the user's wallet.
πŸ’Έ

Transfers

πŸ”§

Transfer Control

Balance sync, OTP management, and transfer finalization.

πŸ“‹

Beneficiaries

🐷

Savings

All savings endpoints are prefixed with /savings and require authentication.

πŸ“ˆ

Fixed Deposits

Prefix: /fixed-deposits. All endpoints require authentication.

🀝

Ajo (Cooperative Savings)

Ajo is a traditional Nigerian rotating savings system. A group of members each contribute a fixed amount every cycle; one member receives the entire pot per cycle. Prefix: /ajo. All endpoints require authentication.

🎟️

Vouchers

Vouchers are redeemable codes that credit a user's wallet. Types: fixed (flat NGN amount) or percentage (% of cart value). Prefix: /vouchers. All endpoints require authentication.

πŸ””

Webhooks

Important β€” Webhook Security

All Paystack webhook requests include an x-paystack-signature header containing an HMAC-SHA512 signature. The webhook handler verifies this against your PAYSTACK_SECRET_KEY before processing.

Webhook Behaviour Summary

Event Action
charge.success (DVA) Logs the deposit; balance is re-computed on next /balance call
transfer.success Updates WalletTransaction status β†’ success
transfer.failed Updates WalletTransaction status β†’ failed (TODO: notify user)
transfer.reversed Updates WalletTransaction status β†’ reversed (TODO: credit back wallet)
Essential Nigeria

Essential Nigeria Wallet API β€” v1.0.0 β€” Β© 2026

Powered by Paystack Β· Built with Laravel