iQR - Acquiring APIs

This allows an entity (Acquirers - PTSP, Banks, Agent network) to initiate payments with an iQR.

How Receiving Payments with iQR works

  1. Customer present iQR to the Merchant/Agent
  2. Merchant/ Agent scans the customers iQR using their POS / Mobile app
  3. The POS/Mobile App backend make an API call (Request payment) to the iQR endpoint. This creates a payment
  4. The customer authorizes the transaction by dialing the _723_99# to authorize the transaction.

iQR Acquiring Api

Test Parameters

For Integration tests, use the following parameter for the test acquirer

aggregatorID:"MX164667"
cqrId: "230757021194666585"
mobileNumber: "2348069752675"

Request Payment

The request payment API allows you to request intiate a payment with an iQR.

Url

POST https://isw-psb-test-sc-cqr-transaction-service.azuremicroservices.io/api/v1/pay/request

Headers

An access token must be provided for all requests

Authorization <Bearer Token>

Request Body

Below is a sample request to request a payment with iQR

Sample Request Body

{
    "aggregatorID": "MX164667",
    "transactionRef": "pedo22",
    "payment": {
        "cqrId": "230757021194666585",
        "amount": 10300,
        "description":"test",
        "transactionType":"PAYMENT",
        "channel": "API",
        "currencyCode": "566"
    },
    "payee": {
        "payeeID" :"1324232323",
        "firstName":"Test",
        "lastName":"John",
        "businessName":"John Co",
        "businessAddress":"test business address"
    },
    "riskControlData": "test risk control data",
    "ipAddress": "127.0.01",
    "mobileNumber": "2349061443623"
}

Field descriptions

FieldDescriptionAdditional Information
aggregatorIDYour Merchant Code (MX***)Mandatory
transactionRefA unique reference no generated by your system.Mandatory
qrIdThe iQR id contained in the QR CodeMandatory
amountAmount to be debited. This is in minor demoninationMandatory
descriptionDescription of the paymentMandatory
transactionTypeOptions are CASHOUT, PAYMENT, TRANSFER, PURCHASEMandatory
channelAPI, WEB, USSDMandatory
currencyCode566Mandatory
payeeIDAgent or merchant ID
firstNameAgent or merchant First nameOptional
lastNameAgent or merchant Last nameOptional
payeeIDAgent ID or Merchant IDOptional
businessNamebusiness nameOptional
businessAddressaddress of the businessOptional
operatorId
longitudelongitude of current location
latitudelatitude of current location
ipAddresscurrent IP address

Response Body

Below is a response sample for

Sample response body

{
    "txId": "18",
    "code": "00",
    "message": "Successful",
    "data": {
        "transactionRef": "pedo22",
        "paymentID": "18",
        "status": "Successful",
        "description": "Successful",
        "payValidityMinutes": 5
    },
    "error": []
}

Response field description

FieldDescription
txIdThis is a unique id generated by the iQR platform. This information needs to be stored to query transaction.
codeThis is the response code of the payment request
messageA description of the code field
transactionRefThis is the transaction reference you passed in the request body
paymentIDThis is a unique id generated by the iQR platform. This information needs to be stored to query transaction. Same as txId.
statusA description of the code field
descriptionA description of the code field
payValidityMinutesThe time for how long the payment is valid, the user needs to
errorAny error msg

Response Code

00Successful
01Payment is pending
02Payment was rejected
03Payment was cancelled
04Payment timed out
05No record was found
06Invalid data supplied e.g iQR - Invalid IQR
07Already exist
91We were unable to establish connection with the required service
92Request processing date has expired

Query Payment

This allow you to query the status of a iQR payment you requested initially.

An access token must be provided for all requests

Url

GET  https://isw-psb-test-sc-cqr-transaction-service.azuremicroservices.io/api/v1/pay/query?paymentId=1

Headers

Authorization <Bearer Token>

Response Body

{
    "cqrId": "260174378964208605",
    "aggregatorId": "MX*****",
    "customerId": "2348154249743",
    "transactionReference": "15574f60-d62a-4019-9262-5fb0ae4bd358",
    "consumerMobile": "2348154249743",
    "currencyCode": "566",
    "amount": 20000,
    "channel": "WEB",
    "paymentType": "CASHOUT",
    "description": "try again",
    "paymentStatus": "EXPIRED",
    "createdBy": "MX164667",
    "id": 1,
    "responseCode": "92",
    "responseMessage": "Request processing date has expired",
    "createdOn": "2023-11-08T10:21:57",
    "updatedOn": "2023-11-08T10:45:23"
}

Field description

Possible
Payment statusPENDING, REJECT, CANCEL, TIMEOUT, AUTHORIZE, COMPLETED, EXPIRED
responseCodeSee below for response descriptions
responseMessageThe actual description for the failure

Response Code

Response CodeDescription
00Successful
01Payment is pending
02Payment was rejected
03Payment was cancelled
04Payment timed out
05No record was found
06Invalid data supplied e.g iQR - Invalid IQR
07Already exist
91We were unable to establish connection with the required service
92Request processing date has expired
99We are unable to process your request!