cURL

Every endpoint, as a copy-paste command. Replace YOUR_API_KEY and reference values with your own.

bash
# Collect a payment
curl -X POST https://api.kawrie.com/v1/collect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: unique-key-123" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 25000, "phone": "+256712345678", "currency": "UGX" }'

# Check balance
curl https://api.kawrie.com/v1/balance \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get a transaction
curl https://api.kawrie.com/v1/transactions/KW-20260628-A1B2C3D4 \
  -H "Authorization: Bearer YOUR_API_KEY"

# Generate a payment token
curl -X POST https://api.kawrie.com/v1/payment/token \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 15000, "currency": "UGX" }'

# Create a webhook
curl -X POST https://api.kawrie.com/v1/merchant/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/webhooks/kawrie", "events": ["collection.completed"] }'

Full request and response schemas for each of these live in the API Reference.