Post Back URL notification json data is changed & not able to decode on our server

Hi It seems the earlier order_id field is changed in Order notification to post back URL. As a result parsing the json data is failing, but there is no update in website about parameters change.

So please update the web document or the sample json status notification format sent to postback URL
  • sujith
    We haven't changed anything on postback response. Can you paste a raw response here?
    Hi Sujit, we are getting following error on console. Unrecognized field "order_id" (Class, not marked as ignorable
    at [Source:; line: 1, column: 14] (through reference chain:["order_id"])

    It seems postback notification message is not having order_id parameter.

    dump is disabled by default, will enable & share the dump later
  • vishnus

    I just tested the postback and got following response, and it does contain order_id. Is it happening still at your end?
    "order_id": "xxxx",
    "exchange_order_id": "",
    "order_timestamp": "2017-07-07 10:41:03",
    "exchange_timestamp": "",
    "status": "REJECTED",
    "status_message": "xxxxx",
    "placed_by": "xxx",
    "user_id": "xxx",
    "tradingsymbol": "INFY",
    "exchange": "NSE",
    "transaction_type": "BUY",
    "order_type": "MARKET",
    "quantity": 1,
    "filled_quantity": 0,
    "unfilled_quantity": 0,
    "price": 0,
    "average_price": 0,
    "trigger_price": 0,
    "product": "NRML",
    "validity": "DAY",
    "tag": "",
    "checksum": "xxx"
    Yes it seems format is changed in postback URL compared to earlier format

    Earlier Format is like below :
    "status": "success",
    "data": {

    "order_id": "151220000000000",
    "parent_order_id": "151210000000000",
    "exchange_order_id": null,
    "placed_by": "AB0012",
    "variety": "regular",
    "status": "REJECTED",

    "tradingsymbol": "ACC",
    "exchange": "NSE",
    "instrument_token": 22,
    "transaction_type": "BUY",
    "order_type": "MARKET",
    "product": "NRML",
    "validity": "DAY",

    "price": 0.0,
    "quantity": 75,
    "trigger_price": 0.0,

    "average_price": 0.0,
    "pending_quantity": 0,
    "filled_quantity": 0,
    "disclosed_quantity": 0,
    "market_protection": 0,

    "order_timestamp": "2015-12-20 15:01:43",
    "exchange_timestamp": null,

    "status_message": "RMS:Margin Exceeds, Required:0, Available:0",
    "tag": null

    So we have to change the json conversion to new format
    "order_timestamp":"2017-07-07 11:34:21",
    "exchange_timestamp":"2017-07-07 11:33:21",

    So its better clients get the notification when JSON structure is reformatted in future, so that we can change and will not have any impact on our system.

    Thank you
  • vishnus

    The response you have pasted here is retrieving one single order using GET request.

    The postback structure has always been the one in the documentation.
    With the change it's working fine, you can close the issue. thank you
This discussion has been closed.