# Hand off to checkout

Ziffi does not take payment. Checkout completes on the brand's own store. Your app builds a cart, then hands the shopper to the brand's Shopify checkout. Send your key on the hand-off to be credited for the order.

> This surface is on the roadmap. The mechanism below is what the storefront already does today; the `/v1/cart` and `/v1/checkout` endpoints expose the same hand-off to your app.

## The flow

1. Collect the products the shopper wants (from search or product detail).
2. Build a cart grouped per brand (each brand checks out on its own store).
3. Get one checkout URL per brand.
4. Redirect the shopper to that URL. They complete the purchase as a guest on the brand's store.

```bash
# planned
curl -X POST "https://dev.ziffi.xyz/v1/checkout" \
  -H "Content-Type: application/json" \
  -H "X-Ziffi-Key: zk_live_your_key_here" \
  -d '{"cart_id": "…", "attribution": "your-ref"}'
```

## Attribution

The hand-off carries a signed attribution token. Your key ties the order back to your app, which is how brand partnerships and commission work. Verify a token and list attributed orders through the reporting endpoints (planned).

## v1 checkout is guest-only

The first version hands the shopper to the brand's checkout as a guest. There is no Ziffi account and no per-brand shadow customer to manage. Federated accounts, where one Ziffi identity maps to a customer at each brand, come later.

## Next steps

- [Authentication](#/authentication): why the key matters here.
- [Get live price](#/price): confirm the price before hand-off.
