Build on the Partner API

View as Markdown

Checkout and order confirmation

Last updated ยท Page 1 of 11

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.

Groupon has two checkout pages. Its cobranded checkout shows your logo, sends the shopper back to your redirect URL after paying and to your continue shopping URL when they leave without buying. Groupon reviews every logo you upload, usually within a working day; once it approves your logo, your storefront's buyLink opens the cobranded checkout. Until then, and while a logo you replace it with waits for its own review, the buyLink opens Groupon's own checkout: it shows no logo, and the shopper stays on Groupon's receipt page after paying, so your redirect URL and your continue shopping URL are not used. A logo Groupon does not approve is taken down, with the reason on your storefront's page. Read the cart from your server to learn the sale (below).

The return redirect

With a redirect URL on your storefront, Groupon's cobranded checkout 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, with the shopper back on your site, it creates a new cart from the snapshot and offers the shopper its buyLink: the declined cart answers buyLink: null.
  5. Renders the confirmation page.

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