Public previewSee what changed →
All guides

Build on the Partner API

View as Markdown

Checkout and order confirmation

Nobody reads documentation.

Here are the instructions for your agent. Give it this prompt: it reads the guides and the API contract, then walks you through the integration step by step, what to do, where and how.

Download agent instructions

This guide is for builders of a website or app on the Partner API.

Before showing Buy now, read the cart and check every line is available. The button links to buyLink.

The return redirect

With a redirect URL on your storefront, Groupon sends the shopper's browser back to it after checkout, with the order id added:

text
https://your-site.example/checkout/complete?grouponOrderUuid=5d0c2f3a-8b1e-4c7d-a9f0-1e2d3c4b5a69

Without one, your site receives no grouponOrderUuid. Your handler for that address:

  1. Reads grouponOrderUuid and checks it is a UUID. It handles each one once: a repeat visit shows the result you saved.
  2. Reads the order from your server (below).
  3. Matches the order's items to the cart in the shopper's session, on optionId. With no session or no match, it shows a neutral "check your Groupon email" page and marks nothing as purchased.
  4. Keeps the cartId and a snapshot of its lines until the status is final. On success it marks the cart as purchased. On REJECTED or EXPIRED it reads the cart and, if it is gone, creates a new one from the snapshot.
  5. Renders the confirmation page.

Treat grouponOrderUuid as sensitive: keep it out of analytics and off public pages.

Reading the order

bash
curl -s "https://api-core.livingsocial.com/partner_storefront/bookings/5d0c2f3a-8b1e-4c7d-a9f0-1e2d3c4b5a69" \
  -H "Authorization: Bearer $GROUPON_API_KEY"

An order from a two-line cart, its second line still being processed:

json
{
  "id": "5d0c2f3a-8b1e-4c7d-a9f0-1e2d3c4b5a69",
  "status": "ON_HOLD",
  "supplierReference": "LG-ABCD-1234-EFGH",
  "createdAt": "2026-09-18T12:10:44Z",
  "items": [
    {
      "productId": "0b6f7a52-3c1d-4e8a-9f20-5d7c1a2b3c4d",
      "optionId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "quantity": 2,
      "status": "CONFIRMED",
      "unitItems": [
        { "id": "a1b2c3d4-0000-4000-8000-000000000001", "status": "CONFIRMED",
          "myGrouponUrl": "https://www.groupon.com/mygroupons/users/<purchaserId>/details/a1b2c3d4-0000-4000-8000-000000000001?inventory_service=vis" },
        { "id": "a1b2c3d4-0000-4000-8000-000000000002", "status": "CONFIRMED",
          "myGrouponUrl": "https://www.groupon.com/mygroupons/users/<purchaserId>/details/a1b2c3d4-0000-4000-8000-000000000002?inventory_service=vis" }
      ]
    },
    {
      "productId": "1c7e8b63-4d2e-4f9b-a031-6e8d2b3c4d5e",
      "optionId": "8d0f7780-8536-41ef-a55f-f18fd2a01bf8",
      "quantity": 1,
      "status": "ON_HOLD",
      "unitItems": [
        { "id": "a1b2c3d4-0000-4000-8000-000000000003", "status": "ON_HOLD",
          "myGrouponUrl": "https://www.groupon.com/mygroupons/users/<purchaserId>/details/a1b2c3d4-0000-4000-8000-000000000003?inventory_service=vis" }
      ]
    }
  ]
}

What to show

StatusWhat to show
ON_HOLD, PENDING"Finalizing your order..." and poll again
CONFIRMEDSuccess page
REDEEMEDSuccess page, marked as used
REJECTED"Payment failed" and a link back to the cart
EXPIRED"This order was not completed" and a link back to the cart
CANCELLED"This order was cancelled."

The same statuses apply to the order, to each item and to each purchased unit. Treat a status you do not recognise as unresolved: show the order as not completed, keep the cart, and start no new purchase because of it.

Polling

Right after the redirect the status is often ON_HOLD or PENDING. Poll from your server after 2, 4, 8, 15 and 30 seconds, and stop as soon as it is neither. If it still is after the last try, show "Your order is being processed, you will receive a confirmation email from Groupon" with the purchase buttons you have.

The purchase buttons

Show one button per entry of an item's unitItems, linking to that entry's myGrouponUrl. The shopper signs in to Groupon to open it. A CANCELLED unit gets no button.