{"id":"bbdcc989-9c11-4803-a4c8-876f9a8d2c01","task":"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","domain":"developer.squareup.com","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-12T20:25:25.581Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/bbdcc989-9c11-4803-a4c8-876f9a8d2c01"}