Get order_id using request_token returned by kite publisher

muralilg
muralilg edited January 2017 in Kite Publisher
While using kite publisher buttons I receive a 'status' and 'request_token' from kite after the order is placed successfully. How to match this token with an order_id in the webhooks?
  • muralilg
    By going through other discussions I see that request token has nothing to do with the order details. If we can just get an order_id along with the status it will be of great help.
  • sujith
    @muralilg,
    For webhooks you need to have KiteConnect app.
    Do you have KiteConnect app?
  • muralilg
    muralilg edited January 2017
    @sujith Yes we do have a kite connect app. By the way I am working on the same app as @krisys

    Thanks,
    Murali
  • sujith
    @muralilg,
    You will get order_id after placing order, you can check against the same in webhooks response also.
  • muralilg
    @sujith Yes we do get the order id from the web hooks. What we are trying is to connect other actions a user performed while placing that order with the web hook data. So we will need that order id from the kite publisher API as well
  • sujith
    @muralilg,
    You do get order_id after successful order placement in Kite publisher.
  • muralilg
    @sujith It is good to know that we can get order_id from the publisher api. Could you please help us figure out how to do it?

    We are using this https://kite.trade/docs/connect/v1/#generating-dynamic-buttons-with-javascript
    api in particular to create dynamic buttons on our page and the only callback it allows ('finished') returns only 'status' and some 'request_token' according to the docs. Are we missing anything or is there a different way to achieve our goal?

    Thanks,
    Murali
  • sujith
    @muralilg,
    Apologies. You don't get order_id in the callback, it is sent only in webhook. Publisher is built in such a way that it will never get any data.

    If you can elaborate what you are trying to achieve, may be we can suggest an alternative.
  • muralilg
    @sujith,
    A user would have performed a few activities in our app before/after placing an order on KITE. We want to tie these activities to that order. If there is any other means to enable kite buttons apart from the kite publisher api we can try that too.
  • sujith
    @muralilg,
    You can use order tag. You can tag every order you place and you will get tags in webhook also.
    Checkout docs here.
  • muralilg
    @sujith Thanks that would solve our issue .
This discussion has been closed.