# Cartpanda

> Connect Cartpanda to your Cademí: the product and variation IDs, one webhook per event under Notificações and the retroactive sending of the day's sales.

Connect Cartpanda to your Cademí so each approved purchase gives the student access on its own. You need the product ID (and the ID of each variation, if any) and webhooks pointing to Cademí. Cartpanda does not ask for a token.

## 1. Create the delivery in Cademí

1. In the Cademí dashboard, open **Sales > Deliveries** and add a delivery.
2. In **Select a Gateway**, pick **Cartpanda**.
3. In **Delivery Name**, enter a name that helps you recognize it later.
4. **Sales Mode** shows only **One-time sale**: a Cartpanda delivery has no **Subscription** option.
5. The **Gateway connection** section shows the **Product or Variant ID** field and the **Postback URL**.

Keep the delivery open: you come back to it in the next steps.

## 2. Find the product ID

1. In the Cartpanda dashboard, open **Produtos** (Products) and click the product you deliver through Cademí.
2. Copy the product ID shown in the browser's address bar.
3. Paste the ID into **Product or Variant ID** in the Cademí delivery.

**Product with variations:** if the product has variations (offer IDs), Cartpanda sends the product ID and the variation ID in the same sale. Register both in the delivery.

## 3. Set up the webhooks

1. In the Cartpanda dashboard, open **Notificações** (Notifications) and click **Configurar Webhooks** (Set up webhooks).
2. Click **Criar Webhook** (Create webhook), choose the event and, in **Endpoint**, paste the **Postback URL** of the delivery.
3. Repeat, one webhook per event, for: Pedido pago, Pedido atualizado, Pedido reembolsado, Produto criado, Produto atualizado and Produto excluído (order paid, updated and refunded; product created, updated and deleted).
4. In Cademí, save the delivery.

**Attention:** as soon as a webhook is saved, Cartpanda sends that day's sales to Cademí retroactively. Finish the setup only when your Cademí is ready to receive students, with the deliveries and products in place.
