# Appmax

> Connect Appmax to your Cademí: the product kit ID and the Apphook (webhook) with the order and subscription events.

Connect Appmax to your Cademí so each approved order gives the student access on its own. You need the product kit ID (and the product ID inside it) and a webhook pointing to Cademí. Appmax 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 **Appmax**.
3. In **Delivery Name**, enter a name that helps you recognize it later.
4. In **Sales Mode**, choose **One-time sale** or **Subscription**, matching the product on Appmax.
5. The **Gateway connection** section shows the **Product Kit ID** field and the **Postback URL**.

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

## 2. Find the kit ID and the product ID

1. In the Appmax dashboard, open **Integrações** (Integrations) in the side menu.
2. Find your store's integration and click the ellipsis icon (**...**) next to it.
3. Copy the **ID do seu KIT** (your kit ID) and paste it into **Product Kit ID** in the Cademí delivery.
4. Go back to the same integration and click the edit icon on the side.
5. Open the **Produto** (Product) tab, copy the **Product ID** inside the kit and paste it into the same delivery field, next to the kit ID.

**Register both IDs.** With the kit ID and the product ID in the delivery, it keeps granting access if you change the kit on Appmax later.

## 3. Set up the webhook

1. In the Appmax dashboard, open **Configurações > Apphooks (Webhooks)** (Settings > Apphooks) in the side menu.
2. Click **Novo Webhook** (New webhook).
3. In **Loja** (Store), pick the store of your kit.
4. In **URL para Envio** (Sending URL), paste the **Postback URL** of the delivery.
5. Select only these events: Pedido aprovado, Pedido autorizado, Pedido pago, Pedido estornado, Upsell pago, Assinatura cancelada and Assinatura atrasada (approved, authorized, paid and reversed order, paid upsell, canceled subscription and late subscription).
6. Click **Salvar** (Save) and, in Cademí, save the delivery.
