Last updated: Apr 20, 2021
Welcome to Drive's payment integration platform. Using this API, you can leverage our payment processing and checkout flow, along with order creation, order tracking, SaaS capabilities, and payment reporting.
Requirements:
Here is the typical flow:
order_session_id by passing those items and prices, along with consumer data, delivery data, to our API.order_session_id from the previous step.A delivery is created in a scheduled state with the event "delivery_created". The end state is either "delivered" or "cancelled". Notable events will change delivery state and/or dasher state.
You will have to replace ${apiKey} curl -H "Authorization: Bearer ${apikey}" -v https://api.doordash.com/drive/v1/...
with your specific API key. If you need an api key, contact [email protected].
Please retry all 50x response status codes as the error could be transient. We recommend up to 3 retries with some exponential backoff delay between requests.
When providing a time to any of the below APIs (i.e. pickup_time or delivery_time), the format must be UTC.
If you need updates on various stages of a delivery, please provide us with a url endpoint that you would like to receive webhook events. The webhook events we send to your endpoint will have an Authorization header with value Bearer {API_KEY}, while {API_KEY} is the api key we provided you.
Currently, we send out the following events:
delivery_created: We accepted your order and a delivery has been created for it.delivery_created: This event will occur once, after the delivery is created.{
"external_order_id": "1234-abcd",
"event_category": "delivery_created",
"tracking_url": "https://www.doordash.com/XXX",
"created_at": "2021-02-01T02:01:00.000Z"
}
Create the order session by passing in order details to receive a order_session_id, which is used to open the Checkout Page webview.
Request body for checkout endpoint
required | object (The consumer's cart containing their order.) An object that represents the cart of order items and which menu type / category the order belongs to. |
| currency required | string Enum: "USD" "AUD" "CAD" "JPY" Type of currency of the payment. |
required | object (Consumer) Consumer information. |
required | object (The address where the order needs to be dropped off.) The address where the order needs to be dropped off. |
| external_order_id | string Merchant's unique identifier for the order. |
| external_store_id required | string Merchant's unique identifier for a store that this delivery is for. |
object (DropoffPreference) Details on how Dasher should dropoff to the consumer; consumer preference for their delivery getting dropped off. |
{- "cart": {
- "category_name": "BREAKFAST",
- "items": [
- {
- "merchant_supplied_id": "DELUXE_AMERICAN",
- "quantity": 3,
- "tax_excluded_price": 899,
- "special_instructions": "Please add any sauces to the side.",
- "extras": [
- {
- "merchant_supplied_id": "BREAKFAST_CONDIMENTS",
- "quantity": 0,
- "tax_excluded_price": 0,
- "options": [
- {
- "merchant_supplied_id": "ADD_KETCHUP",
- "quantity": 1,
- "tax_excluded_price": 50,
- "extras": [ ]
}
]
}
]
}
]
}, - "currency": "USD",
- "consumer": {
- "external_consumer_id": "12345678",
- "phone_number": "+16505555555",
- "address": "12345 Oakview Drive, San Francisco, CA 94108",
- "first_name": "Jane",
- "last_name": "Goodall"
}, - "delivery_address": {
- "street": "901 Market Street",
- "unit": "Suite #600",
- "city": "San Francisco",
- "state": "California",
- "zip_code": "94105",
- "country": "USA"
}, - "external_order_id": "aer5-ufc9-7865-45ng8-iuywq",
- "external_store_id": "148767394",
- "dropoff_preference": {
- "option": "LEAVE_AT_DOOR",
- "dasher_instructions": "This is a gated community. Just head over to the gate entrance and on the left there should be a mail package area where you can drop off the order. Thanks!"
}
}{- "order_session_id": "24ac000c-3934-11eb-adc1-0242ac120002"
}