imskm / axis-bank-api

Axis Bank API for PHP
MIT License
0 stars 0 forks source link

Corp ID not found #1

Open HAoDestiny opened 1 year ago

HAoDestiny commented 1 year ago

Hello! I am also in contact with axis bank recently, but when calling It is not very clear how to get channelId, corpCode, checkSum these parameters The request has always been the response: Corp ID not found { "GetAccountBalanceResponse": { "SubHeader": { "requestUUID": "1241251233132", "serviceRequestId": "OpenAPI", "serviceRequestVersion": "1.0", "channelId": "TXBAPI" }, "GetAccountBalanceResponseBody": { "status": "GONE", "data": "", "message": "Corp ID not found" } } }

Can you give me some advice? Thanks

imskm commented 1 year ago

What is the request data and headers?

Channel ID and Corp Code is given by the bank so you need to use it in request param:

And then you need to calculate the checksum by yourself.

{
  "GetAccountBalanceRequest": {
    "SubHeader": {
      "requestUUID": "ABC123",
      "serviceRequestId": "OpenAPI",
      "serviceRequestVersion": "1.0",
      "channelId": "TXB"
    },
    "GetAccountBalanceRequestBody": {
      "channelId": "TXB",
      "corpCode": "DEMOCORP11",
      "corpAccNum": "248012910169",
      "checksum": "6cf6321ab6f39083d2e904667aeb4654"
    }
  }
}
HAoDestiny commented 1 year ago

Thanks for you relep My request headeris :

image

request data: { "GetAccountBalanceRequest": { "SubHeader": { "requestUUID": "1241251233132", "serviceRequestId": "OpenAPI", "serviceRequestVersion": "1.0", "channelId": "TXBAPI" }, "GetAccountBalanceRequestBody": { "channelId": "TXBAPI", "corpCode": "072205002840", "corpAccNum": "922020010938596", "checksum": "FF1D184CA45A1E911CAA6900681BBA59" } } }

ChannelId and Corp Code are required to For example, query 248012910169 which bank this account belongs to. Do you go to this bank to find it? Can a correct example be provided? thanks

How is checkSum calculated? I have searched all over the document but canโ€™t find it. Can you provide the calculation method or the location of the document? Thanks

Thank you for your reply

imskm commented 1 year ago

First of all you need a DEMO account for testing the API which will be provided by the bank, If you haven't got one then contact the bank. They will give you a DEMO corporate bank account for accessing the UAT (Test/Sandbox) API to develop the API from your end. This DEMO corporate account information includes:

  1. Corp Type : Normal, Pre Auth
  2. Corp Code : DEMOCORPXXXXXXX
  3. Acc No : 522XXXXXXXXXXXX
  4. Portal link : https://qas2axis.axisbank.co.in/irj/portal
  5. USER ID View : DEMOCORPXXXXXXX_VIEWER
  6. UAT portal password: *****

Apart from that you also need UAT credentials which is also provided by the bank:

  1. Client Secret
  2. Client ID
  3. CHANNEL
  4. KEY (For encryption/decryption)

In the above information you will get the ChannelID and CorpCode.

Now The checksum part

So you need to concatenate every value of XXXXXRequestBody attribute (before adding checksum attribute) and calculate hash value using md5 algorithm.

So let's say your request body for balance enquiry looks like

"GetAccountBalanceRequestBody": {
    "channelId": "TXBAPI",
    "corpCode": "072205002840",
    "corpAccNum": "922020010938596",
}

Then you should calculate the md5 hash of concatenated value of attributes like this: md5("TXBAPI072205002840922020010938596")

I Think this might help you to solve your problem.

There is no documentation online (In my knowledge) to provide you a link. You must have gotten Technical Doc from Bank in which API request and it's payloads are explained. In that document you will not find how to calculate the checksum, When I was building the API I just figured it out.

HAoDestiny commented 1 year ago

Thank you very much for your reply ๐Ÿ˜Š๐Ÿ˜Š

follow your reply The first step should be to contact AXIS Bank to obtain the DEMO account and get some key information such as channelId, cropCode and other main information. Is this the case?

Unfortunately I opened the link you provided: https://qas2axis.axisbank.co.in/irj/portal response 404

imskm commented 1 year ago

Yes that's correct.

You can go to https://qas2axis.axisbank.co.in

HAoDestiny commented 1 year ago

Thanks again for your reply

I also want to ask if the account logged in at https://qas2axis.axisbank.co.in is the DEMO account obtained from AXIS BANK?