POST/v1/checkout/create

Create payment session

Creates a hosted or redirect checkout session for card, mobile money, or Zimswitch payments.

Authentication

Secret Key — send Authorization: Bearer YOUR_KEY header.

Request parameters

ParameterTypeRequiredDescription
amountstringYesAmount in "10.00" format (2 decimal places)
currencystringYesUSD or ZWG
merchantTransactionIdstringYesYour unique reference (max 64 chars)
returnUrlstringYesURL to redirect customer after payment
notificationUrlstringYesWebhook URL for payment events
customerEmailstringNoCustomer email
customerNamestringNoCustomer display name
customerPhonestringNoRequired for mobile money (+2637XXXXXXXX)
walletTypestringNoecocash | innbucks | onemoney
descriptionstringNoPayment description shown to customer
walletType and customerPhone must be sent together for mobile money payments.

Response fields

FieldTypeDescription
checkout_idstringWatenga checkout session ID
payment_urlstringURL to complete payment (hosted checkout)
gateway_namestringGateway adapter used (eftpay, zimswitch, ecocash, etc.)
requires_pollingbooleanTrue for mobile money — poll mobile-status endpoint

Code examples

bash
curl -X POST https://api.watenga.africa/v1/checkout/create \
  -H "Authorization: Bearer sk_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25.00,
    "currency": "USD",
    "merchantTransactionId": "INV-001",
    "returnUrl": "https://yoursite.com/thank-you",
    "notificationUrl": "https://yoursite.com/webhooks/watenga",
    "customerName": "Tendai Moyo",
    "customerEmail": "tendai@example.com"
  }'

Response example

json
{
  "success": true,
  "data": {
    "checkout_id": "chk_01HQXYZ",
    "payment_url": "https://checkout.watenga.africa/pay/chk_01HQXYZ",
    "gateway_name": "eftpay",
    "requires_polling": false
  }
}