Skip to main content

Payment Integration Guide

This guide will walk you through the process of integrating payments into your application using Open Market API.

Supported Countries

Open Market supports payments in the following countries:

West Africa

  • Benin
  • Burkina Faso
  • Ivory Coast
  • Mali
  • Senegal
  • Togo

Central Africa

  • Cameroon
  • Congo
  • DR Congo
  • Gabon

Other Regions

  • Uganda
  • Zambia
  • International

Creating a Payment

To create a payment, you’ll need to make a POST request to our payment endpoint with the required information.

Required Parameters

Optional Parameters

Example Request

Payment Flow

  1. Create Payment Request
    • Send payment details to our API
    • Receive a payment URL in response
  2. Redirect Customer
    • Redirect your customer to the received payment URL
    • The customer will see our secure payment page
  3. Payment Processing
    • Customer selects their preferred payment method
    • Completes the payment on our secure platform
  4. Payment Confirmation
    • After successful payment, customer is redirected to your success URL
    • Our system sends a webhook notification to your callback URL
    • Failed payments are redirected to your failure URL
Make sure you’ve configured your callback URLs in the API Settings before processing payments.

Country Codes

When specifying the buyer_country, use one of these exact values:

Best Practices

  • Store API keys in environment variables
  • Never expose API keys in frontend code
  • Use different keys for development and production
  • Rotate keys periodically
  • Implement IP whitelisting when possible
Environment Variables
Store additional information in the meta_data object to enhance your payment tracking:
Benefits of using meta_data:
  • Enhanced transaction tracking
  • Easier payment reconciliation
  • Better customer support handling
  • Detailed reporting capabilities
  • Simplified order management
  • Custom analytics integration
Always implement payment requests through your backend:
  • Always verify the price is positive
  • Ensure the country is supported
  • Validate buyer information
  • Sanitize all user inputs
  • Implement request rate limiting
Implement proper error handling and user feedback:
  • Validate webhook signatures using your private key
  • Process webhooks asynchronously
  • Implement retry mechanism for failed webhooks
  • Store webhook events for audit purposes
  • Use test API keys in development
  • Test various payment scenarios
  • Verify webhook handling
  • Test error scenarios
  • Implement end-to-end testing
  • Simulate network issues
  • Log all payment attempts
  • Monitor API response times
  • Track success/failure rates
  • Set up alerts for unusual activity
  • Implement transaction tracking

Testing Tips

During development, use test cards and mobile money numbers available in our testing guide.

Common Issues

  • Verify your API key is correct
  • Check if all required fields are provided
  • Ensure the country code is valid
  • Verify the payment URL is valid
  • Check if you’re using proper redirect method
  • Ensure no client-side JavaScript is blocking the redirect

Need Help?

If you encounter any issues or need assistance, our support team is available through: