Payments

Payments

Collect money from customers via mobile money, cards, or QR codes

The Payments API allows you to collect money from customers through various channels.

Payment Types


Payment Flow

1. Create Payment Intent
   └── POST /v1/payments

2. Customer Completes Payment
   └── Mobile: USSD push or prompt
   └── Card: Redirect to checkout page
   └── QR: Scan and pay

3. Receive Webhook Notification
   └── payment.completed or payment.failed

4. Verify Payment Status (optional)
   └── GET /v1/payments/{reference}

API Endpoints

EndpointMethodAuthDescription
/v1/paymentsPOSTAPI KeyCreate payment intent
/v1/payments/{reference}GETNoneGet payment status

Payment Status

StatusDescription
pendingPayment created, awaiting customer action
completedPayment successful, funds received
failedPayment failed (declined, timeout, etc.)
voidedPayment cancelled before completion
expiredPayment expired (default: 1 hour timeout)

Idempotency

Use the Idempotency-Key header to safely retry requests without creating duplicate payments.

POST /v1/payments
Idempotency-Key: order-12345-attempt-1
  • Keys are valid for 24 hours
  • Same key + same request body = returns cached response
  • Same key + different body = returns error

On this page