Getting Started
This guide will help you get up and running with the Payonify API. By the end of this guide, you'll be able to:
- Create a Payonify account and project
- Get your API keys
- Make your first API request
- Process a test payment
- Handle webhook events
Prerequisites
Before you begin, you should have:
- Basic understanding of REST APIs
- Familiarity with cURL or a similar HTTP client
Quick Start
-
Create a Payonify Account
Go to payonify.co.zw and click Sign Up. Enter your email address and create a password.
-
Create Your First Project
After signing up, you'll be guided through creating your first project:
-
Step 1: Enter your project name, description, and select the project type:
pos- Point of Saleweb- Web applicationmobile- Mobile applicationussd- USSD application
-
Step 2: Choose your mobile money merchant:
- Use Payonify's test merchant (recommended for getting started)
- Or add your own merchant credentials
-
Step 3: Add a webhook URL to receive payment notifications (e.g.,
https://yourapp.com/webhooks/payonify)
Quick Testing
Use webhook.site or webhook.cool to get a temporary URL and inspect the webhook payloads from Payonify.
-
-
Get Your API Keys
Once your project is created, you'll be taken to the dashboard where you can access your API keys:
- Navigate to Developer Settings > API Keys
- Copy your test keys:
- Publishable Key (
pk_test_...) - Identifies your account - Secret Key (
sk_test_...) - Authenticates API requests
- Publishable Key (
Important
Keep your secret key secure and never expose it in client-side code.
A verification email will be sent to confirm your email address, but you can start using the API immediately.
-
Make Your First API Request
Test your API keys by listing charges:
CodeResponse:
Response -
Process a Test Payment
Create your first charge using EcoCash mobile money:
CodeResponse:
ResponseThe charge is created with status
requires_authorization, meaning it's waiting for the customer to authorize the payment on their mobile phone. -
Receive Webhook Notification
When the customer authorizes the payment, Payonify sends a webhook event to your configured URL:
Webhook EventThe
charge.succeededevent confirms the payment was successful. Thepayment_method_details.mobile_money.referencecontains the transaction reference from EcoCash.
Payment Methods
Payonify supports multiple payment methods:
| Payment Method | Type | Status |
|---|---|---|
| EcoCash | Mobile Money | Available |
| OneMoney | Mobile Money | Available |
| Visa/Mastercard | Card Payments (Checkout only) | Available |
| Zimswitch | Card Payments (Checkout only) | Available |
Payout Methods
Send funds to recipients using the Payouts API:
| Destination | Provider | Status |
|---|---|---|
| EcoCash B2C | Mobile Money (Econet) | Available |
| OneMoney B2C | Mobile Money (NetOne) | Coming Soon |
Test Credentials
EcoCash Test Numbers
| Mobile Number | Behavior |
|---|---|
771111111 | Success - authorized in ~8 seconds |
771111112 | Success - authorized after ~30 seconds |
771111113 | Failed - returns failure in ~8 seconds |
771111114 | Timeout - no callback sent |
OneMoney Test Numbers
| Mobile Number | Behavior |
|---|---|
713111111 | Success - authorized in ~8 seconds |
713111112 | Success - authorized after ~30 seconds |
713111113 | Failed - returns failure in ~8 seconds |
Next Steps
Congratulations! You've successfully integrated with the Payonify API. Here's what to explore next:
- Checkout Sessions - Use our hosted checkout page for a streamlined payment experience
- Payouts - Send money to recipients via mobile money
- Webhooks - Learn more about handling webhook events
- API Reference - Explore all available endpoints and parameters
Going Live
When you're ready to accept real payments:
- Complete your business verification in the Dashboard
- Switch from test keys (
pk_test_,sk_test_) to live keys (pk_live_,sk_live_) - Test your integration thoroughly with live keys using small amounts
For support, contact support@payonify.co.zw.