Skip to main content

Get Started In Two Steps

Hello there, developer! 👋 Welcome to the RexPay API documentation, where businesses accept payments seamlessly across web, mobile, and POS channels.

Step 1: Create an account

  1. Sign up for a RexPay account or login.
  2. Complete your profile details.
  3. From the menu, select Developer Tools
  4. The page shows your Secret Key and Base URL.
Store your key securely as an environment variable. Do not share it or commit it to GitHub.

Step 2: Make your first API call

  1. Paste the following code into your command line:
curl -X POST https://pgs-sandbox.globalaccelerex.com/api/pgs/payment/v2/createPayment \
  -u "your_email@example.com:your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "reference": "INV-10001",
    "userId": "ga",
    "amount": 10000,
    "currency": "NGN",
    "customer": {
      "email": "customer@example.com",
      "name": "Jane Doe"
    }
  }'
  1. You should get a response similar to the following:
    {
      "status": "success",
      "message": "Payment initialized successfully",
      "data": {
        "paymentUrl": "https://pay.rexpay.com/checkout/xyz123",
        "reference": "INV-10001"
      }
    }
    
    The payment status was returned as Success which means the payemnt went thrugh.

Next Steps

✅ Now that you have successfully made an API call, consider exploring these key features: