# Assiny

> Connect Assiny to your Cademí: the product or offer ID and the webhook under Integrações with the purchase, refund and subscription events.

Connect Assiny to your Cademí so each approved purchase gives the student access on its own. You need the product ID (or the offer ID) and a webhook pointing to Cademí. Assiny 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 **Assiny**.
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 Assiny.
5. The **Gateway connection** section shows the **Product ID** field and the **Postback URL**.

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

## 2. Find the product or offer ID

1. In the Assiny dashboard, open the **Produtos** (Products) tab and find the product.
2. To use the whole product, click the **ID** button next to it and copy the code.
3. To use a specific offer, click **Ver Ofertas** (See offers) and copy the offer ID.
4. Paste the value into **Product ID** in the Cademí delivery.

**More than one product in the cart:** each item in the purchase, order bumps included, releases the delivery that holds its ID. Register one delivery for each product that gives access.

## 3. Set up the webhook

1. In the Assiny dashboard, open the product's project.
2. In the side menu, open **Integrações > Webhooks** (Integrations > Webhooks) and click **Novo Webhook** (New webhook).
3. In the webhook name, enter "Cademí".
4. In the URL field, paste the **Postback URL** of the delivery.
5. In **Sobre o Produto** (About the product), choose all products or only the ones you deliver through Cademí.
6. In **Eventos** (Events), select: Compra aprovada, Compra completa, Compra reembolsada, Chargeback, Reembolso solicitado, Assinatura cancelada and Renovação de assinatura (approved, completed and refunded purchase, chargeback, refund requested, canceled subscription and subscription renewal).
7. Click **Salvar** (Save) and, in Cademí, save the delivery.

**If you chose only some products:** each time you start delivering a new product through Cademí, add it to this webhook.
