# Post Checkout Interactions

There are a number of post-checkout interactions that you can use to do things such as keeping track of the order status and handling check-in for curbside pickup.

## Tracking Order Status

You may want to track order-status post-checkout so that you can show a status page on your website. You can do this by setting up a webhook - here are the steps for doing that.

1. Setup an endpoint to which Jane will send `POST` requests. You will need to [send us](mailto:roots@iheartjane.com) your endpoint along with a shared secret (which we will pass as an `Authorization` header in the format: `Bearer token`) and whether to apply this endpoint to a single store id or all stores in your account. Your shared secret should be some sort of long random alphanumeric string. We will then setup our system to post messages to your webhook URL. We will also send you a `headlessCheckoutPartnerId`, which will be useful later.
2. Pass in your `headlessCheckoutPartnerId` to the `postMessage` payload when you create your embedded shopping cart.
3. After the user checks out, your endpoint will receive `POST` requests with the following payload format:

```javascript
cart: {
      amount: 41.8,
      assigned_employee_id: null,
      assigned_employee_name: null,
      assigned_manager_id: null,
      assigned_manager_name: null,
      checked_out_time: '2021-06-21 21:41:28',
      checkout_message: '',
      customer_phone_number: '+1112223333',
      customer_email_address: 'johnsmith@gmail.com',
      customer_name: 'John Smith',
      created_at: '2021-06-21 21:41:20',
      id: 7469,
      pos_order_id: null,
      promo_code: null,
      queue_number: 'G19',
      rating: 0,
      reservation_mode: 'pickup',
      reservation_start_window: '2021-06-21 22:45:00',
      status: 'verification',
      store_id: 68,
      store_name: "Jane's Shop",
      tags: {},
      user_id: null,
      external_user_id: '12345',
      external_user_source: 'foo',
      uuid: 'fed89a88-2928-4a1f-9134-45c2fd27b2ca',
      products: [Array]
},
webhook_event: 'cart_status_updated'
```

The `status` of the reservation will be part of the webhook payload.

### Possible Order Statuses

The following is a complete list of order statuses that can be passed by the callback and a short explanation.

* **pending**: Not yet submitted orders, these are carts not yet checked out
* **verification**: Submitted orders not yet reviewed
* **staff\_member*****\_*****review:** Order in review
* **preparing**: Orders that have been accepted and are being prepared
* **delivery\_started**: Delivery order is packed and ready
* **delivery\_finished**: Delivery order is marked as finished but the order has not yet been completed out yet. Not a common status - used by folks using older delivery model within Jane.
* **ready\_for*****\_*****pickup:** Pickup, Kiosk or Curbside Orders marked as Ready
* **finished**: Orders marked as Complete
* **with\_review:** Customer left a store review after the order was completed
* **cancelled**: Orders cancelled by the shopper, this can only be done while the order is in Verification status - once moved to Preparing the cancel option disappears
* **dismissed**: The store cancelled the order
* **finished\_without\_review:** Deprecated status - was previously used to notate customers who did not leave a store review after 10 days of order completion; now is just shown as Finished

## Checking In For Curbside Pickup

If you want users to be able to check in for curbside pickup, you can use the following endpoint in your application (this links to the version on the demo environment):

{% openapi src="/files/VcD57I8ruu3dTpTW7GoE" path="/roots/store\_operations\_api/v1/reservations/{uuid}/curbside\_arrival" method="post" %}
[swagger.json](https://338810739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4Bq28Gj1vy78MuGEwRE%2Fuploads%2FnNFt4CSkApuK6mGjOPEv%2Fswagger.json?alt=media\&token=0f208729-d86e-45e0-9d59-0daad0c6a720)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iheartjane.com/jane-docs/implementing-roots/post-checkout-interactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
