# B4you

> Connect B4you to your Cademí: the product or plan ID and one webhook per product under Apps > Webhooks, with the purchase and subscription events.

Connect B4you to your Cademí so each approved purchase gives the student access on its own. You need the product ID (or the plan ID) and one webhook per product pointing to Cademí. B4you 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 **B4you**.
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 B4you.
5. The **Gateway connection** section shows the **Product ID or Plan 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 B4you dashboard, open **Produtos > Meus Produtos** (Products > My products).
2. Open the product you deliver through Cademí and copy its **ID**.
3. Paste the ID into **Product ID or Plan ID** in the Cademí delivery.

**Subscriptions:** for a subscription delivery, use the plan ID in the same field.

## 3. Set up the webhook

1. In the B4you dashboard, open **Apps > Webhooks** and click **Nova Integração** (New integration).
2. In the webhook name, enter "Cademí" and the product name.
3. In **URL**, paste the **Postback URL** of the delivery.
4. Pick the product that will send the sales.
5. Select the events: Compra aprovada, Compra recusada, Reembolso, Chargeback, Boleto gerado, Pix gerado, Assinatura cancelada, Assinatura atrasada and Assinatura renovada (approved and declined purchase, refund, chargeback, boleto issued, Pix issued, canceled, late and renewed subscription).
6. Save the webhook and, in Cademí, save the delivery.

**One webhook per product:** B4you sets up the webhook product by product. Repeat these steps, with one delivery per product, each time you start delivering a new product through Cademí.
