Saltar al contenido principal

[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

  1. The customer arrives at the store page.
  2. The customer adds items to their cart.
  3. The customer views items in their cart.
  4. When the customer clicks “Continue” on the cart page, DoorDash invokes Order Cart Validation (OCV).
  5. The customer is allowed to proceed to the checkout page while validation processes.
  6. When the customer clicks “Place Order” on the checkout page:
    1. If validation succeeds, the order is submitted.
    2. 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 CodeDescription
INVALID_ORDERCart structure is invalid or incomplete.
ITEM_OUT_OF_STOCKItem is unavailable (86’d) at the restaurant.
STORE_HOURS_ISSUEOrder placed outside of configured POS store hours.
INTERNAL_ERRORUnexpected system failure.
OTHERUnclassified error.
CONNECTIVITY_ISSUENetwork/POS transmission issue.
TIME_OUTValidation timed out.
STORE_CLOSEDThe store is closed or not accepting orders.
STORE_CLOSED_EARLYRestaurant closed or not accepting orders.
POS_OFFLINEThe restaurant cannot be reached due to the POS being offline or otherwise unavailable.
CAPACITY_THROTTLINGKitchen capacity limit reached.
STALE_PICKUP_TIMEThe selected time is no longer valid.
ORDER_ONLINE_DISABLEDThe store has online ordering disabled.
INVALID_ADDRESSAddress is invalid.
STORE_RENOVATIONThe store is unavailable due to renovation.
STORE_TEMP_CLOSEDThe store is temporarily closed.
WEATHER_ISSUESOrders 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:

  1. Implement the endpoint in the sandbox environment and simulate OCV requests.
  2. Test the valid and invalid cart scenarios along with the expected responses.
  3. Validate that latency requirements are met.

Reach out to support to begin certification.