# Hubla

> Connect Hubla to your Cademí: the product ID on the Ofertas tab and the webhook rule under Integrações with subscription and invoice events.

Connect Hubla to your Cademí so each approved purchase gives the student access on its own. You need the product ID and a webhook pointing to Cademí. Hubla 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 **Hubla**.
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 Hubla.
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 ID

1. In the Hubla dashboard, click **Produtos** (Products) in the side menu and open the product.
2. Open the **Ofertas** (Offers) tab: the product ID appears below the offer name.
3. Paste the ID into **Product ID** in the Cademí delivery.

## 3. Set up the webhook

1. In the Hubla dashboard, open **Integrações > Webhooks** (Integrations > Webhooks) and click **Adicionar Webhook** (Add webhook).
2. In the settings section, click **Adicionar Regra** (Add rule).
3. In **Nome** (Name), enter "Cademí".
4. In **URL**, paste the **Postback URL** of the delivery.
5. In **Produtos** (Products), choose all of them or only the ones you deliver through Cademí.
6. In **Eventos** (Events), select: Assinatura criada, Assinatura ativa, Assinatura desativada, Assinatura expirada, Renovação de assinatura desativada, Renovação de assinatura ativada, Pagamento da fatura realizado, Pagamento da fatura falhou, Fatura expirada, Fatura reembolsada, Solicitação de reembolso, Solicitação de reembolso aceita, Solicitação de reembolso cancelada, Solicitação de reembolso rejeitada, Assinatura cancelada and Venda cancelada (subscription created, active, deactivated, expired and canceled; renewal deactivated and activated; invoice paid, failed, expired and refunded; refund requested, accepted, canceled and rejected; sale canceled).
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 rule.
