Getting started

Take your first test payment in about ten minutes.

You will create a test API key, ask a test phone number for UGX 10,000, and watch the payment arrive in your wallet. Test mode uses sandbox money, so nothing real moves and you don’t need to verify your business first.

You need a Morzepay account and a terminal with curl. Prefer not to code? Make a payment page instead: it takes a minute.

  1. Create your account

    Go to the dashboard and sign up with your email. Confirm your email address, and you’re in your new business on the Home page.

  2. Switch to Test

    Make sure the toggle at the top of the dashboard says Test. Everything you do now uses sandbox money.

  3. Create a test API key

    Go to Developers and click Create API key. Name it quickstart, tick Request payments, See wallets and balances and See transactions, then confirm with your password or two-factor code.

    The key is shown only once. Copy it now. Keep keys on your server and never put them in a website or a mobile app.

    Put it in your terminal:

    Terminal
    export MORZEPAY_KEY="mp_test_..."
  4. Find your wallet

    Every business starts with a main wallet. List your wallets and copy the id:

    Terminal
    curl "https://morzepay.com/v1/wallets" \
      -H "Authorization: Bearer $MORZEPAY_KEY"
  5. Ask for a payment

    Ask a phone number for UGX 10,000. In test mode the payment succeeds straight away, with the same fees as live:

    Terminal
    curl -X POST "https://morzepay.com/v1/deposits" \
      -H "Authorization: Bearer $MORZEPAY_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: quickstart-0001" \
      -d '{
        "wallet_id": "wal_...",
        "msisdn": "0771234567",
        "amount": 10000,
        "reference": "quickstart-0001"
      }'

    The answer is the new transaction, with its id and status.

  6. Check that it arrived

    Look up the transaction, or open Activity in the dashboard:

    Terminal
    curl "https://morzepay.com/v1/transactions/txn_..." \
      -H "Authorization: Bearer $MORZEPAY_KEY"

    The status is success and net shows what reached your wallet after the fee. Your payment works.

Try the other outcomes#

Real customers decline, run out of balance or take a minute to answer. Use the test numbers to see each case before you go live: +256700000002 declines, +256700000003 waits about a minute and then succeeds.

Next steps#