Overview
Getting started
Webhooks
Powered Byspreading
On this page

Invoke Payment

INFO

Refer to Get bank list on how to get unique USSD bank codes.

Overview

This endpoint facilitates the initiation of a payment. It represents the second step in the payment process and expects specific parameters: bank code (string), amount (string), and client reference (string).

Request

Method: POST
URL: [API Base URL]/payments/ussd/invokePayment

Parameters:

  • bankCode (string):

This is the code of the bank chosen by your customer returned from the bank list endpoint.

  • amount (string):

This is the amount your customer wants to fund or pay.

  • clientReference (string):

An identifier supplied by you to be used to identify the transaction. This is the unique Id for the customer dialing the USSD code. e.g: user ID, account number, etc.

INFO

By utilizing this endpoint, clients can seamlessly initiate payments via the USSD service, ensuring a smooth payment experience.

This endpoint requires a POST request to be sent to the specified URL with the necessary parameters included in the request body.

Request body :
Untitled
{
  "bankCode":"966"
  ,"amount":"20.5"
  ,"clientReference":"08097926728"
}

1
Copied!
Sample Response :
Untitled

{
    "status": true,
    "message": "payment invoked successfully",
    "data": {
        "Reference": "9683",
        "Amount": "1000",
        "TransactionId": "23102041111275109683",
        "TraceId": "83B6RE2GGXP494J",
        "UssdString": "*737*000*9683#",
        "TimeStamp": "2023-10-20 10:51:27"
    }
}

1
Copied!
Reference (string):

This is the reference combined with the bank ussd code to complete the ussd string and is usually valid for 5mins. e.g *737*000*9683#

amount (string):

Amount of the transaction

TransactionId (string):

The unique id of the transaction you invoked

TraceId (string):

A unique trace id of the transaction you invoked and can be used to investigate transaction.

UssdString (string):

The USSD code that'll be displayed to your customer and dialed to make payment/fund account.

TimeStamp (string):

The date and time of the transaction.