UNDERSTANDING INSTANT PAYMENT NOTIFICATION
Learn how you can use Instant Payment Notifications (IPNs) to get real-time information about transaction events.
The IPN service triggers a notification when an event occurs that pertains to a transaction. Typically, these events represent various kinds of payments;however, the events may also represent authorizations, Fraud Management Filter actions and other actions, such as refunds, disputes, and chargebacks.
The notifications are sent to a listener page on your server which receives the messages and performs backend processing based on the message content.
IPN is a message service that Core Banking System uses to send notifications about specific events, such as:- • Instant payments, direct credit & debit transactons.
Whenever one of these events occurs, the IPN will provide you with basic details about the event, such as the amount, Transaction Type, Transaction Reference, CBS Reference, mobile number , money reference, customer account number and the timestamp.
WHAT IPNS ARE USED FOR
• Update your customer database when a payment is processed. • Make sure your accounting records are updated when a payment is made
HOW AND WHEN CREDITBANK SENDS IPN
IPNs are automatically transmitted via an HTTPS POST request to a unique URL on your site's server, which you will define. IPNs are triggered by an event such as a payment acceptance and are sent as soon as the event is complete.
HOW TO ENABLE IPNs
Credit Bank provides IPNs to all merchants for various event types, such as credit transaction to an account & a debit transaction to an account.
Note: The IPN name will be sent in the transactionType parameter.
AVAILABLE IPN TYPES
In REST, the server explicitly defines whether the client can store responses for future use or not, enhancing efficiency and responsiveness.
IPN EXAMPLE
The following is a json payload for an Instant Payment notification: { "notificationType": "FT", "notificationSubType": "CBS_FT", "data": { "amount": "300", "transactionType": "credit", "transactionReference": "DAFSHSTFSFSJ", "CBSReference": "FT22321YXDV8", "mobileNumber": "254727123456", "momoReference": "RTGH87685", "custAccount": "0021024000039", "timestamp": "2023-01-13 12:40:55" } }
Object Fields:
• notificationType : This is the type of notification that is triggered when event occurs, can be a Fund transfer Transaction, PesaLink Transaction
• notificationSubType: This is the core banking system listener after the event is triggered
• data: this is the data object the CBS is to transmit to the merchant webhook configured on the developer portal
• amount: Amount transacted during the transaction carried out
• transactionType : this can be a debit or credit transaction type carried out by the account i.e “credit” or “debit”.
• CBSReference : Reference number in the core banking system
• Mobile Number: Number of customer
• momoReference: Mobile Money Reference Number.
• custAccount : customer Account number
• timestamp: transaction time carried out in the core banking system
Layered System
Each layer of an API cannot "see" beyond the immediate layer with which it interacts. This ensures that each part of the path in an API operates independently of the others.
Code on Demand
Optionally, servers can temporarily extend or customize the functionality of a client by transferring executable code (such as applets).
GET, POST, PATCH, DELETE
Our APIs are HTTPS-based, and data is sent and received securely over SSL. To retrieve data from the API, use a GET request. To submit, change, or destroy data, use a POST. A DELETE request is accepted for data removal.
Resources
Below are some resources that we recommend for you to learn more about APIs and RESTful principles:
REST API Tutorial https://www.restapitutorial.com/ Understanding and Using REST APIs - Smashing Magazine https://www.smashingmagazine.com/2018/01/understanding-using-rest-api/ Explaining REST to Damien Katz - Dare Obasanjo's weblog http://www.25hoursaday.com/weblog/2008/08/17/ExplainingRESTToDamienKatz.aspx REST - Wikipedia https://en.wikipedia.org/wiki/Representational_state_transfer Architectural Styles and the Design of Network-based Software Architectures - a thesis by Roy Fielding https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm