Zaakpay Custom Checkout

Transact U: Server To Server

Zaakpay Custom Checkout Integration allows merchant Hosted Checkout page. It gives freedom to merchants to collect and handle customer’s payment information through a web/app interface customised as per their requirements.
The merchant has their own UI and makes transactions on his website without any redirection to Zaakpay hosted Checkout page.

Environment details

883

Transact U API

Purpose: This API can be used to initiate a transaction. Using this API, the merchant's server posts transaction(i.e. card/bank) data to Zaakpay’s server. Zaakpay’s server responds back with the bank's url and parameter.

  • Request Type: POST
  • Endpoint: /transactU?v=8
curl --location --request POST 'https://[ENV].zaakpay.com/transactU?v=8' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: JSESSIONID=6CCB374F61ACE749B19820C080384093; JSESSIONID=D84C9408EC331E970C5304B121C5720D; JSESSIONID=73D39A7F25B0DCCAB1C1DEDE998CBD30' \
--data-urlencode 'data={"merchantIdentifier":"[YOUR_MERCHANT_IDENTIFIER]","encryptionKeyId":"[Merchants Zaakpay Encryption Key. Only in case of Card.]","showMobile":"true","mode":"0","orderDetail":{"orderId":"[UNIQUE_TRANSACTION_ORDERID]","amount":"[TRANSACTION AMOUNT]","currency":"INR","productDescription":"[ADD PRODUCT DESCRIPTION]","email":"[USERS_EMAILID]"},"paymentInstrument":{"paymentMode":"[Mode of Payment NB,CARD,WALLET,UPI]","card":{"encrypted_pan":"[Encrypted Card No. Only in case of Card.]","nameoncard":"[Name of Card. Only in case of Card.]","encryptedcvv":"[Encrypted Card CVV. Only in case of Card.]","encrypted_expiry_month":"[Encrypted Expiry Month. Only in case of Card.]","encrypted_expiry_year":"[Encrypted Expiry Year. Only in case of Card.]"},"netbanking":{"bankid":"[Provide VPA or BankId, Only in case of UPI Collect/NB.]"}}}' \
--data-urlencode 'checksum=[CALCULATED_CHECKSUM]'

Request Attributes

These are the Request Attributes of Zaakpay Payment Gateway.

Fields DataType Mandatory Description
amount String Y Value in paisa. Default Transaction amount min limit is 100 paisa and max is 200000 paisa. Increase or decrease the transaction limit from Zaakpay dashboard. Developers tab > "Customize your Integration" >"Transaction limits".
merchantIdentifier String Y Zaakpay’s unique alphanumeric merchant identifier. You can get it from Zaakpay dashboard.
orderId String Y It must be unique transaction identifier, Max limit is 20 alphanumeric characters.
returnUrl String N This Url is where you want Zaakpay to post the response, must be the domain (or sub-domain of it). You can save it under URLs tab. Developers tab > "Customize your Integration" >"URLs".
email String Y Valid email address of the buyer. E.g. [email protected]
address String N It is a street, part of billing address. Max limit is 100 alphanumeric. E.g. B-34, Priyadarshni Society, Dumna Road
city String N It is a city of buyer, part of billing address. Max and min limit is 30 and 3 characters respectively. E.g. New Delhi
state String N It is a state of buyer, part of billing address. Max and min limit is 30 and 3 characters respectively. E.g. Delhi
country String N It is a buyer's country. E.g. India
pincode String N It is a buyer’s pin/zip code, part of billing address. It can have Numbers, Spaces and Hyphens (-) only. E.g,. 110001
productDescription String Y Text description of what you are selling. At least 1 product description is mandatory to show in the bill on payment page. free text alphanumeric 100 max. E.g. name of book.
showMobile String N false: We show the full-fledged version Unconditionally. DETECT: We do detection of the user Agent of the browser from which the request is sent& route accordingly. true: We show the mobile page unconditionally. If it is missing/not sent: Same as DETECT (i.e. We do detection at our end ).
mode String N 1 digit only, Numeric. For e.g. 1 = Domain check, 0=Domain Check Skip
paymentMode String Y Possible Values: card,debit,credit,wallet,UPI,UPIAPP(for UPI intent) and netbanking.
bankid String Y. For NB & UPI Transaction For Net Banking, ID of selected bank, as SBI. For UPI, vpa address like 9876543210@upi
encrypted_pan String Y. For Card Transaction Encrypted Card Number
nameoncard String Y. For Card Transaction Card Holder Name
encryptedcvv String Y. For Card Transaction Encrypted CVV of card
encrypted_expiry_month String Y. For Card Transaction Encrypted Expiry Month of card
encrypted_expiry_year String Y. For Card Transaction Encrypted Expiry year of card
saveCard String N Flag to save card. true if user wants to save his card at Zaakpay
cardId String N Id assigned by Zaakpay to a saved card
encryptionKeyId String Y. For Card Transaction Id of Merchant’s Public key as signed by Zaakpay. You can generate it from Zaakapy dashboard.
merchantCardRefId String N A unique id assigned by to a card saved at Zaakpay merchant
sendOtp String N In Zip Paylater, True/False should be pass. It will take "False", if you don't pass.
checksum String Y To be calculated on above parameters using HMAC SHA 256

👍

Have you generated the key?

Please follow steps below to Generate encryption and public keys:

Note: The card details need to be encrypted and sent across the https POST parameters. This encryption can be done by the help of RSA encryption.

Response Attributes

These are the Response Attributes of Zaakpay Payment Gateway.

Fields Description
merchantIdentifier Zaakpay’s unique alphanumeric merchant identifier.
orderId It is a unique transaction identifier for merchant.
amount Transaction Amount.
productDescription Text description of what you send in the request.
responseCode It is a max 3 digits Zaakpay’s Response code. E.g. Response code 100 is for Successful transaction.
responseDescription It is a description of Zaakpay’s Response code. E.g. Description of Response code 100 is “The transaction was completed successfully”.
paymentMode Mode of the Payment
cardToken Masked card number
cardId Unique token of card if user had chosen to save card.
cardScheme Visa, MasterCard etc.
bank Name of bank for card
cardHashId Unique id for each card number used in transaction.
paymentMethod Payment Method ID for Card and Net Banking transactions. For Card transaction, payment Method ID starts with C and N for Net Banking. It is alphanumeric value with max length 6. First letter is C or N, followed by 5 digits max.

Checksum Calculation

For both integrity & data-authenticity verification before sending data to the API, you need to calculate a checksum of all the data that you send to Zaakpay.
We use an algorithm HMAC SHA- 256 to calculate the checksum of ALL data that is posted to the API. We require data to be posted to Zaakpay server in NVP (Name-Value Pairs) format.

To calculate the checksum please follow the process below:

  • Calculate the checksum using the HMAC SHA-256 algorithm using the string as data parameter and your generated secret key.
  • The resulting checksum calculated should be posted to the Zaakpay API along with other data.

For reference, Please find the Request, Checksum String and the Generated Checksum based on the request.

Card Request

data={"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","encryptionKeyId":"YPQH44top9yNaY4","merchantIpAddress":"127.0.0.0","showMobile":"true","mode":"0","returnUrl":"http://127.0.0.0:8080/api/automation/v1/validateChecksum?v=7","orderDetail":{"orderId":"ZP_staging_1234098765","amount":"1000","currency":"INR","purpose":"1","productDescription":"Test_Card_Transaction","email":"[email protected]","txnDate":"2021-10-18"},"paymentInstrument":{"paymentMode":"card","card":{"encrypted_pan":"ZIELDi7yDpepfoUguuQ8LoxFnJiF9ptuVt17vcFiG/eL8rZ7FqeVj8V5B7O1s5uk6b+3QobMVawQ\nD3ip81MQIl+NsIgC2KHmkGiUzHzlS/TppENrefWnOKEQDKYU1yonIhSfFL9TZittoXwvnfn0TaIY\nNk6oPpFcQsA4KEC4nQCwiYXgbGzVFhKtdlRtI4nWCrXvEr9KerG3alRGysIRfCKxIiB2GRD3O4hM\nXgZExTTUWs37Dy73unqLfQgwyfdG5qpMAyMNN8xrU1dM/EXiGWpe9xYO0zfN0Mqs4aA+WFRjS5I8\nUXfcANA77ShYrv1eEsatSsY6x9248BnE0+eDpQ==","nameoncard":"Test Jagat","encryptedcvv":"LPVY/wl4Fy6FxiyyIEjILBUBtCMVQyBagcYgFqYce0aTUTv8PEo5OJAd3Qtq/RzwicZ6+mj1R6v/\nj8rWrPkFrob7SkbZkJ0TRweD6Pxh/nHDjG6eKeBnjhGijf/tOuKs61PCIfKGroK63KPOP6rohc8y\n75cdFt+ItTeRi03PGDjI5WUdhOLB4wtw7v+ztWLZksQ9EAu4H8P29CO6FlQMepAPV6xEtdud4uly\nuJRjSRGKtcSVfWguBe7uWIvpmD+bvlTt2rv+HmKG2Fegaxt4XgKhVd3wEHNiF7RZIzIPo826efuK\nXENmj+LRxaQIoba1eD0rsQ9AwVKN+qfnpS4Rfw==","encrypted_expiry_month":"HPbVqDZ5Ka6G9UNTw6Hffq/4SipvzfC7CKdY6287I3ECSYxUG5NVPr7L6hOVj8vdq2nTpk7TuYzi\nKAvshZo0/VWQ0bJboKlSu8Pu51YptAazUFKWgPNQAE/h3mEhrNIkj6z0EL9oGCE2eEdtSfuCkh2F\nI9OYIs60iPxs9DoFAQjUBdtmxde9ToASPV6FdtoAfBMar7Oo4hHTvJANoCrRO2EaeqJ9f4yjFxlc\nDr6BQ2S3avnPOf0SFviiVrpeMFM5LgL3k7xelUhOT0mJexn4m6gyj65gJ+eKIQcDKRs4BJGsY+kK\n/YF7s7tvT3kMAfQ8zkvwzdt2XDRqa3LARKJMaA==","encrypted_expiry_year":"hLKmluu9mZtie6VjizrC0gKZU8/I3jRR0EbSpaPZFoLO9JAvuARtIfAFbqQSpsfFqjVgkLoZechH\nGELjapDdi0l8jtUSQBAneJF7loS80/y8pSTG0lSFhUVgmUAhANQR3SSTHMi5+uuFAbpDFiW/al/B\nr0MhfUaDohW3zr6SzT699hKSxYZmiRzGThVmdOMSzBulJn2XRTnd1F/KT0+aS4QZkiB2I6xwquaG\nHCSGCUKu10Gf7rlLBYrixsBcixIczoqfG8tEPDyI77pLurKVP0ORHiT5LVsP6wcqBejQ/bVIfotS\nqWmobMaipM7V/8+R0OG4AJoGOaePkclfHzF6Hg==","saveCard":"false"}}}
{"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","encryptionKeyId":"YPQH44top9yNaY4","merchantIpAddress":"127.0.0.0","showMobile":"true","mode":"0","returnUrl":"http://127.0.0.0:8080/api/automation/v1/validateChecksum?v=7","orderDetail":{"orderId":"ZP_staging_1234098765","amount":"1000","currency":"INR","purpose":"1","productDescription":"Test_Card_Transaction","email":"[email protected]","txnDate":"2021-10-18"},"paymentInstrument":{"paymentMode":"card","card":{"encrypted_pan":"ZIELDi7yDpepfoUguuQ8LoxFnJiF9ptuVt17vcFiG/eL8rZ7FqeVj8V5B7O1s5uk6b+3QobMVawQ\nD3ip81MQIl+NsIgC2KHmkGiUzHzlS/TppENrefWnOKEQDKYU1yonIhSfFL9TZittoXwvnfn0TaIY\nNk6oPpFcQsA4KEC4nQCwiYXgbGzVFhKtdlRtI4nWCrXvEr9KerG3alRGysIRfCKxIiB2GRD3O4hM\nXgZExTTUWs37Dy73unqLfQgwyfdG5qpMAyMNN8xrU1dM/EXiGWpe9xYO0zfN0Mqs4aA+WFRjS5I8\nUXfcANA77ShYrv1eEsatSsY6x9248BnE0+eDpQ==","nameoncard":"Test Jagat","encryptedcvv":"LPVY/wl4Fy6FxiyyIEjILBUBtCMVQyBagcYgFqYce0aTUTv8PEo5OJAd3Qtq/RzwicZ6+mj1R6v/\nj8rWrPkFrob7SkbZkJ0TRweD6Pxh/nHDjG6eKeBnjhGijf/tOuKs61PCIfKGroK63KPOP6rohc8y\n75cdFt+ItTeRi03PGDjI5WUdhOLB4wtw7v+ztWLZksQ9EAu4H8P29CO6FlQMepAPV6xEtdud4uly\nuJRjSRGKtcSVfWguBe7uWIvpmD+bvlTt2rv+HmKG2Fegaxt4XgKhVd3wEHNiF7RZIzIPo826efuK\nXENmj+LRxaQIoba1eD0rsQ9AwVKN+qfnpS4Rfw==","encrypted_expiry_month":"HPbVqDZ5Ka6G9UNTw6Hffq/4SipvzfC7CKdY6287I3ECSYxUG5NVPr7L6hOVj8vdq2nTpk7TuYzi\nKAvshZo0/VWQ0bJboKlSu8Pu51YptAazUFKWgPNQAE/h3mEhrNIkj6z0EL9oGCE2eEdtSfuCkh2F\nI9OYIs60iPxs9DoFAQjUBdtmxde9ToASPV6FdtoAfBMar7Oo4hHTvJANoCrRO2EaeqJ9f4yjFxlc\nDr6BQ2S3avnPOf0SFviiVrpeMFM5LgL3k7xelUhOT0mJexn4m6gyj65gJ+eKIQcDKRs4BJGsY+kK\n/YF7s7tvT3kMAfQ8zkvwzdt2XDRqa3LARKJMaA==","encrypted_expiry_year":"hLKmluu9mZtie6VjizrC0gKZU8/I3jRR0EbSpaPZFoLO9JAvuARtIfAFbqQSpsfFqjVgkLoZechH\nGELjapDdi0l8jtUSQBAneJF7loS80/y8pSTG0lSFhUVgmUAhANQR3SSTHMi5+uuFAbpDFiW/al/B\nr0MhfUaDohW3zr6SzT699hKSxYZmiRzGThVmdOMSzBulJn2XRTnd1F/KT0+aS4QZkiB2I6xwquaG\nHCSGCUKu10Gf7rlLBYrixsBcixIczoqfG8tEPDyI77pLurKVP0ORHiT5LVsP6wcqBejQ/bVIfotS\nqWmobMaipM7V/8+R0OG4AJoGOaePkclfHzF6Hg==","saveCard":"false"}}}
f38f9da76cabb6359461604e2735cc9809937e28ddf9fd6db080d71af88952b2

UPI Intent Request

data={"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","showMobile": "true","mode":"0","returnUrl":"https://zaakstaging.zaakpay.com/api/automation/v1/payment/response","orderDetail": {"orderId": "ZP-Stag-15841047222321","amount": "100","currency": "INR","productDescription": "Test Automation","email":"[email protected]","phone": "9999999999","extra1": "udf1","extra2":"udf2","extra3": "udf3","extra4":"udf4","extra5": "udf5","productDescription": "pd","product1Description": "pd1","product2Description": "pd2","product3Description": "pd3","product4Description": "pd4","firstName": "Test_Fir","lastName":"Test_Las"},"paymentInstrument":{"paymentMode":"UPIAPP","netbanking":{"bankid":""}},"billingAddress": {"city":"Gurgaon"},"shippingAddress": {"city":"Gurgaon"}}
{"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","showMobile": "true","mode":"0","returnUrl":"https://zaakstaging.zaakpay.com/api/automation/v1/payment/response","orderDetail": {"orderId": "ZP-Stag-15841047222321","amount": "100","currency": "INR","productDescription": "Test Automation","email":"[email protected]","phone": "9999999999","extra1": "udf1","extra2":"udf2","extra3": "udf3","extra4":"udf4","extra5": "udf5","productDescription": "pd","product1Description": "pd1","product2Description": "pd2","product3Description": "pd3","product4Description": "pd4","firstName": "Test_Fir","lastName":"Test_Las"},"paymentInstrument":{"paymentMode":"UPIAPP","netbanking":{"bankid":""}},"billingAddress": {"city":"Gurgaon"},"shippingAddress": {"city":"Gurgaon"}}
ca5bc38b94dd9b83996f2b56951a6fd9699c55327ef8b0fa60454a926b3c2c20

Wallet Request

data={"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","showMobile":"true","mode":"0","returnUrl":"https://zaakstaging.zaakpay.com/api/automation/v1/payment/response","orderDetail":{"orderId":"ZP-Stag-158506146198927744","amount":"100","currency":"INR","purpose":"1","productDescription":"Test Automation","email":"[email protected]","phone":"8894451510","txnDate":"2021-10-18"},"paymentInstrument":{"paymentMode":"wallet","netbanking":{"bankid":"MW"}}}
{"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","showMobile":"true","mode":"0","returnUrl":"https://zaakstaging.zaakpay.com/api/automation/v1/payment/response","orderDetail":{"orderId":"ZP-Stag-158506146198927744","amount":"100","currency":"INR","purpose":"1","productDescription":"Test Automation","email":"[email protected]","phone":"8894451510","txnDate":"2021-10-18"},"paymentInstrument":{"paymentMode":"wallet","netbanking":{"bankid":"MW"}}}
088164e5f4c2c589b66aead5a83ce17c1b60efd52436e91d118c102b232c4959

Similarly, You can generate the checksum for other payment mode based on the request.

Sample Request & Response

For reference, below are the sample CURL request and Responses of various Payment modes . It takes all required attributes to initiate a transaction.

Payment Mode: Card

The Public key (Check your Zaakpay Dashboard) is stored, and used to encrypt the card details using RSA algorithm.
The card number, cvv, and expiry need to be encrypted using the same format before sending to
Zaakpay.

curl --location --request POST 'https://zaakstaging.zaakpay.com/transactU?v=8' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: JSESSIONID=6CCB374F61ACE749B19820C080384093; JSESSIONID=D84C9408EC331E970C5304B121C5720D' \
--data-urlencode 'data={"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","encryptionKeyId":"YPQH44top9yNaY4","merchantIpAddress":"127.0.0.0","showMobile":"true","mode":"0","returnUrl":"http://127.0.0.0:8080/api/automation/v1/validateChecksum?v=7","orderDetail":{"orderId":"ZP_staging_1234098765","amount":"1000","currency":"INR","purpose":"1","productDescription":"Test_Card_Transaction","email":"[email protected]","txnDate":"2021-10-18"},"paymentInstrument":{"paymentMode":"card","card":{"encrypted_pan":"ZIELDi7yDpepfoUguuQ8LoxFnJiF9ptuVt17vcFiG/eL8rZ7FqeVj8V5B7O1s5uk6b+3QobMVawQ\nD3ip81MQIl+NsIgC2KHmkGiUzHzlS/TppENrefWnOKEQDKYU1yonIhSfFL9TZittoXwvnfn0TaIY\nNk6oPpFcQsA4KEC4nQCwiYXgbGzVFhKtdlRtI4nWCrXvEr9KerG3alRGysIRfCKxIiB2GRD3O4hM\nXgZExTTUWs37Dy73unqLfQgwyfdG5qpMAyMNN8xrU1dM/EXiGWpe9xYO0zfN0Mqs4aA+WFRjS5I8\nUXfcANA77ShYrv1eEsatSsY6x9248BnE0+eDpQ==","nameoncard":"Test Jagat","encryptedcvv":"LPVY/wl4Fy6FxiyyIEjILBUBtCMVQyBagcYgFqYce0aTUTv8PEo5OJAd3Qtq/RzwicZ6+mj1R6v/\nj8rWrPkFrob7SkbZkJ0TRweD6Pxh/nHDjG6eKeBnjhGijf/tOuKs61PCIfKGroK63KPOP6rohc8y\n75cdFt+ItTeRi03PGDjI5WUdhOLB4wtw7v+ztWLZksQ9EAu4H8P29CO6FlQMepAPV6xEtdud4uly\nuJRjSRGKtcSVfWguBe7uWIvpmD+bvlTt2rv+HmKG2Fegaxt4XgKhVd3wEHNiF7RZIzIPo826efuK\nXENmj+LRxaQIoba1eD0rsQ9AwVKN+qfnpS4Rfw==","encrypted_expiry_month":"HPbVqDZ5Ka6G9UNTw6Hffq/4SipvzfC7CKdY6287I3ECSYxUG5NVPr7L6hOVj8vdq2nTpk7TuYzi\nKAvshZo0/VWQ0bJboKlSu8Pu51YptAazUFKWgPNQAE/h3mEhrNIkj6z0EL9oGCE2eEdtSfuCkh2F\nI9OYIs60iPxs9DoFAQjUBdtmxde9ToASPV6FdtoAfBMar7Oo4hHTvJANoCrRO2EaeqJ9f4yjFxlc\nDr6BQ2S3avnPOf0SFviiVrpeMFM5LgL3k7xelUhOT0mJexn4m6gyj65gJ+eKIQcDKRs4BJGsY+kK\n/YF7s7tvT3kMAfQ8zkvwzdt2XDRqa3LARKJMaA==","encrypted_expiry_year":"hLKmluu9mZtie6VjizrC0gKZU8/I3jRR0EbSpaPZFoLO9JAvuARtIfAFbqQSpsfFqjVgkLoZechH\nGELjapDdi0l8jtUSQBAneJF7loS80/y8pSTG0lSFhUVgmUAhANQR3SSTHMi5+uuFAbpDFiW/al/B\nr0MhfUaDohW3zr6SzT699hKSxYZmiRzGThVmdOMSzBulJn2XRTnd1F/KT0+aS4QZkiB2I6xwquaG\nHCSGCUKu10Gf7rlLBYrixsBcixIczoqfG8tEPDyI77pLurKVP0ORHiT5LVsP6wcqBejQ/bVIfotS\nqWmobMaipM7V/8+R0OG4AJoGOaePkclfHzF6Hg==","saveCard":"false"}}}' \
--data-urlencode 'checksum=f38f9da76cabb6359461604e2735cc9809937e28ddf9fd6db080d71af88952b2'

If redirect required for card

If 2 Factor Authentication(FA) is enabled for the card, so browser redirection is required to the bank’s 2FA page. In such cases, "doRedirect":"true", You need to post bankPostData to the postUrl that you have received from the Initial response.

{
    "orderDetail": {
        "orderId": "ZP_staging_1234098765",
        "amount": "1000",
        "currency": "INR",
        "productDescription": "Test_Card_Transaction",
        "email": "[email protected]",
        "txnDate": "2021-10-18",
        "purpose": "1"
    },
    "responseCode": "208",
    "responseDescription": "Transaction in Processing state.",
    "doRedirect": "true",
    "paymentInstrument": {
        "paymentMode": "Debit Card",
        "card": {
            "cardToken": "4012 XXXX XXXX 1112",
            "cardScheme": "Visa",
            "first4": "4012",
            "last4": "1112",
            "bank": "HDFC",
            "cardHashId": "CH373",
            "paymentMethod": "401200",
            "timePeriod": 0
        }
    },
    "postUrl": "https://acsuat.fssnet.co.in/acsauthservernew/HDFC/V/pareq.htm",
    "bankPostData": {
        "MD": "700202165636717490",
        "PaReq": "eJxVUttygjAQ/ZUM7yUkIFpnieN1tK03RGf0DWMG6QhoAC9/30S0tm/n7G7O7p4NtK7JAZ2FzOMs9QxiWgYSKc92cRp5xjIYvDWMFoNgL4XoLQQvpWAwFnkeRgLFO89Y9f3+nFqUuDXXtWmDOsQ2GMzavjgxeAgzpWtSwE+qFCTfh2nBIOSnzmjCHNumdQfwg0Ii5KjHSF09qiCkYSLYcLoI+j0U+O3JbOoH7S+06qxXCCHA9zzwrEwLeWN2zQX8JFDKA9sXxTFvYny5XMwoy6KDMHmWANY5wK+BZqVGudK6xjuWLij/SDbRmW+Kz6k43M7RZRSX39vB0gOsK2AXFoJpB4hFGsh6bzpW064BvschTPQQzM+JZdYttWDF4ajbtCtCLJ35GwFltFR3eC7yZCCuxywVqkIZ84sBv4buDrWnvFCW4fci6o1LZ0/DFW8E227Yd2dUJmQ997TT9yKtGCuPqE0qSU0Aaxn8OCJ+3Fuhf//gB70Qutk=",
        "TermUrl": "https://zaakstaging.zaakpay.com/hdfctermurl.html"
    },
    "paymentMode": "Debit Card"
}

If redirect not required and transaction is complete

For cards not enabled for 2FA, transaction can be completed without browser redirection. For those cards, this will be the final transaction response.

{
  "orderDetail": {
    "orderId": "ZP-TEST-16146869601245678",
    "amount": "100",
    "currency": "INR",
    "productDescription": "Zaakpay subscription fee",
    "email": "[email protected]",
    "phone": "9999999999"
  },
  "responseCode": "100",
  "responseDescription": "The transaction was completed successfully.",
  "doRedirect": "false",
  "paymentInstrument": {
    "paymentMode": "Debit Card",
    "card": {
      "cardToken": "4012 XXXX XXXX 1881",
      "cardScheme": "Visa",
      "first4": "4012",
      "last4": "1112",
      "bank": "",
      "cardHashId": "CH373",
      "paymentMethod": "401200"
    }
  },
  "paymentMode": "Debit Card"
}

Payment Mode: Net Banking

For Net Banking, browser redirect is always required.

curl --location --request POST 'https://api.zaakpay.com/transactU?v=8' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: JSESSIONID=3B028D7A7E5AC2734E6CB6E7F08A3360.11.36; JSESSIONID=E48E7B54B44BE9F354E459005700841A.11.36; JSESSIONID=6448DEC474A70821A68151D09902C249.11.36; JSESSIONID=2D65785AF03A33D19BFCF64A2AF4AEA5; JSESSIONID=7328E195FF523D3F97E1F45EC99555A5.11.36' \
--data-urlencode 'data={"merchantIdentifier":"[YOUR_MERCHANT_IDENTIFIER]","encryptionKeyId":"","showMobile":"true","mode":"0","returnUrl":"[YOUR_REDIRECT_URL]","orderDetail":{"orderId":"[UNIQUE_TRANSACTION_ORDERID]","amount":1000,"currency":"INR","productDescription":"Mobikwik_Money","email":"[USERS_EMAILID]","phone":"9999999999"},"paymentInstrument":{"paymentMode":"netbanking","netbanking":{"bankid":"[NET_BANKING_BANKID]"}}}' \
--data-urlencode 'checksum=[CALCULATED_CHECKSUM]'

Bank's Page Redirection
The key-value pairs contained in bankPostData are the parameters to be Posted to bank url mentioned in postUrl parameter. For Instance, Taking a Card 2FA Redirection from the above Initial Response of Card Request.

<!DOCTYPE html>
<html>
   <body onload= "document.forms[0].submit()">
      <h1>Redirection to Bank's Page</h1>
      <form action="https://acsuat.fssnet.co.in/acsauthservernew/HDFC/V/pareq.htm">
         <input type=hidden name= "MD" id= "MD" value= "700202165636717490">
         <input type=hidden name= "PaReq" id= "PaReq" value= "eJxVUttygjAQ/ZUM7yUkIFpnieN1tK03RGf0DWMG6QhoAC9/30S0tm/n7G7O7p4NtK7JAZ2FzOMs9QxiWgYSKc92cRp5xjIYvDWMFoNgL4XoLQQvpWAwFnkeRgLFO89Y9f3+nFqUuDXXtWmDOsQ2GMzavjgxeAgzpWtSwE+qFCTfh2nBIOSnzmjCHNumdQfwg0Ii5KjHSF09qiCkYSLYcLoI+j0U+O3JbOoH7S+06qxXCCHA9zzwrEwLeWN2zQX8JFDKA9sXxTFvYny5XMwoy6KDMHmWANY5wK+BZqVGudK6xjuWLij/SDbRmW+Kz6k43M7RZRSX39vB0gOsK2AXFoJpB4hFGsh6bzpW064BvschTPQQzM+JZdYttWDF4ajbtCtCLJ35GwFltFR3eC7yZCCuxywVqkIZ84sBv4buDrWnvFCW4fci6o1LZ0/DFW8E227Yd2dUJmQ997TT9yKtGCuPqE0qSU0Aaxn8OCJ+3Fuhf//gB70Qutk=">
         <input type=hidden name= "TermUrl" id= "TermUrl" value= "https://zaakstaging.zaakpay.com/hdfctermurl.html">
         <input type="submit" value="Submit">
      </form>
   </body>
</html>

🚧

Note:

After receiving JSON response in S2S call to Transact API, if “doRedirect” is true, merchant needs to POST all bank parameters mentioned in “bankPostData” to url mentioned in “postUrl”. This will take user to bank’s 2FA/Netbanking page.

Payment Mode: UPI

For reference, UPI Collect Curl request to initiate collect request is given below.
For UPI Collect, the timer page will be shown by Merchant based on provided timeout in response. The merchant needs to hit our check API for that time interval until he receives success/failure in the response.
After receiving the response, the Merchant needs to redirect the user to the relevant page.

curl --location --request POST 'https://api.zaakpay.com/transactU?v=8' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: JSESSIONID=CD982B57935E84BA7D70996C618C0C69.11.52; JSESSIONID=AE2704BE6746B7DC1B99CB4C7F9E9A06.11.36; JSESSIONID=AE2704BE6746B7DC1B99CB4C7F9E9A06.11.36; JSESSIONID=69CCAE16E0983DC36355B6307ACD196C.11.59' \
--data-urlencode 'data={"merchantIdentifier":"[YOUR_MERCHANT_IDENTIFIER]","merchantIpAddress":"[USERS_DEVICE_IP]","showMobile":"true","mode":"0","returnUrl":"[YOUR_REDIRECT_URL]","orderDetail":{"orderId":"[UNIQUE_TRANSACTION_ORDERID]","amount":"2000","currency":"INR","purpose":"1","productDescription":"Upi P2m Collect","email":"[USERS_EMAILID]","txnDate":"[TXN_DATE YYYY-MM-DD]"},"billingAddress":{"first name":"Test_FirName","last name":"Test_LasName","address":"sector 56","city":"Gurugram","state":"Haryana","country":"India","pincode":"122003","Phone Number":"9999999999"},"shippingAddress":{"address":"sector 54","city":"Gurugram","state":"Haryana","country":"India","pincode":"122003"},"paymentInstrument":{"paymentMode":"UPI","netbanking":{"bankid":"[USERS_VPA_OR_UPIID]"}},"debitorcredit":"upi"}' \
--data-urlencode 'checksum=[CALCULATED_CHECKSUM]'
curl --location --request POST 'https://zaakstaging.zaakpay.com/transactU?v=8' \
--header 'cache-control: no-cache' \
--header 'content-type: application/x-www-form-urlencoded' \
--header 'postman-token: c5b737cd-2f7a-0f85-c6cd-eb36700fd92f' \
--header 'Cookie: JSESSIONID=4991D5810F65F0DAFC066FA155850005.11.36; JSESSIONID=6E26E90488341CE1AA7145F99D1811C3.11.50; JSESSIONID=68740F5B04A702074533A9386D6E1A44; JSESSIONID=8F0FE454EBE5696295522B97C1FD43AE' \
--data-urlencode 'data={"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","showMobile": "true","mode":"0","returnUrl":"https://zaakstaging.zaakpay.com/api/automation/v1/payment/response","orderDetail": {"orderId": "ZP-Stag-15841047222321","amount": "100","currency": "INR","productDescription": "Test Automation","email":"[email protected]","phone": "9999999999","extra1": "udf1","extra2":"udf2","extra3": "udf3","extra4":"udf4","extra5": "udf5","productDescription": "pd","product1Description": "pd1","product2Description": "pd2","product3Description": "pd3","product4Description": "pd4","firstName": "Test_Fir","lastName":"Test_Las"},"paymentInstrument":{"paymentMode":"UPIAPP","netbanking":{"bankid":""}},"billingAddress": {"city":"Gurgaon"},"shippingAddress": {"city":"Gurgaon"}}' \
--data-urlencode 'checksum=ca5bc38b94dd9b83996f2b56951a6fd9699c55327ef8b0fa60454a926b3c2c20'

For UPI Intent, use URLs that we send in bankPostData based on the Mobile device. It will open all the intent options and user can choose any of the options to do the payments. You can use these Urls to open Intent.

{
    "orderDetail": {
        "orderId": "ZP-Stag-15841047222321",
        "amount": "100",
        "currency": "INR",
        "productDescription": "pd",
        "email": "[email protected]",
        "phone": "9999999999",
        "firstName": "Test_Fir",
        "lastName": "Test_Las",
        "product1Description": "pd1",
        "product2Description": "pd2",
        "product3Description": "pd3",
        "product4Description": "pd4",
        "extra1": "udf1",
        "extra2": "udf2",
        "extra3": "udf3",
        "extra4": "udf4",
        "extra5": "udf5"
    },
    "responseCode": "208",
    "responseDescription": "Transaction in Processing state.",
    "doRedirect": "true",
    "paymentInstrument": {
        "paymentMode": "UPI",
        "netbanking": {
            "bankid": ""
        }
    },
    "bankPostData": {
        "androidIntentUrl": "upi://pay?pa=mobikwik@appl&pn=Convenience+Test&tr=ZP5cea4576efa97&am=1.01&cu=INR&mc=0000",
        "mbkIntentIosUrl": "mobikwik://upi/pay?pa=mobikwik@appl&pn=Convenience+Test&tr=ZP5cea4576efa97&am=1.01&cu=INR&mc=0000",
        "phonepeIntentIosUrl": "phonepe://pay?pa=mobikwik@appl&pn=Convenience+Test&tr=ZP5cea4576efa97&am=1.01&cu=INR&mc=0000",
        "timeout": "10",
        "gpayIntentIosUrl": "tez://upi/pay?pa=mobikwik@appl&pn=Convenience+Test&tr=ZP5cea4576efa97&am=1.01&cu=INR&mc=0000",
        "txnid": "ZP5cea4576efa97",
        "token": "9mbIrhN/brh4gUz9pq7gXBtLVnclheYiBTMqcNiXUbU=",
        "paytmIntentIosUrl": "paytmmp://upi/pay?pa=mobikwik@appl&pn=Convenience+Test&tr=ZP5cea4576efa97&am=1.01&cu=INR&mc=0000"
    },
    "paymentMode": "UPI"
}

Payment Mode: Wallet

For reference, Hit this Wallet Curl request to initiate transaction.

curl --location --request POST 'https://zaakstaging.zaakpay.com/transactU?v=8' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: JSESSIONID=494010259FE6B2951C6927EDBD4FC575.11.50; JSESSIONID=68740F5B04A702074533A9386D6E1A44' \
--data-urlencode 'data={"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","showMobile":"true","mode":"0","returnUrl":"https://zaakstaging.zaakpay.com/api/automation/v1/payment/response","orderDetail":{"orderId":"ZP-Stag-158506146198927744","amount":"100","currency":"INR","purpose":"1","productDescription":"Test Automation","email":"[email protected]","phone":"8894451510","txnDate":"2021-10-18"},"paymentInstrument":{"paymentMode":"wallet","netbanking":{"bankid":"MW"}}}' \
--data-urlencode 'checksum=088164e5f4c2c589b66aead5a83ce17c1b60efd52436e91d118c102b232c4959'

Once you get the Initial Response, you need to POST all bank parameters mentioned in “bankPostData” to url mentioned in “postUrl”.

{
    "orderDetail": {
        "orderId": "ZP-Stag-158506146198927744",
        "amount": "100",
        "currency": "INR",
        "productDescription": "Test Automation",
        "email": "[email protected]",
        "phone": "8894451510",
        "txnDate": "2021-10-18",
        "purpose": "1"
    },
    "responseCode": "208",
    "responseDescription": "Transaction in Processing state.",
    "doRedirect": "true",
    "paymentInstrument": {
        "paymentMode": "Wallet",
        "netbanking": {
            "bankid": "MW"
        }
    },
    "postUrl": "https://test.mobikwik.com/wallet",
    "bankPostData": {
        "amount": "1.04",
        "redirecturl": "https://zaakstaging.zaakpay.com/mwalletResponse",
        "zaakpayshoppingcontext": "ZP5cea431a5e916",
        "orderid": "ZP5cea431a5e916",
        "merchantname": "COMPANY_NAME_TEST",
        "checksum": "c5cf6191c985f49c80e878102167907f65ceee7e8e6b145ff03225284ea26fb0",
        "mid": "MBK48381",
        "cell": "8894451510",
        "showMobile": "true",
        "email": "[email protected]"
    },
    "paymentMode": "Wallet"
}

Payment Mode: Zip Paylater

For Reference, To initiate the Zip Paylater transaction you can hit the Sample Curl Request as given below.
For that, Merchant Identifier, paymentMode as mbkzippaylater and Registered Mobile No. needs to be passed in the bankid along with other attributes.

For the First time User, Below steps need to be followed for ZIP Paylater Transaction irrespective of Tokenized and sendOtp value.

    1. Hit TransactU API along with required attributes.
    1. Send / Resend OTP
    1. Verify OTP
curl --location --request POST 'https://[ENV].zaakpay.com/transactU?v=8' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'data={"merchantIdentifier":"[Merchant_Identifier]","showMobile":"true","mode":"0","returnUrl":"[Merchant_Return_URL]","orderDetail":{"orderId":[Merchant_TransactionId],"amount":[Transaction Amount],"currency":"INR","productDescription":"[Product Description]","email":"[Users Email]"},"paymentInstrument":{"paymentMode":"mbkzippaylater","netbanking":{"bankid":"[REGISTERED_MOBILE_NO]"},sendOtp":"[TRUE/FALSE]"}}' \
--data-urlencode 'checksum=[CALCULATED_CHECKSUM]'

Once you hit the API along request Attributes, you will get the Initial Response with responseDescription as "Transaction in Processing state." . In bankPostData you will receive the uniqueRefId which will be used in Send / Resend OTP and Verify OTP.

