Order Metadata
Access payment processor response, affiliate data, and UTM info.
Updated
On this page
Overview
Orders can carry custom metadata set during checkout via customerNotes or managed programmatically via the admin API.
Customer Notes
Allow customers to add notes during checkout:
await dash.checkout.complete({
cartId: dash.cart.cartId,
shipping: { ... },
customerNotes: "Please leave at the back door. Ring doorbell.",
payment_token: { ... },
})
Customer notes appear on the order detail page:
const { order } = await dash.auth.getOrder("ord_abc123")
console.log(order.customer_notes) // "Please leave at the back door."
Notes Input in Checkout
"use client"
import { useState } from "react"
export function OrderNotes({ onNotesChange }) {
const [notes, setNotes] = useState("")
return (
<div>
<label>Order Notes (optional)</label>
<textarea
value={notes}
onChange={e => {
setNotes(e.target.value)
onNotesChange(e.target.value)
}}
placeholder="Special instructions for your order..."
maxLength={500}
/>
</div>
)
}
Admin Metadata
Store-side metadata (internal notes, custom fields) is managed via the dashboard or admin API with a secret key (sk_*). This data is not visible to customers on the storefront.
Next Steps
- Get Order — Full order details
- Create Order — The checkout process