Asaas
Connect Asaas to your Cademí: the payment link ID, the API key that works as the token and the version V3 webhook with every billing event.
Connect Asaas to your Cademí so each paid charge gives the student access on its own. You need the payment link ID, an API key from your Asaas account and a webhook pointing to Cademí.
1. Create the delivery in Cademí
- In the Cademí dashboard, open Sales → Deliveries and add a delivery.
- In Select a Gateway, pick Asaas.
- In Delivery Name, enter a name that helps you recognize it later.
- In Sales Mode, choose One-time sale or Subscription, matching the billing on Asaas.
- The Gateway connection section shows the Payment Link ID and API Token fields and the Postback URL.
Keep the delivery open: you come back to it in the next steps.
2. Find the payment link ID
- In the Asaas dashboard, open Links de Pagamento (Payment links) in the side menu and create a link or pick an existing one.
- Inside the link, click Compartilhar (Share) and then Copiar link (Copy link).
- Paste the link into the address bar of a new browser tab: the ID is the part after the last slash of the address.
- Paste the ID into Payment Link ID in the Cademí delivery.
Several links: each payment link that gives access needs to be registered in a delivery. Paste more than one ID into the same field when they give the same access.
3. Copy the API key
The Asaas notification does not carry all the purchase data. On each notification, Cademí uses the API key to fetch the rest from your Asaas account and grant the delivery. Without the key, the sale cannot be completed.
If you already registered your Asaas key in another delivery, pick it in Use an already registered token and go to step 4.
- In the Asaas dashboard, click your photo in the top right corner and open Integrações (Integrations).
- Click Chaves de API (API keys) and then Gerar chave de API (Generate API key).
- Name it "Cademí", with no expiration, and click Avançar (Next).
- Confirm the two-step verification with the code sent by SMS.
- Copy the key and leave it as Habilitada (Enabled).
- Paste the key into API Token in the Cademí delivery.
4. Set up the webhook
- Still under Integrações in the Asaas dashboard, click Webhook and then + Adicionar Webhook (Add webhook). Use version V3.
- In Nome do Webhook (Webhook name), enter "Cademí".
- In URL, paste the Postback URL of the delivery.
- In Fila de Sincronização Ativa (Sync queue active), choose Sim (Yes).
- In Tipo de Envio (Sending type), choose Sequencial (Sequential).
- In Cobranças (Charges), choose Todos os eventos (All events).
- Click Salvar (Save) and, in Cademí, save the delivery.
The webhook queue: Asaas sends its notices in a queue. If one delivery attempt fails, the queue may stop and the following sales no longer reach Cademí. If sales stop showing up, check in Asaas whether the webhook queue is still active and reactivate it.