Generate Static QR

This API can be used to generate QR code for any user against their mobile number. Also, This API can be used to fetch existing QR code created with us.

What is the QR transaction flow?

Eko’s QR Payment API provides an end-to-end solution from QR code generation to payment collection. The transaction flow is as follows:

  1. Activate your service for QR using Activate Service
  2. The user provides their mobile number that is the sender_id against which their QR code is generated.
    NOTE - For each sender_id, only one QR string can be generated.
  3. If any payment is made against the QR code, the amount is reflected in the partner's wallet.
  4. After the transaction, the callback request with the transaction details is sent to the partner. The transaction status of a particular transaction can be checked using the transaction enquiry API.

For setting up the callback/webhook, kindly share the URL with the Eko Code on [email protected]

Callback response:

{
    "tx_status": 0,
    "amount": 400.0,
    "tds": 0.0,
    "txstatus_desc": "Success",
    "customer_vpa": "abcde@okhdfcbank",
    "fee": 0.0,
    "gst": 0.0,
    "tid": 2886142533,
    "client_ref_id": "cust_MAQHG5z2g0k9FK",
    "old_tx_status": 2,
    "partners_commision": 0.0,
    "service_code": "27",
    "old_tx_status_desc": "Initiated",
    "bank_ref_num": "313196224563",
    "timestamp": "2023-07-06 13:11:45"
}

📘

To cross-check the QR code that was used for a transaction, check if the client_ref_id in the callback matches the utility_acc_no in the generated QR. If they are the same, you've identified the QR code used for the transaction.

❗️

QR CALLBACK CHANGES -

As the QR payment is getting settled in T+2 day.
Therefore, those partners who have configured their webhook will be getting callback 2 times.

Once at the time of payment acceptance, they will receive the payload as below.

{
"tx_status": 5,
"amount": 21000,
"tds": 0,
"txstatus_desc": "Payment Initiated",
"fee": 7.08,
"gst": 1.08,
"tid": 3251640145,
"client_ref_id": "cust_OP4pC3SsrcKk8R",
"old_tx_status": 2,
"partners_commision": 0,
"service_code": "27",
"old_tx_status_desc": "Initiated",
"bank_ref_num": "418662185728",
"timestamp": "2024-07-04 11:10:37"
}

And when the payment is credited then they will receive the payload as below.

{
"tx_status": 0,
"amount": 300,
"tds": 0,
"txstatus_desc": "Success",
"fee": 4.72,
"gst": 0.72,
"tid": 3251569095,
"client_ref_id": "cust_ODZBaalmGJjU4w",
"old_tx_status": 5,
"partners_commision": 0,
"service_code": "27",
"old_tx_status_desc": "Payment Initiated",
"bank_ref_num": "418531429480",
"timestamp": "2024-07-03 23:59:16"
}

👍

Please note that we set a common callback for QR, CMS, Payout and DMT

Response Values

ValuesStatus
0INACTIVE
1ACTIVE
2QR_ACTIVE
3QR_INACTIVE

Response Codes

ERROR CODESMEANINGSOLUTION
403ForbiddenRegenerate your secret key and
timestamp or check if your service is activated or not
500Internal Server ErrorCheck if your request url is correct or
the parameters you're passing is correct
according to the parameters mentioned above
415Unsupported Media TypeRe-check the content/type of the request body.

Error String

#Message
1Failed to create a customer ID
2Customer ID is null
3Failed to generate QR

📘

For generation of secret-key and secret-key-timestamp, refer to - Authentication

❗️

NOTE

Kindly make a payment amounting more than 3 rupees.

Language