# TMB

> Connect TMB to your Cademí: the product code, the students' access link and the product's Webhook Financeiro, where the Postback URL is pasted.

Connect TMB to your Cademí so each approved purchase gives the student access on its own. You need the product code and TMB's Webhook Financeiro (financial webhook) pointing to Cademí.

## 1. Create the delivery in Cademí

1. In the Cademí dashboard, open **Sales > Deliveries** and add a delivery.
2. In **Select a Gateway**, pick **Tmb**.
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 TMB.
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 code

If you do not have the product on TMB yet, create it there first.

1. In the TMB dashboard, open **Produtos > Produtos** (Products) in the side menu.
2. Copy the code shown below the product name, usually 5 or 6 digits long.
3. Paste the code into **Product ID** in the Cademí delivery.

**Students' access link:** in the product settings on TMB, fill in the **Link de acesso dos alunos** (students' access link) field with the address of your Cademí login page.

## 3. Set up the Webhook Financeiro

1. In the TMB dashboard, open **Produtos** in the side menu.
2. Click the three dots next to the product name and open **Mais Opções do Produto > Integrações > Webhook Financeiro** (More product options > Integrations > Financial webhook).
3. In **URL**, paste the **Postback URL** of the delivery.
4. **Valor** (Amount) is optional, and **ID Externo** (External ID) does not need to be filled in.
5. In **Status**, turn the integration on.
6. Click **Atualizar** (Update) and, in Cademí, save the delivery.

**One webhook per product:** the Webhook Financeiro lives inside each product. Repeat these steps for each product you deliver through Cademí.

**Installment boleto:** if the product is sold with installment boleto, always use the Webhook Financeiro. It sends the events that keep the student's subscription status up to date.
