Initialize Transaction

Create a new charge and receive a hosted checkout URL.

POST/api/v1/transaction/initialize

Requires Authorization: Bearer sk_live_…

Body parameters

ParameterTypeDescription
amountrequirednumberCharge amount in GHS. Min 0.01, max 100,000.
emailstringCustomer email (optional but recommended).
customer_namestringCustomer’s MoMo registered name (recommended when available).
callback_urlstringHTTPS URL to redirect the browser after successful payment.
descriptionstringShown on checkout / stored on the transaction.
metadataobjectArbitrary JSON you get back on verify and webhooks (e.g. your order id).

Sample request

curl -X POST https://waaguan.com/api/v1/transaction/initialize \
  -H "Authorization: Bearer sk_live_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 50,
    "email": "customer@email.com",
    "customer_name": "AMA MENSAH",
    "callback_url": "https://yoursite.com/payment/callback",
    "description": "Order #1001",
    "metadata": { "order_id": "1001" }
  }'

Sample response

{
  "status": true,
  "message": "Authorization URL created",
  "data": {
    "authorization_url": "https://waaguan.com/pay/wa-6281126272",
    "access_code": "AbCdEfGhIjKlMnOp",
    "reference": "wa-6281126272",
    "amount": 50,
    "currency": "GHS",
    "momo_number": "024XXXXXXXX",
    "momo_network": "MTN"
  }
}

Response fields

ParameterTypeDescription
authorization_urlstringHosted checkout URL — redirect the customer here.
access_codestringUsed for short links at /c/{access_code}.
referencestringUnique wa-########## reference for verify & webhooks.
amountnumberAmount charged.
currencystringTypically GHS.
momo_numberstringMoMo number shown on checkout.
momo_networkstringe.g. MTN.