Developers
REST API
GuidesErrorsLogin
Get API Keys
API Navigation
  • Overview
  • Quick start
  • Authentication
  • Collect a payment
  • Payment status
  • Refunds
  • Testing
  • Production
  • Security
API reference
  • Create API keys POST
  • List API keys GET
  • Get API key GET
  • Delete API key DEL
  • Collect with MTN POST
  • MTN payment status GET
  • Collect with Airtel POST
    Create and pay
  • Create order POST
  • Order fee POST
  • Pay order with card POST
  • Pay order with bank POST
  • Status and verify
  • Order status POST
  • Verify order POST
  • Cards and tokens
  • Save card POST
  • Tokenize charge GET
  • Refunds
  • Refund order POST
  • Lists and stats
  • List orders GET
  • Get order GET
  • List banks GET
  • Order stats GET
  • List transactions GET
  • Get transaction GET
  • Transaction statuses GET
Errors and limits
  1. Docs
  2. Getting started
  3. Quick start

Quick start

A step-by-step walkthrough to registering an account, obtaining credentials, initiating your first collection, and polling for results.

Video: how to integrate the API

API integration walkthrough

Step 1 / 4

Create API credentials

Register, then generate an API key and secret from the dashboard Applications page.

POST /developer/gatewayConfigs

Quick Start Overview

This guide walks you through sending your first real or simulated payment request on https://payment-service-mh2d.onrender.com/api. You will create a merchant account, retrieve a session token, create a Gateway API Key, initiate an MTN collection, and poll for settlement.

One API host
A separate sandbox hostname is not confirmed. Test and live credentials must not be mixed. Confirm the active provider environment with the team before sending a payment.
StepActionEndpointAuth Header / CredentialsOutcome
1Sign upPOST/auth/signupNoneReceive JWT access token & refresh token
2Log inPOST/auth/loginNoneAuthenticate automated backend processes
3Create API keysPOST/developer/gatewayConfigsAuthorization: Bearer <token>Receive x-api-key and plaintext apiSecret
4Collect paymentPOST/payment/mtn-momo-payAuthorization: Bearer <token>Trigger USSD prompt; receive transactionReferenceId
5Poll statusGET/payment/mtn/status/:refAuthorization: Bearer <token>Verify final payment status (COMPLETED)

Implementation Steps

5 sequential steps
  1. 1

    Create an account

    Step 1 of 5
    Register your merchant account via POST/auth/signup. Returns merchant JWT access token and refresh token.
    Request Example
    curl -X POST "https://payment-service-mh2d.onrender.com/api/auth/signup" \
      -H "Content-Type: application/json" \
      -d '{
        "firstName": "Kwame",
        "lastName": "Mensah",
        "email": "merchant@example.com",
        "password": "SecurePassword123!",
        "businessName": "Acme Retail",
        "businessType": "Ecommerce",
        "country": "Rwanda",
        "phoneNumber": "+250788000000",
        "howHear": "Developer Docs"
      }'
    Sign upAPI Reference
  2. 2

    Sign in

    Step 2 of 5
    Sign in with POST/auth/login to retrieve your session bearer token for automated calls.
    Request Example
    curl -X POST "https://payment-service-mh2d.onrender.com/api/auth/login" \
      -H "Content-Type: application/json" \
      -d '{
        "email": "merchant@example.com",
        "password": "SecurePassword123!"
      }'
    Sign inAPI Reference
  3. 3

    Create API keys

    Step 3 of 5
    Generate an API key and secret pair via POST/developer/gatewayConfigs for server-to-server payments.
    Request Example
    curl -X POST "https://payment-service-mh2d.onrender.com/api/developer/gatewayConfigs" \
      -H "Authorization: Bearer $ZIBA_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Production Store Checkout",
        "description": "Server-to-server payment collections for online ecommerce store"
      }'
    Create API keysAPI Reference
  4. 4

    Collect payment

    Step 4 of 5
    Trigger mobile money collection with POST/payment/mtn-momo-pay using a Bearer token.
    Request Example
    curl -X POST "https://payment-service-mh2d.onrender.com/api/payment/mtn-momo-pay" \
      -H "Authorization: Bearer $ZIBA_ACCESS_TOKEN" \
      -H "x-api-secret: $ZIBA_API_SECRET" \
      -H "Content-Type: application/json" \
      -d '{
        "amount": 100,
        "currency": "RWF",
        "phoneNumber": "+250788000000"
      }'
    Collect a paymentAPI Reference
  5. 5

    Poll status

    Step 5 of 5
    Poll GET/payment/mtn/status/:reference with your transaction reference until final status (COMPLETED or FAILED).
    Request Example
    curl -X GET "https://payment-service-mh2d.onrender.com/api/payment/mtn/status/$TRANSACTION_REFERENCE" \
      -H "Authorization: Bearer $ZIBA_TOKEN"
    Poll statusAPI Reference

Notes

  • Illustrative example. A separate sandbox hostname is not confirmed.
  • The API-key route and the bearer-token route use the same MTN body. Status polling uses a bearer token.
  • Poll payment status with the transactionReferenceId. Payment routes are limited to 15 requests per minute.

Related

AuthenticationCreate API keysCollect with MTN
Was this page helpful?

Let us know how we can make our API documentation better.

PreviousOverview
NextAuthentication