[Coming Soon] Order Cart Validation
Overview
Order Cart Validation (OCV) allows DoorDash to validate a customer’s cart with your system before the order is submitted.
OCV ensures that orders are only placed when they can be successfully fulfilled. Validation occurs during checkout and prevents invalid orders caused by:
- Out-of-stock items
- Price discrepancies
- Invalid modifiers or incomplete selections
- Store closure or capacity constraints
- Promotion or tax mismatches
If validation succeeds, the customer will be able to checkout and DoorDash will submit the order. If validation fails, DoorDash will block submission and display a user-friendly error message on the checkout screen based on the error code(s) returned.
How It Works
OCV is triggered when a customer proceeds from cart to checkout.
Flow
- The customer arrives at the store page.
- The customer adds items to their cart.
- The customer views items in their cart.
- When the customer clicks “Continue” on the cart page, DoorDash invokes Order Cart Validation (OCV).
- The customer is allowed to proceed to the checkout page while validation processes.
- When the customer clicks “Place Order” on the checkout page:
- If validation succeeds, the order is submitted.
- If validation fails, the validation error is surfaced on the checkout page.
Why This Matters
Fewer Cancellations
Invalid orders are identified before submission, reducing proactive and POS-related cancellations.
Improved Checkout Experience
Customers receive real-time feedback and can resolve issues before paying — increasing successful checkouts.
Endpoint Requirements
Partners must expose the following endpoint:
POST /orderCartValidation
Request Schema
Trigger: Fired automatically by DoorDash when the customer moves to the checkout page.
Headers: Standard signed headers as configured in your developer webhook subscription.
URL Parameters: None (cart_id will be passed in the request body payload)
Example Request #1
POST /orderCartValidation
{
"cart_id": "string", //Unique ID for tracking cart validation
"store": {
"merchant_supplied_id": "string", // Store ID
"provider_type": "string" //POS integration type being used
},
"fulfillment": { // Delivery vs pickup fulfillment context
"type": "DELIVERY", // DELIVERY or PICKUP
"asap": true, // ASAP or scheduled
"requested_time": "2025-12-05T18:30:00Z",
},
"subtotal": 0.00, // Pre-tax cart subtotal
"tax": 0.00, // Tax amount applied to the cart
"categories": [ // Structured list of menu categories included
{
"name": "string", // Category name (ex: "Burgers", "Sides")
"merchant_supplied_id": "string", // Category identifier
"items": [ // List of items under this category
{
"name": "string", // Item name
"merchant_supplied_id": "string", // Merchant/POS item ID
"price": 0.00, // Unit price
"quantity": 0, // Quantity requested by customer
"extras": [ // Add-ons, modifiers, or nested options
{
"name": "string",
"merchant_supplied_id": "string",
"options": [ // Available modifier options for the user
{
"name": "string",
"merchant_supplied_id": "string",
"price": 0.00, // Price adjustment for modifier
"quantity": 0, // Modifier quantity
"extras": [ null ], // Supports further nesting
"line_option_id": "string" // Unique identifier for this option
}
]
}
],
"special_instructions": "string", // Optional notes
"line_item_id": "string" // ID used to correlate this item
}
]
}
],
"experience": "DOORDASH" // Ordering channel
}
Response Schema
You must return one of the following:
Success Response
{
"valid": true, // Order passed validation
"cart_id": "string", // Returned ID matching the request
"expires_at": "2025-11-05T16:00:00Z", // Time until validation expires
"estimated_prep_time_minutes": 12 // Expected prep time
}
Failure Response
{
"valid": false, // Order failed validation
"cart_id": "string",
"expires_at": "2025-11-05T16:00:00Z",
"errors": [ // Detailed list of issues found during validation
{
"code": "ITEM_OUT_OF_STOCK", // Menu item is unavailable
"merchant_supplied_id": "line_01", // Item ID
"message": "Burger is sold out" // Message to surface
}
]
}
Response Rules
- The cart_id must match the request.
- Use structured error codes (see below).
- Errors must be item-level when applicable.
- Do not return generic errors when a specific error applies.
Error Codes
Partners must return one of the following standardized error codes:
| Error Code | Description |
|---|---|
| INVALID_ORDER | Cart structure is invalid or incomplete. |
| ITEM_OUT_OF_STOCK | Item is unavailable (86’d) at the restaurant. |
| STORE_HOURS_ISSUE | Order placed outside of configured POS store hours. |
| INTERNAL_ERROR | Unexpected system failure. |
| OTHER | Unclassified error. |
| CONNECTIVITY_ISSUE | Network/POS transmission issue. |
| TIME_OUT | Validation timed out. |
| STORE_CLOSED | The store is closed or not accepting orders. |
| STORE_CLOSED_EARLY | Restaurant closed or not accepting orders. |
| POS_OFFLINE | The restaurant cannot be reached due to the POS being offline or otherwise unavailable. |
| CAPACITY_THROTTLING | Kitchen capacity limit reached. |
| STALE_PICKUP_TIME | The selected time is no longer valid. |
| ORDER_ONLINE_DISABLED | The store has online ordering disabled. |
| INVALID_ADDRESS | Address is invalid. |
| STORE_RENOVATION | The store is unavailable due to renovation. |
| STORE_TEMP_CLOSED | The store is temporarily closed. |
| WEATHER_ISSUES | Orders paused due to external conditions. |
Latency & Timeout Behavior
- DoorDash expects a validation response returned within 2-3 seconds.
- If no response is received by the time the customer attempts to place an order, the validation will be bypassed and the order will be submitted.
- Excessive timeouts may result in OCV being disabled for affected stores.
Testing & Certification
Before production launch:
- Implement the endpoint in the sandbox environment and simulate OCV requests.
- Test the valid and invalid cart scenarios along with the expected responses.
- Validate that latency requirements are met.
Reach out to support to begin certification.