Bank USSD_old

Bank USSD allows you to generate a unique USSD code from any commercial bank in Nigeria and accept instant payment when your customer dial the USSD code and authorise with their 4 digit pin.

Generating Bank USSD and getting paid happens in 3 simple steps, see the process below

You’ll make a server to server to call using payment request endpoint to generate a one-time USSD Code by specifying the customer bank name (Using Payer.BankID param) and select FUNDING_USSD as payment method

We’ll return a unique USSD to you and you’ll display the USSD to your customer and inform them to dial the code from their phone and authorise with their USSD Pin

After successful payment, we send you a callback with details of the payment.

👍

Demo

Step 1: Get all the needed information to generate Bank USSD

Step 2: Generate bank USSD

POST /paymentRequest HTTP/1.1
Host: collect.paga.com
hash:  51102e0c13fcd67877366147f7a7f5cbf8fbaaec5304edc68126179978e743572b9426975cef0d7ed1863fdda6065b1b254bfdfcf4d0f39ae1ccd8a010cc4382
Authorization: Basic e3t1c2VybmFtZX19Ont7cGFzc3dvcmR9fQ==
Content-Type: application/json
Content-Length: 565

{
    "referenceNumber": "25796945597",
    "amount": 200,
    "currency": "NGN",
    "payer": {
        "name": "tade F",
        "phoneNumber": "09151703305",
        "bankId": "40090E2F-7446-4217-9345-7BBAB7043C4C"
    },
    "payee": {
        "name": "Ramon Bello",
        "accountNumber": "0703349644"
    },
    "expiryDateTimeUTC": "2022-04-29T19:35:00",
    "isSuppressMessages": true,
    "payerCollectionFeeShare": 1,
    "payeeCollectionFeeShare": 0,
    "isAllowPartialPayments": false,
    "isAllowOverPayments": false,
    "callBackUrl": "https://webhook.site/efda4728-139e-4efa-b5c3-d7fb24e28475?",
    "paymentMethods": [
        "FUNDING_USSD"
    ]
}

You’ll receive a JSON response like this

{
    "referenceNumber": "25796945597",
    "statusCode": "0",
    "statusMessage": "success",
    "requestAmount": 200.0,
    "totalPaymentAmount": 200.0,
    "currency": "NGN",
    "paymentMethods": [
        {
            "name": "FUNDING_USSD",
            "properties": {
                "USSDShortCode": "*901*000*724+96690997#",
                "PaymentReference": "96690997"
            }
        }
    ],
    "expiryDateTimeUTC": "2022-04-29T19:35:00",
    "isPayerPagaAccountHolder": true
}

Step 3: Display the USSD Code to your customer to make payment

Display the USSDCode to your customers on a friendly UI

Bank: Access Bank
USSD Code: 901000*724+96690997#
Amount: 50.41

To generate a shorter USSD code, limit the expiry date to 5minute or less

Step 4: Callback Notification for successful payment

After your customer makes payment, we’ll send a callback notification to the callback URL you provided in your request

{
  "event": "PAYMENT_COMPLETE",
  "notificationId": "a12ef82b-14d0-4a67-a08c-162b95154f59",
  "statusCode": "0",
  "statusMessage": "Payment Request has been authorized",
  "externalReferenceNumber": "234447994060953",
  "state": "CONSUMED",
  "outstandingBalance": 0,
  "paymentAmount": 4032.25,
  "cumulativePaymentAmount": 4032.25,
  "collectionFee": 32.25,
  "fundingDetails": {
    "payerAccountNumber": "0980763285",
    "paymentReferenceNumber": null,
    "payerName": "Bello Ramon",
    "payerBankName": null,
    "payerBankAccountNumber": "0980763285"
  },
  "hash": "33f9c9bd0785c2ccfa66ddedfbae7c3b56361250c581a39edad1d2ed08ccfbed845f34b8c30532f7c0ec544483ebee9360c5749bfe5eaa9986ac5553488e058a"
}

Step 5: Check payment status

You’ll need to make a server to server call to get the status of transaction. Your JSON request should look like below

POST /status HTTP/1.1
Host: collect.paga.com
hash: 1f42eb2a076147063285d6321a969376472c2b2710220051c1736386ff01ea0f9c4ff8ddf43cd8e497327760a2faad9139a4a3af38a1e2c2f68b56851a5a99f1

Authorization: Basic e3t1c7VybmFtZX19Ont7cGFzc3dvcmR9fb==
Content-Type: application/json
Content-Length: 51

{
    "referenceNumber": "23534646579650395979"
}

You’ll receive a JSON response like below, the data dictionary will give you the details and status of your request.

{
    "referenceNumber": "2460039509797",
    "statusCode": "0",
    "statusMessage": "success",
    "data": {
        "referenceNumber": "2460039509797",
        "statusCode": "0",
        "statusMessage": "success",
        "requestAmount": 50.0,
        "totalPaymentAmount": 50.41,
        "currency": "NGN",
        "paymentMethods": [
            {
                "name": "REQUEST_MONEY",
                "properties": {
                    "PaymentReference": "0be92b6b-b057-4652-a773-2fc4f886637c",
                    "WebPaymentLink": "https://justpaga.me/0be92b6b-b057-4652-a773-2fc4f886637c"
                }
            }
        ],
        "expiryDateTimeUTC": "2022-04-28T16:35:00",
        "isPayerPagaAccountHolder": true
    }
}

What if payment wasn’t made or completed

We will send you conclusive callback once the request expires and the customer didn’t make payment. Also, if the customer cancel the transaction we’ll redirect them back to you with a failed status and you’ll get a webhook from us.

We are done!