Build Powerful Payment Solutions
Copy the generated snippets for buttons, URLs or HTML forms to share or integrate on your web/mobile apps and start accepting universal payments, worldwide.
Integration Methods
Choose the integration method that best fits your platform
Popup JS Example
javascript
<script src="https://zopay.com/js/zopay.min.js"></script>
<script>
const zopay = new ZoPay({
publicKey: 'YOUR_PUBLIC_KEY',
onSuccess: (response) => {
console.log('Payment successful:', response);
},
onError: (error) => {
console.error('Payment failed:', error);
}
});
zopay.openPaymentModal({
amount: 10000,
currency: 'XAF',
email: 'customer@example.com',
reference: 'TXN-' + Date.now()
});
</script>Quick Start Tips
- →Replace YOUR_PUBLIC_KEY with your actual public key from the dashboard
- →All amounts should be in XAF (Central African Franc)
- →reference should be unique for each transaction
- →redirect_url is where customers return after payment
Request Parameters
The following parameters can be sent through HTTP GET or POST request to the payment URL
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
public_key | string | Your public API key from the dashboard | pk_live_a1b2c3d4e5f6g7h8 | |
amount | integer | Transaction amount in XAF (minimum 100 XAF) | 10000 | |
currency | string | Currency code (currently XAF) | XAF | |
email | string | Customer email address | customer@example.com | |
reference | string | Unique transaction reference (alphanumeric, max 50 chars) | TXN-20240526-001 | |
first_name | string | — | Customer first name | John |
last_name | string | — | Customer last name | Doe |
phone | string | — | Customer phone number | +237671234567 |
description | string | — | Transaction description/purpose | Online store purchase |
metadata | object | — | Custom data as JSON object (max 1KB) | {"order_id":"12345","user_id":"67890"} |
redirect_url | string | — | URL to redirect after successful payment | https://yoursite.com/success |
payment_method | string | — | Preferred payment method (mobile_money, card, bank_transfer, international) | mobile_money |
api_version | string | — | API version to use | v1 |
HTTP GET Request
All parameters are appended to the URL as query strings:
GET https://pay.zopay.com/pay?public_key=YOUR_KEY&amount=10000&...HTTP POST Request
Send parameters in the request body as form data:
POST https://pay.zopay.com/pay
Content-Type: application/x-www-form-urlencodedImportant Notes
- ⚠Always use HTTPS for production. HTTP is only for development/testing.
- ⚠Special characters in parameters should be URL-encoded
- ⚠Reference must be unique for each transaction. Duplicate references will be rejected.
- ⚠Never expose your secret API key in client-side code
SDKs & Libraries
Official SDKs for popular programming languages
Node.js/JavaScript
Official SDK for Node.js and JavaScript environments
npm install @zopay/sdkAPI Reference
Comprehensive API documentation with examples for all endpoints, including authentication, transactions, webhooks, and more.
Developer FAQ
Common questions about integration and API usage
Need More Help?
Our developer support team is here to help. Check out our detailed documentation or reach out through our support channels.