{
   "orderDetail":{
      "orderId":"PaylaterTransactU12s34",
      "amount":"100",
      "currency":"INR",
      "productDescription":"DFCGVHBJndfgvhbftg jasd",
      "email":"amandeep.kumar@mobikwik",
      "phone":""
   },
   "responseCode":"208",
   "responseDescription":"Transaction in Processing state.",
   "doRedirect":"false",
   "paymentInstrument":{
      "paymentMode":"PAYLATER",
      "netbanking":{
         "bankid":"99100XXXXX"
      },
      "sendOtp":false
   },
   "bankPostData":{
      "uniqueRefId":"gsdhgsgg32bsdbadeb4qbdbsbdd3hb"
   },
   "paymentMode":"PAYLATER"
}
{
   "orderDetail":{
      "orderId":"zipwithgghhjjkhhotp123",
      "amount":"100",
      "currency":"INR",
      "productDescription":"DFCGVHBJndfgvhbftg jasd",
      "email":"amandeep.kumar@mobikwik",
      "phone":""
   },
   "responseCode":"1014",
   "responseDescription":"Number is not Registered",
   "doRedirect":"false",
   "paymentInstrument":{
      "paymentMode":"PAYLATER",
      "netbanking":{
         "bankid":"991001XXXX"
      },
      "sendOtp":true
   },
   "paymentMode":"PAYLATER"
}
{
   "orderDetail":{
      "orderId":"zipwithgghhjjkhhotp123",
      "amount":"100",
      "currency":"INR",
      "productDescription":"DFCGVHBJndfgvhbftg jasd",
      "email":"amandeep.kumar@mobikwik",
      "phone":""
   },
   "responseCode":"1041",
   "responseDescription":"Insufficient Balance!",
   "doRedirect":"false",
   "paymentInstrument":{
      "paymentMode":"PAYLATER",
      "netbanking":{
         "bankid":"9910018XXX"
      },
      "sendOtp":true
   },
   "paymentMode":"PAYLATER"
}

🚧

NOTE

If you are not passing the sendOtp or passing it as false in the request, You need to process the transaction with 2nd Step i.e. Send/Resend OTP API.

If you are passing the sendOtp as True, You can skip the 2nd Step i.e. Send/Resend OTP API and Directly proceed with the 3rd Step i.e. Verify OTP API.

Send/Resend OTP API

In order to process with Zip Transaction, You need to hit the API to send/Resend the OTP on Registered Mobile No.

Request URL: {ENV}/api/otp/transactU/send

Request Type: POST
Endpoint: /api/otp/transactU/send

Request Header

This key will be used to authorize the API request , and merchants can generate API KEY from Zaakpay Dashboard.

Header NameAPI KEY Value
X-API-KEYXXXX8b489284a809b404f5eXXXXXXXX

Sample Request

This is a masked Sample Request having two attributes uniqueRefId and mobileNumber.
Note: You don't need to mask it.

{
"uniqueRefId":"XXXXgsgg32bsdbadeb4qbdbsbdXXXX",
"mobileNumber":"XXX5890XXX"
}

❗️

Validations

  • Mobile number should be same in send OTP API and transactU API.
    • UniqueRefId should be present in redis (TTL-15 min).

Sample Response

These are the Sample Success and Failure Response.

{
   "success": true,
   "message": {
       "code": "200",
       "text": "OTP sent successfully."
   }
}
{
   "success": false,
   "message":{
   	"code": "1043",
   	"text": "Unauthorized!"
    }
}
{
   "success": false,
   "message":{
   	"code": "1042",
   	"text": "Error while sending OTP!"
    }
}

Verify OTP API

In order to complete the Zip Transaction, You need to hit the Verify OTP API to verify the OTP which is generated and sent to User's Registered Mobile No in 2nd Step.

Request URL: {ENV}/api/otp/transactU/verify

Request Type: POST
Endpoint: /api/otp/transactU/verify

Request Header

This key will be used to authorize the API request , and merchants can generate API KEY from Zaakpay Dashboard.

Header NameAPI KEY Value
X-API-KEYXXXX8b489284a809b404f5eXXXXXXXX

Sample Request

This is a Masked Sample Request having three attributes uniqueRefId, mobileNumber and otp.
Note: You don't need to mask it.

curl --location --request POST 'https://[ENV].zaakpay.com/api/otp/transactU/verify' \
--header 'X-API-KEY: [API_KEY]' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=70D1E4CEA89CBCC572A18CD8037FE9ED.11.36' \
--data-raw '{
  "uniqueRefId":"[uniqueRefId_RECEIVED_IN_RESPONSE]",
  "mobile":"[REGISTERED_MOBILE_NO]",
  "otp":"[ENTERED_OTP]"
}
{
 "uniqueRefId":"XXXXsgg32bsdbadeb4qbdbsbdXXXX",
 "mobileNumber":"XXX1026XXX",
 "otp":"123456"
}

Sample Response

These are the Sample Success and Failure Response.

{
   "success":true,
   "data":{
      "statusCode":"100",
      "statusMessage":"The transaction was completed successfully.",
      "redirect":true,
      "pgRedirectData":{
         "postingUrl":"http://localhost:3000/api/v2/mobikwik_pay/confirm",
         "parameters":{
            "checksum":"b9f3cdb7c0e4a845b79cb6f270350a5fef5cb870ec2d95d3d2c6642566b7b71c",
            "cardId":"NA",
            "paymentMode":"PAYLATER",
            "bank":"NA",
            "bankid":"NA",
            "cardToken":"NA",
            "doRedirect":"false",
            "cardScheme":"NA",
            "productDescription":"DFCGVHBJndfgvhbftg jasd",
            "product1Description":"Zaakpay Testing",
            "product2Description":"NA",
            "product3Description":"NA",
            "product4Description":"NA",
            "pgTransId":"ZP5d313ebab2377",
            "pgTransTime":"12/14/2021 10:23:12",
            "orderId":"PaylaterTransactU",
            "responseCode":"100",
            "responseDescription":"The transaction was completed successfully. ",
            "amount":"100",
            "paymentMethod":"Not Found",
            "cardhashid":"NA"
         }
      }
   }
}
{
   "success": false,
   "message":{
   	"code": "1043",
   	"text": "Unauthorized!"
    }
}
{
   "success": false,
   "message": {
       "code": "1016",
       "text": "OTP does not match."
   }
}
{
   "success": false,
   "message":{
   	"code": "1045",
   	"text": "Error while verifying OTP!"
    }
}

👍

Opted Tokenization for Zip Paylater?

If you have opted for Tokenization for Zip Paylater Transaction, You don't need to perform the 2nd and 3rd Step i.e. Send/Resend OTP and Verify OTP API from second time onwards. Transactions will go through and be verified by the Token.

Tokenized Zip Transaction

If the Merchant Opted for the Tokenization for Zip Paylater Transaction. For the first time, You need to process the transaction as per steps stated above.
From Second time onward, there is no need to perform the 2nd and 3rd Step i.e. Send/Resend OTP and Verify OTP API.
Once you hit the Transact U API, Transactions will go through and be verified via Token.

Tokenized ZIP Transaction Sample Response

{
   "success":true,
   "data":{
      "statusCode":"100",
      "statusMessage":"The transaction was completed successfully.",
      "redirect":true,
      "pgRedirectData":{
         "postingUrl":"http://localhost:3000/api/v2/mobikwik_pay/confirm",
         "parameters":{
            "checksum":"b9f3cdb7c0e4a845b79cb6f270350a5fef5cb870ec2d95d3d2c6642566b7b71c",
            "cardId":"NA",
            "paymentMode":"PAYLATER",
            "bank":"NA",
            "bankid":"NA",
            "cardToken":"NA",
            "doRedirect":"false",
            "cardScheme":"NA",
            "productDescription":"DFCGVHBJndfgvhbftg jasd",
            "product1Description":"Zaakpay Testing",
            "product2Description":"NA",
            "product3Description":"NA",
            "product4Description":"NA",
            "pgTransId":"ZP5d313ebab2377",
            "pgTransTime":"12/14/2021 10:23:12",
            "orderId":"PaylaterTransactU",
            "responseCode":"100",
            "responseDescription":"The transaction was completed successfully. ",
            "amount":"100",
            "paymentMethod":"Not Found",
            "cardhashid":"NA"
         }
      }
   }
}

🚧

Getting Error code: 182 "Merchant Data not complete in our database" ?

To resolve this error please follow the below steps:

  • Login to your Zaakpay account
  • Go to Developers tab > Select "Integration Urls"
  • Fill in "Website URL" and "Redirect URL"
  • Save the data. Initiate new test transaction.

👍

Final Response after Redirection

