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

ParameterTypeDescription
product_namestringName of the product or service being sold
pricenumberPrice in the local currency
descriptionstringDescription of the product or transaction
buyer_namestringCustomer’s full name
buyer_countrystringCustomer’s country (see supported countries)
referencestringYour unique transaction reference (6-24 alphanumeric characters, must contain both letters and numbers)

Optional Parameters

ParameterTypeDescription
meta_dataobjectAdditional data you want to store with the payment
success_urlstringURL to redirect after successful payment (must be valid HTTPS/HTTP URL)
failed_urlstringURL to redirect after failed payment (must be valid HTTPS/HTTP URL)

Example Request

curl -X POST "https://gateway.op-markets.com/payment/create-payment-url/" \
-H "api-key: your_public_key_here" \
-H "Content-Type: application/json" \
-d '{
  "product_name": "Premium Course",
  "price": 5000,
  "description": "Access to premium programming course",
  "buyer_name": "John Doe",
  "buyer_country": "BENIN",
  "reference": "ORDER123456",
  "success_url": "https://your-domain.com/success",
  "failed_url": "https://your-domain.com/failed",
  "meta_data": {
    "customer_id": "CUS_123",
    "order_id": "ORD_456"
  }
}'

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:

BENIN
BURKINA FASO
CAMEROON
CONGO
COTE D'IVOIRE
GABON
INTERNATIONAL
MALI
RD CONGO
SENEGAL
TOGO
UGANDA
ZAMBIA

Best Practices

Testing Tips

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

Common Issues

Need Help?

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