Skip to main content

Payments Overview

X-Pay provides a unified API to accept payments through multiple channels including Mobile Money, bank transfers, and card payments.

Payment Flow​

Payment Object​

Every payment in X-Pay has the following structure:

{
"id": "pay_abc123xyz",
"amount": 5000,
"currency": "RWF",
"status": "completed",
"payment_method": "mobile_money",
"description": "Order #1234",
"customer_email": "customer@example.com",
"metadata": {
"order_id": "1234",
"product": "Premium Plan"
},
"created_at": "2025-01-01T10:00:00Z",
"updated_at": "2025-01-01T10:00:30Z"
}

Payment Statuses​

StatusDescription
pendingPayment initiated, awaiting customer action
processingPayment is being processed by provider
completedPayment successful
failedPayment failed
cancelledPayment cancelled by customer/merchant
refundedPayment has been refunded

Supported Payment Methods​

MethodCountriesCurrencies
MTN Mobile MoneyRwanda, Uganda, GhanaRWF, UGX, GHS
Airtel MoneyRwanda, Uganda, KenyaRWF, UGX, KES
Bank TransferRwandaRWF
Card PaymentsGlobalUSD, EUR, GBP

Quick Example​

curl -X POST https://server.xpay-bits.com/v1/payments \
-H "Authorization: Bearer sk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency": "RWF",
"payment_method": "mobile_money",
"phone_number": "+250788123456",
"description": "Monthly subscription"
}'

Next Steps​