After completion of transaction, Zaakpay will redirect back to merchant’s returnUrl with the Response Attributes.

Response Checksum

Response Checksum will be calculated on all parameters in the same order as given below. Prepare checksum string by concatenating all param value with ampersand '&' at the end of each value with the parameter name. For Instance, Please refer to below Response Checksum String and Generated Checksum.

amount=100&bank=NA&bankid=NA&cardId=NA&cardScheme=NA&cardToken=NA&cardhashid=NA&doRedirect=false&orderId=ZPTest1559202250912123456710&paymentMethod=Not Found&paymentMode=unknown&responseCode=183&responseDescription=Unfortunately the transaction has failed.Please try again. Transaction has failed&productDescription=Mobikwik Money&product1Description=NA&product2Description=NA&product3Description=NA&product4Description=NA&pgTransId=ZP5cea4a2fc59ce&pgTransTime=10/18/2021 23:53:08&
58b944fa4352a63801ca7a2040271387b3d29caee70f20a3b9868d074e908a34

❗️

UPI and Net banking transaction failing on Staging?

Please note that UPI and Net banking won't work on staging ENV, to check the complete flow of transactions, We request you to please test it on Live ENV along with your Live Credentials.

Some Useful APIs of Custom Checkout Flow

There are some useful APIs, which is must for merchant to integrate while doing the Integration of Zaakpay Custom Checkout Flow.

Card Validation API

Purpose: This API will check with the bank if the card is valid and return card status to the merchant. This api just checks if a card exists with a given card number.

  • Request Type: GET
  • Endpoint: /validateCard

This api does not check if:

  • Card’s CVV and Expiry provided by user is correct
  • Card is still active or blocked.
  • User’s card/account has sufficient funds.

Request Attributes

Fields DataType Mandatory Description
merchantIdentifier String Y Zaakpay’s unique alphanumeric merchant identifier. You can get it from Zaakpay dashboard.
email String Y Valid email address of the buyer. E.g. [email protected]
mode String Y 1 digit only, Numeric. For e.g. 1 = Domain check, 0=Domain Check Skip
encrypted_pan String Y. For Card Transaction. Encrypted Card Number
nameoncard String Y. For Card Transaction. Card Holder Name
encryptedcvv String Y. For Card Transaction. Encrypted CVV of card
encrypted_expiry_month String Y. For Card Transaction. Encrypted Expiry Month of card
encrypted_expiry_year String Y. For Card Transaction. Encrypted Expiry year of card
cardId String N Id assigned by Zaakpay to a saved Card
encryptionKeyId String Y Id of Merchant’s Public key as signed by Zaakpay
merchantCardRefId String N A unique id assigned by merchant to a card saved at Zaakpay
checksum String Y To be calculated on above parameters using HMAC SHA-256

Response Attributes

Fields Description
responseCode It is a max 3 digits Zaakpay’s Response code.
responseDescription Alphanumeric description of Zaakpay’s Response code.
cardId Unique token of card if user had chosen to save card.
cardScheme Card Scheme. E.g. Visa, Mastercard etc.
cardToken Masked card number. E.g. 4012 XXXX XXXX 1881
bank Name of bank for card or netbanking. Eg. State Bank of India
bankid Bankid in case of net banking. E.g. SBI
email Email id of card holder.
checksum To be calculated on above parameters using HMAC SHA-256.

Sample Request

data={
  " merchantIdentifier ": " zaakpaymid ",
  " email ": " [email protected]",
  " mode ": "0",
  " card ": {
    " encrypted_pan ": "ggfhfbsdjbf",
    " nameoncard ": " cardholdername ",
    " encryptedcvv ": "sdafdsf",
    " encrypted_expiry_month ": " sadasda ",
    " encrypted_expiry_year ": "sdasfff",
    " cardId ": " bce8e4e1e66520cb0bc2bf3a0e760412d53273a844 bf0931f2b3136a2ee0ada 3~1",
    " merchantCardRefId ": "cardRef123"
  }
}&checksum=dfsafdsfdsf345dfhywrt7trhue567sdf

Sample Response

{
  " email ": " abc@gmail . com",
  " responseCode": "100",
  " responseDescription ": " Card is valid ",
  " card": {
    " cardToken ": "4012 XXXXXXXX1881",
    " cardScheme ": "Visa",
    " bank ": " State Bank ofIndia",
    " cardId ": " bce8e4e1e66520cb0bc2bf3a0e760412d53273a844bf09 31f2b3136a2ee0 ada3~1",
    " merchantCardRefId ": "cardRef123"
  }
}

Add Card API

Purpose: This API will first check if the card is valid and then save a card against a merchant and a valid email id. Cards can also be mapped against a merchantCardRefId which is a unique card ref id assigned by the merchant to a card.

  • Request Type: POST
  • Endpoint: /addCardU

These steps must be followed while making a request to add card API:

  • Encrypt card data
  • Create JSON using encrypted card data
  • Calculate checksum on entire JSON string
  • URL Encode the JSON
  • Post checksum and encoded JSON to Zaakpay

Request Attributes

Fields DataType Mandatory Description
merchantIdentifier String Y Zaakpay’s unique alphanumeric merchant identifier. You can get it from Zaakpay dashboard.
email String Y Valid email address of the buyer. E.g. [email protected]
address String N It is a street, part of billing address. Max limit is 100 alphanumeric. E.g. B-34, Priyadarshni Society, Dumna Road
city String N It is a city of buyer, part of billing address. Max and min limit is 30 and 3 characters respectively. E.g. New Delhi
state String N It is a state of buyer, part of billing address. Max and min limit is 30 and 3 characters respectively. E.g. Delhi
country String N It is a buyer's country. E.g. India
pincode String N It is a buyer’s pin/zip code, part of billing address. It can have Numbers, Spaces and Hyphens (-) only. E.g,. 110001
mode String M 1 digit only, Numeric. For e.g. 1 = Domain check, 0=Domain Check Skip
encrypted_pan String Y. For Card Transaction. Encrypted Card Number
encryptedcvv String Y. For Card Transaction. Encrypted CVV of card
encrypted_expiry_month String Y. For Card Transaction. Encrypted Expiry Month of card
encrypted_expiry_year String Y. For Card Transaction. Encrypted Expiry year of card
encryptionKeyId String Y. For Card Transaction. Id of Merchant’s Public key as Signed by Zaakpay
merchantCardRefId String N A unique id assigned by merchant to a card saved at Zaakpay

Response Attributes

Fields Description
responseCode It is a max 3 digits Zaakpay’s Response code.
responseDescription Alphanumeric description of Zaakpay’s Response code.
cardId Unique token of card if user had chosen to save card.
cardScheme Card Scheme. E.g. Visa, Mastercard etc.
cardToken Masked card number. E.g. 4012 XXXX XXXX 1881
bank Name of bank for card or netbanking. Eg. State Bank of India
bankid Bankid in case of net banking. E.g. SBI
email Email id of card holder.
nameoncard Card holder name.
first4 First 4 digits of card number.
last4 Last 4 digits of card number.
checksum To be calculated on above parameters using HMAC SHA-256.

Sample Request

data={
  " merchantIdentifier ": " zaakpaymid ",
  " email ": " [email protected]",
  " mode ": "0",
  " card ": {
    " encrypted_pan ": "ggfhfbsdjbf",
    " nameoncard ": " cardholdername ",
    " encryptedcvv ": "sdafdsf",
    " encrypted_expiry_month ": " sadasda ",
    " encrypted_expiry_year ": "sdasfff",
    " merchantCardRefId ": "cardRef123"
  },
  " billingAddress": {
    " address ": "758, udyogvihar ",
    " city ": "Gurgaon",
    "state ": " Haryana ",
    " country ": " India ",
    " pincode": "120012"
  }
}&checksum=dfsafdsfdsfbhgfjbfvgdbgbhfvvgvvcjkui

Sample Response

