# Payt

> Connect Payt to your Cademí: the product code, the postback with the sale events and the postback's unique key, which is the delivery's integration key.

Connect Payt to your Cademí so each approved purchase gives the student access on its own. You need the product code, a postback pointing to Cademí and the unique key of that postback, which the delivery asks for as the integration key.

## 1. Create the delivery in Cademí

1. In the Cademí dashboard, open **Sales > Deliveries** and add a delivery.
2. In **Select a Gateway**, pick **Payt**.
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 Payt.
5. The **Gateway connection** section shows the **Product Code** and **Integration Key** fields and the **Postback URL**.

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

## 2. Find the product code

1. In the Payt dashboard, open **Ofertas e Produtos** (Offers and products) in the top menu and click **Produtos** (Products).
2. Copy the product code, without the **#** symbol.
3. Paste the code into **Product Code** in the Cademí delivery.

## 3. Set up the postback

1. Still under **Ofertas e Produtos**, click **Postbacks** and create a new postback.
2. In **URL**, paste the **Postback URL** of the delivery.
3. In **Produto** (Product), choose every product you deliver through Cademí.
4. In **Eventos** (Events), select Finalizada/Aprovada, Cancelada, Cancelada - Chargeback and Cancelada - Reembolsada (completed or approved, canceled, canceled by chargeback and canceled by refund).
5. Save the postback.

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

## 4. Copy the integration key

If you already registered your Payt key in another delivery, pick it in **Use an already registered token** and save the delivery. Setup ends here.

1. With the postback saved, copy the **Chave Única** (Unique key) shown in the top right corner of the postback screen.
2. Paste the key into **Integration Key** in the Cademí delivery and save the delivery.
