Sovereign Payment Gateway API
This API allows B2B partners to accept payments via Bank Cards (Visa, Mastercard) and E-Wallets through CashPay All's secure infrastructure.
Sovereign Network
Ask AI
Have a question about this API? Ask our AI assistant for a quick answer based on the documentation.
1. Option A: Hosted Checkout (Web)
Generates a secure payment session and returns a unique redirect URL for the client. This is the simplest and recommended method for e-commerce websites, as it handles PCI-DSS compliance for you.
/api/v1/b2b/payments/checkoutCreates a payment session and returns a unique redirect URL.
Request Example
{
"amount": 150.00,
"currency": "USD",
"description": "Premium Service Purchase",
"customer": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"redirectUrl": "https://your-store.com/success",
"paymentMethods": "Card,MobileMoney"
}2. Option B: Direct Charge (Server-to-Server - CARD ONLY)
Allows you to initiate a card charge directly from your server. This option is ideal for physical POS integrations or backends managing their own secure forms.
PCI-DSS Warning
/api/v1/b2b/payments/chargeDirectly debits a bank card via a secure server-to-server connection.
3. Option C: Native Android Checkout (In-App)
Specially designed for native Android applications. This method allows for seamless payment processing within your app's interface (no external redirection).
/api/v1/b2b/payments/native-checkoutInstant processing of card data within your mobile application.
Request Example
{
"amount": 10.00,
"currency": "USD",
"reference": "APP-ORDER-123",
"customer": {
"name": "Patrick Kamanda",
"email": "patrick.k@email.com"
},
"cardDetails": {
"number": "4242XXXXXXXX4242",
"expiryMonth": "12",
"expiryYear": "26",
"cvv": "123"
}
}Response Example
{
"success": true,
"status": "completed",
"message": "Payment successfully validated by the CashPay network.",
"cashpayReference": "CP-NW-A1B2C3",
"orderId": "APP-ORDER-123"
}4. Fleet Account Top-up (Leaders Only)
Partners (Leaders) can programmatically fund their fleet account using Mobile Money or Bank Cards. This allows for automated balance management.
Top-up via Mobile Money
/api/v1/b2b/account/topup/mobileInitiates a top-up request from a Mobile Money wallet.
{
"amount": 100.00,
"currency": "USD",
"phone": "243812345678",
"operator": "AIRTEL"
}Top-up via Card
/api/v1/b2b/account/topup/cardInitiates a top-up using a saved or new bank card.
5. Notifications (IPN Webhooks)
The CashPay server sends a real-time notification to your endpoint (callbackUrl) as soon as a payment status is updated.
IPN Notification Example
{
"cashpayReference": "CP-NW-A1B2C3",
"status": "completed",
"amount": 10.00,
"currency": "USD",
"timestamp": "2024-05-28T14:30:00Z"
}