Build an order fulfillment integration with the Square Orders API, including creating an order with a PICKUP fulfillment type and updating its state to COMPLETED
Obtain an OAuth access token for the merchant location by completing the Square OAuth flow; use the token in the Authorization header as Bearer YOUR_TOKEN for all requests
Create an order by POSTing to /v2/orders with a body that includes line items, location_id, and a fulfillments array containing an entry with type set to PICKUP and the relevant pickup details (pickup_at, recipient)
Receive the order id from the response and surface it in your point-of-sale or kitchen workflow for staff to act on
When the order is ready, PATCH the order state by sending a request to /v2/orders/{order_id} with the state field set to COMPLETED and the version field set to the current version from the order object to satisfy optimistic concurrency
Subscribe to order webhooks via the Square Webhooks API by POSTing a subscription to /v2/webhooks/subscriptions with the order.created and order.updated event types and your endpoint URL
Verify inbound webhook authenticity using the Square-provided signature key; reject events where the computed HMAC does not match the X-Square-Hmacsha256-Signature header value
Known gotchas
Order updates require sending the current version number; if another client updates the order between your GET and PATCH, the version will mismatch and the update will be rejected with a 409 conflict
Square Orders API fulfillment type PICKUP is distinct from DELIVERY and SHIPMENT; each type has different required fields in the fulfillment object
Location IDs are not interchangeable across merchants; always scope order creation and queries to the specific location_id for the active merchant
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp