Getting started

Go from zero to your first paid Mobile Money charge.

1. Create your account

  1. Register with your email.
  2. Complete onboarding: business name, type, and optional logo.
  3. Open the dashboard — your first API key pair is created automatically.

2. Get your API keys

In Connect you will see:

  • Public key (pk_live_…) — for display / future client helpers. Not required for the REST API today.
  • Secret key (sk_live_…) — authorizes /api/v1/*. Shown in full only once when generated.

3. Store secrets on your server

Merchants only need these on their backend (not NEXT_PUBLIC_* deploy vars from Waaguan itself):

# Required for API calls
WAAGUAN_SECRET_KEY=sk_live_xxxxxxxx

# Only if you use webhooks (from Connect when you save a URL)
WAAGUAN_WEBHOOK_SECRET=your_signing_secret_from_connect

4. Initialize a transaction

From your backend, create a charge. Use WAAGUAN_SECRET_KEY (or paste sk_live_… while testing).

Initialize
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"
  }
}

5. Open checkout for the customer

Send them to data.authorization_url. Two common options:

  • Redirect — navigate the browser to the hosted page (simplest).
  • Inline embed WaaguanPay.checkout({ authorizationUrl, embed: true }) so they stay on your site in a modal.

Either way they see the amount and MoMo number. Keep checkout open until payment is confirmed (or confirm on your server with Verify / webhooks).

6. Confirm payment (pick a path)

Simplest to start: skip webhooks. After checkout (or on your callback page), call Verify with the reference until status is paid, then fulfill.

When you want auto-fulfillment: add Webhooks. We POST charge.success when payment is confirmed. You can still Verify for critical orders.

What's next?