- From your infrastructure/application, call our Generate Checkout URL Endpoint with the payment details.
- We will provide you with a link to a payment page, which you can then redirect your customer to in order to complete the payment process.
- Once the transaction is complete, we will redirect the customer back to your specified URL.
1. Get all the payment details
First, you need to assemble the payment details. Here are the details you’ll need:| Field | Type | Description | Required |
|---|---|---|---|
amount | Number | This is the amount to charge the customer. This should be in the lowest currency denomination (e.g., 200000 for 2000.00) | True |
currency | String | This specifies the currency in which you would like to charge (e.g., “XOF”, “USD”, “NGN”) | True |
country | String | This is the 2-character country code for the country (e.g., “CI” for Côte d’Ivoire, “NG” for Nigeria) | True |
webhookURL | String | This is a URL where we will send the payment event notifications. Highly recommended for tracking payment status | False |
redirectURL | String | The URL to which the customer should be redirected after the payment is completed | False |
2. Call the endpoint to generate a checkout URL
Next, in order to initiate the payment process, you will need to call our Generate Checkout URL API and provide the collected payment details. Please ensure that you authorize the API call using yourx-api-key header.
API Endpoints
Sandbox (Testing): https://staging-api.mobipurse.com/v1/checkouts Production: https://api.mobipurse.com/v1/checkoutsRequest Headers
| Header | Description | Required |
|---|---|---|
x-api-key | Your Mobipurse API key from the dashboard | True |
Example Request
Best Practices
- Always use webhooks: Don’t rely solely on redirect URLs, as users may close their browser before being redirected.
- Store the checkout reference: Save the reference returned from the checkout creation in your database to track the payment later.
- Handle all payment statuses: Be prepared to handle success, failure, and cancelled payment scenarios.
- Test in sandbox first: Always test your integration thoroughly in the sandbox environment before going live.
- Implement idempotency: Check if a payment has already been processed before fulfilling orders to avoid duplicate processing.
- Set appropriate amounts: Remember to use the lowest currency denomination (e.g., 200000 for 2000.00 XOF).
Currency & Country Codes
Common currency and country code combinations:| Country | Code | Currency | Example Amount |
|---|---|---|---|
| Côte d’Ivoire | CI | XOF | 200000 (2000.00 XOF) |
| Nigeria | NG | NGN | 50000 (500.00 NGN) |
| Ghana | GH | GHS | 10000 (100.00 GHS) |
| Kenya | KE | KES | 100000 (1000.00 KES) |
Need Help?
If you encounter any issues with the checkout integration:- 📧 Email: support@mobipurse.com
- 💬 Contact us through your merchant dashboard
- 📚 Browse our complete API documentation
