Skip to main content

Troubleshooting

Why do we need this?

Sometimes, when there are issue coming, our partners needs to raise it to specific slack channel for assistance. To reduce back-and-forth communication, we are providing tools to self-identify the issue and fix the issue whenever possible without having any dependency on us.

Get Notification Detail

Background

There are cases where our merchants didn’t get their order notifications. This might be because of promo setting, menu external ID didn’t get passed, wrong URL, etc. For some cases you can actually fix the issue yourself.

Example case:

  • In Cases where the order notification is not sent because link that is connected to the webhook cannot be found, this means that we still sent the notification but the link cannot be reached because it’s non-existent or broken. This should be able to be solved by changing the link the the working one
  • You can check if there are certain order state that is not sent (e.g merchant_accepted, driver_otw_pickup,etc) then you can track it using this debugging API
  • You can utilize this API for your own analytics, and track end to end flow of an order, complete with their timestamp

How to debug order notification issue?

  1. Open this endpoint GET {host}/integrations/partner/notifications?entity_id={entity_id}
    Entity_ID details:

    1. If you're GoFood / GoMart User, replace entity_id by order_id. Example: https://api.gobiz.co.id/integrations/partner/notifications?entity_id=**F-704173354**
    2. If you’re Gopay user replace entity_id by transaction_id. Example: https://api.gobiz.co.id/integrations/partner/notifications?entity_id=**c5fbc785-629a-463f-b6f9-da1106a29f73**
  2. Make sure that you’re using Client_credentials as method to get access token and put the access token with type Bearer Token on Authorization

  3. Sample Request on curl

    curl -X GET {host}/integrations/partner/notifications?entity_id={entity_id}
    -H 'Authorization: Bearer {access-token}'
  4. Scope used: partner:outlet:read or outlet:read

  5. Sample response (200)

    Sample Response
    {
    "success": true,
    "data": {
    "notifications": [
    {
    "entity_id": "F-704173354",
    "created_at": "2023-05-03T16:11:50.446+00:00",
    "partner_id": "c5fbc785-629a-463f-b6f9-da1106a29fa1",
    "event_type": "gofood.order.merchant_accepted",
    "delivery_status": "dead",
    "endpoint": "https://webhook.site/5b8922ed-b310-456c-8ea2-9d7a0a9ba0f0",
    "headers": {
    "X-Go-Signature": "1158ebcb7e821406f0b4993a504d6d561177c494662dad890d651f94f3f08216",
    "X-Go-Idempotency-Key": "446cb8ae-8fe3-3c2c-9e9f-c677f37c5e5c",
    "Content-Type": "application/json",
    "Accept": "application/json"
    },
    "payload": "stringified JSON of notification payload",
    "history": [
    {
    "time": "2023-05-03T16:11:50.446+00:00",
    "exception_message": "URL not found",
    "delivered": false
    },
    {
    "time": "2023-05-03T16:15:50.446+00:00",
    "exception_message": "URL not found",
    "delivered": false
    },
    {
    "time": "2023-05-03T16:19:50.446+00:00",
    "exception_message": "URL not found",
    "delivered": false
    },
    {
    "time": "2023-05-03T16:19:50.446+00:00",
    "exception_message": "Failed after automatic attempts.",
    "delivered": false
    }
    ]
    }
    ]
    }
    }
  6. How to read the response above?

    1. Delivery status shows whether the webhook is dead or not (more detail on delivery status details) History shows that how many times the webhook are notified
    2. Inside History, there are :
      • exception_message which shown what is wrong with the webhook
      • delivered which shows whether the webhook has been successfully delivered or not
    3. In the case above, exception message shown “URL not found” means that the URL of your order cannot be found and you need to fix it.