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
customerEmailstringNoCustomer email
customerNamestringNoCustomer display name
customerPhonestringNoRequired for mobile money (+2637XXXXXXXX)
walletTypestringNoecocash | innbucks | onemoney
descriptionstringNoPayment description shown to customer
metadataobjectNoYour own key-value pairs (strings; up to 50 keys, keys up to 40 and values up to 500 characters). Returned on the payment and in its webhook events.
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
metadataobjectThe metadata you sent (or the checkout session, payment link or invoice’s own)

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",
    "merchant_transaction_id": "INV-001",
    "return_url": "https://yoursite.com/thank-you",
    "customer_name": "Tendai Moyo",
    "customer_email": "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
  }
}