{
  " email ": " chirag@zaakpay . com ",
  " responseCode": "100",
  " responseDescription ": " Card saved successfully .",
  "card": {
    "nameoncard ": " chirag jain ",
    " first 4": "4012",
    " last 4": "1881",
    " cardId ": " bce8e4e1e66520cb0bc2bf3a0e760412d53273a844bf09 31f2b3136a2ee0 ada3~1",
    " cardScheme ": " Visa ",
    " cardToken ": "4012 XXXXXXXX1881"
  }
}

📘

Note:

After receiving response, please calculate checksum on JSON and verify if it it same as received in “check-sum” parameter.

Fetch Card API

Purpose: This API will fetch all cards saved by a user at Zaakpay.

  • Request Type: GET
  • Endpoint: /fetchCardU

Request Attributes

Fields DataType Mandatory Description
merchantIdentifier String Y Zaakpay’s unique alphanumeric merchant identifier. You can get it from Zaakpay dashboard.
email String Y Valid email address of the buyer. E.g. [email protected]
mode String Y 1 digit only, Numeric. For e.g. 1 = Domain check, 0=Domain Check Skip
merchantCardRefId String N A unique id assigned by merchant to a card saved at Zaakpay

Sample Request

data={
  " merchantIdentifier ": " zaakpaymid ",
  " email ": " [email protected]",
  " mode ": "0",
  " merchantCardRefId ": "cardRef123"
}&checksum=dfsafdsfdsf

Sample Response

{
  " email ": " chirag@zaakpay . com ",
  " responseCode": "100",
  " responseDescription ": " Card Saved Successfully .",
  " cards": [
    {
      " nameoncard ": " chirag jain ",
      " first4": "4012",
      " last 4": "1881",
      " cardId": "bce8e4e1e66520cb0bc2bf3a0e760412d53273a844bf0931f2b3136a2ee0ada 3~1",
      " cardScheme ": " Visa ",
      " cardToken ": "4012 XXXXXXXX1881",
      " merchantCardRefId ": "cardRef123"
    },
    {
      " nameoncard ": " chirag jain ",
      " first4": "5610",
      " last 4": "8250",
      " cardId": "dbd45ca21bedf7a7fb4156533e779e8aee5e7a89c46ba203c85c89f91bd21dd9~12",
      " cardScheme ": " Maestro ",
      " cardToken ": "5610 XXXXXXXX8250",
      " merchantCardRefId ": "cardRef123"
    }
  }
}

Remove Card API

Purpose: This API will remove cards saved by a user at Zaakpay.

  • Request Type: POST
  • Endpoint: /removeCardU

Request Attributes

Fields DataType Mandatory Description
merchantIdentifier String Y Zaakpay’s unique alphanumeric merchant identifier. You can get it from Zaakpay dashboard.
email String Y Valid email address of the buyer. E.g. [email protected]
mode String Y 1 digit only, Numeric. For e.g. 1 = Domain check, 0=Domain Check Skip
cardId String Y Unique token of card if user had chosen to save card
checksum String Y To be calculated on above parameters using HMAC SHA-256

Response Attributes

Fields Description
responseCode It is a max 3 digits Zaakpay’s Response code.
responseDescription Alphanumeric description of Zaakpay’s Response code.
cardId Unique token of card if user had chosen to save card.
cardScheme Card Scheme. E.g. Visa, Mastercard etc.
cardToken Masked card number. E.g. 4012 XXXX XXXX 1881
first4 First 4 digits of card number.
last4 Last 4 digits of card number.
email Email id of card holder.
nameoncard Card Holder Name.
checksum To be calculated on above parameters using HMAC SHA-256.

Sample Request

data={
  " merchantIdentifier ": " zaakpaymid ",
  " email ": " [email protected]",
  " mode ": "0",
  " cardId ": "cardId"
}&checksum=dfsafdsfdsf

Sample Response

{
  " email ": " chirag@zaakpay . com ",
  " responseCode": "100",
  " responseDescription ": " This card has been removed Successfully .",
  " cards": [
    {
      " nameoncard ": " chirag jain ",
      " first4": "4012",
      " last 4": "1881",
      " cardId ": " bce8e4e1e66520cb0bc2bf3a0e760412d53273a844 bf0931f2b3136a2ee0ada 3~1",
      " cardScheme ": "Visa",
      " cardToken ": "4012 XXXXXXXX1881"
    }
  ]
}

Zaakpay Payment Gateway Response codes

These are the transact U API response codes. For more response codes, Please download our Zaakpay Custom Checkout : Transact U Server to Server Document Directly from here

Response Code Response Description Is Success?
100The transaction was completed successfully.Y
101Merchant not found. Please check your merchantIdentifier field.N
102Customer cancelled transactionN
103Fraud Detected.N
104Customer Not Found.N
105Transaction details not matchedN
106IpAddressBlackListed.N
107Transaction Amount not in specified amount range.N
108Validation Successful.N
109Validation FailedN
110MerchantIdentifier field missing or blank.N
111MerchantIdentifier Not Valid.N
126Date received with request was not valid.N
127ReturnUrl does not match the registered domainN
128Order Id Already Processed with this Merchant.N
129OrderId field missing or blank.N
130OrderId received with request was not Valid.N
131ReturnUrl field missing or blank.N
132ReturnUrl received with request was not ValidN
133BuyerEmail field missing or blank.N
134BuyerEmail received with request was not Valid.N
135BuyerFirstName field missing or blank.N
136BuyerFirstName received with request was not Valid.N
137BuyerLastName field missing or blankN
138BuyerLastName received with request was not ValidN
139BuyerAddress field missing or blank.N
140BuyerAddress received with request was not Valid.N
141BuyerCity field missing or blank.N
142BuyerCity received with request was not Valid.N
143BuyerState field missing or blankN
144BuyerState received with request was not Valid.N
145BuyerCountry field missing or blank.N
146BuyerCountry received with request was not Valid.N
147BuyerPincode field missing or blank.N
148BuyerPinCode received with request was not Valid.N
149BuyerPhoneNumber field missing or blankN
150BuyerPhoneNumber received with request was not Valid.N
151TxnType field missing or blank.N
152TxnType received with request was not Valid.N
153ZpPayOption field missing or blank.N
154ZpPayOption received with request was not Valid.N
155Mode field missing or blankN
156Mode received with request was not Valid.N
157Currency field missing or blank.N
158Currency received with request was not Valid.N
159Amout field missing or blank.N
160Amount received with request was not Valid.N
161BuyerIpAddress field missing or blankN
162BuyerIpAddress received with request was not Valid.N
163Purpose field missing or blank.N
164Purpose received with request was not Valid.N
165ProductDescription field missing or blank.N
166ProductDescription received with request was not Valid.N
167Product1Description received with request was not Valid.N
168Product2Description received with request was not Valid.N
169Product3Description received with request was not Valid.N
170Product4Description received with request was not Valid.N
171ShipToAddress received with request was not Valid.N
172ShipToCity received with request was not Valid.N
173ShipToState received with request was not Valid.N
174ShipToCountry received with request was not Valid.N
175ShipToPincode received with request was not Valid.N
176ShipToPhoneNumber received with request was not Valid.N
177ShipToFirstname received with request was not ValidN
178ShipToLastname received with request was not Valid.N
179Date is blank.N
179Date received with request was not valid.N
180Checksum received with request is not equal to what we calculatedN
181Merchant Data Complete.N
182Merchant data not completed in our databaseN
183Unfortunately, the transaction has failedN
400The transaction was declined by the issuing bankN
401The transaction was rejected by the acquiring bankN
402This test transaction has been successfully completed.N
403Transaction failed because this card has been blocked by MobiKwik Payment GatewayN
404Transaction failed due to security checksN
501Debitorcredit is blankN
502Bankid is blankN
503Encrypted pan is blankN
504Card is blankN
505Nameoncard is blankN
506Encrypted cvv is blankN
507Encrypted expiry month is blankN

What’s Next

These Parameters are mentioned in the same order in which MobiKwik Payment Gateway calculates the
checksum(Excludingchecksum).