Paystack Integration
Configure Paystack for online fee payments in Ghana. Includes test mode, subaccount setup, and webhook verification.
Paystack Integration
Ardent SMS leverages Paystack to provide a seamless online payment experience for parents and schools in Ghana.
Overview
Supported payment channels in Ghana:
- Bank Card: Visa, Mastercard.
- Mobile Money: MTN MoMo, Vodafone Cash, AirtelTigo.
- USSD: Dial-to-pay options.
- Bank Transfer: Direct bank-to-bank settlement.
Precision Handling: Paystack processes all transaction amounts in pesewas. Ardent SMS transmits amounts directly in pesewas, matching our internal integer storage format. For example, a fee of GHS 100.00 is sent as 10000 pesewas in Paystack API calls to ensure zero rounding errors.
Setup Steps
- Create Account: Register at paystack.com.
- Verification: Complete business verification. Ghana-based schools must provide valid business registration or educational accreditation documents.
- API Keys: Navigate to Settings → API Keys & Webhooks in your Paystack dashboard to obtain your Public Key and Secret Key.
- Configuration: In the Ardent School Portal, go to Settings → Integrations → Paystack and enter your keys.
- Subaccounts: Configure your subaccount code for automated fee splitting if applicable.
- Testing: Use Test Mode to verify your integration before accepting real money.
Subaccount Configuration
For schools with complex settlement requirements (e.g., splitting fees between the school and a PTA fund), Ardent SMS supports Paystack Subaccounts. This allows for automated, rule-based distribution of funds at the point of payment.
Webhook Configuration
Webhooks are essential for real-time payment reconciliation. Ardent SMS automatically provides a unique webhook URL in your integration settings. Copy this URL and paste it into your Paystack Dashboard under the "Webhook URL" field. This ensures that as soon as a parent pays, their invoice is marked as PAID instantly.
Test Cards (Ghana)
Use these card details in Paystack's test mode to simulate various transaction outcomes.
| Card Type | Number | Expiry | CVV | Expected Behaviour |
|---|---|---|---|---|
| Successful | 4084 0840 8408 4081 | 01/99 | 408 | Payment succeeds immediately. |
| Insufficient Funds | 4084 0840 8408 4081 | 01/99 | 408 | Charge fails with balance error. |
| MoMo Success | Use MSISDN: 0551234987 | — | — | Mobile Money payment succeeds. |
Paystack test cards for Ghana
Payment Flow
The diagram below illustrates the end-to-end journey of a fee payment through the platform.