Refund Request Notification
WEBHOOK: POSThttps://<YOUR_WEBHOOK_URI> event_type: dapi.refund_requested
The Uber Direct API sends this webhook to notify merchants when a refund has been requested for an order placed through the Direct API. In order for your service to receive webhooks from Uber, set your webhook URL in the developer dashboard Settings section, under RIDE REQUESTS.
Once a webhook is received, you can pull the full order information using the resource_href
, which corresponds to the Get Delivery Status endpoint.
¶ JSON body parameters
The table below describes each parameter in the webhook notification:
Name | Type | Description |
---|---|---|
event_id |
string | Unique event identifier to ensure that events are only digested once. Events are retried if not acknowledged and their delivery is not guaranteed to be in order. |
event_time |
integer | Unix timestamp of when the event occurred. |
meta |
object | The object containing additional information that is specific to the event_type . |
meta.external_order_id |
string | Merchant supplied order id. Used by the delivery person when picking up and by the customer support agents. |
meta.order_id |
string | Unique identifier for the order. This is used to pull the delivery status from the Get Delivery Status endpoint. |
resource_href |
string | Contains the full Get Delivery Status endpoint for the associated order ID. |
¶ Example notification
{
"event_id": "d1122602-45c4-4851-a91e-b35354a233b7",
"resource_href": "https://api.uber.com/v1/eats/deliveries/orders/8a8972cf-2331-4f77-85c0-d84fbed6bf53",
"meta": {
"external_order_id": "merchant_order_001",
"order_id": "8a8972cf-2331-4f77-85c0-d84fbed6bf53"
},
"event_type": "dapi.refund_requested",
"event_time": 1596640612953
}
¶ Security
All webhooks sent from Uber contain a signature in the header of the request. More details about the implementation are available in the security section of the Rider webhook documentation.
¶ Expected response
Your service should POST a 200
response status code with an empty response body to acknowledge receipt of the webhook event. If no acknowledgement is received, Uber will continue to retry the webhook according to the retry logic described below.
¶ Retry logic
If Uber does not receive an acknowledgement response, the event will be resent based on an exponential backoff algorithm. The next webhook event will be sent 30 seconds after the initial event, then again after 60 seconds, then after 120 seconds, and so on until a response is received or until 7 events were sent without a response.
¶ Set up your webhook URL
To test the webhook, set a valid webhook URL and place an order in your test store.
Your service (a single webhook URL) can receive webhooks for multiple stores, as long as the developer account’s UUID is mapped to each individual store (org). When your service receives events, you’ll need to use the user_id
(which corresponds to store_id
) from the webhook to map it to the right store for notifications and order injections.
- In the developer dashboard Settings, under RIDE REQUESTS, enter your webhook URL, and click SAVE.
For testing purposes, you may want to setup your own webserver or use a third-party hosting provider to receive webhooks.