Connect Lastlink
Send your Lastlink sales, renewals, refunds and chargebacks to Clakta over a webhook, and see which ad or channel brought each sale.
Lastlink tells Clakta every time a sale is paid, a subscription renews, or a payment is refunded or charged back. That notice is called a webhook. In Lastlink, webhooks live inside each product, so you set one up for every product you sell. It takes a couple of minutes per product.
Connect
- In Clakta, go to Project settings → Sales platforms.
- Choose Lastlink, give the connection a name (the product's name works well), and click Create connection. Clakta shows a Webhook URL. Keep this window open.
- In another tab, open Lastlink, go to Produtos and click the product you want to connect.

- In the product's settings, open Integrações, find Lastlink - Webhook and click Ativar.


- Click Novo webhook and fill in the form:

-
Nome do webhook: anything you like, for example "Clakta".
-
URL: paste the URL Clakta showed you.
-
Eventos: click Selecionar and tick these four events:
Event in Lastlink What happens in Clakta Compra Completa Records the sale. Pagamento de Renovação Efetuado Records each renewal as a new sale. Pagamento Reembolsado Marks the order as refunded. Pagamento Estornado Marks the order as refunded. Pagamento Estornado is Lastlink's name for a chargeback. If you sell subscriptions, don't leave out Pagamento de Renovação Efetuado. Without it, Clakta only sees each subscriber's first payment.

Ticking other events does no harm: Clakta receives them and ignores what it doesn't use. That includes Fatura Criada and Carrinho Abandonado. An invoice for a Pix or boleto isn't a sale yet. It reaches Clakta when the payment is confirmed and Lastlink sends Compra Completa.
-
- At the top of the same form, Lastlink shows a code under Token. Click Copiar.
- Go back to Clakta, paste the code into Token and click Finish.
- Return to Lastlink and click Salvar.

That's it. From then on, each sale of that product shows up in Clakta a few seconds after it's paid in Lastlink.
Selling more than one product
Repeat the steps for each product, and create a new connection in Clakta every time. Each connection has its own URL and token, so don't reuse the URL from another product. When you launch a new product in Lastlink, connect it the same way.
Turn on the Clakta script
To see which ad or channel each sale came from, install the Clakta script on the pages that lead to your Lastlink checkout. When a visitor clicks a checkout link (the ones that start with lastlink.com/p/), the script attaches their visit to that link on its own. You don't need to change your links.
Projects in privacy-friendly mode don't send this information, so sales still arrive, but without their source.
If your site builds the checkout link itself
If visitors reach the checkout through a redirect from your server, the script can't see the click. In that case, ask whoever runs your site to add the session to the link:
clakta.decorateLastlinkUrl(url) does the same thing.
Troubleshooting
Related articles
Connect Shopify
Install the Clakta app on your Shopify store. It sets up checkout tracking, imports your recent orders and matches each sale to the ad that produced it.
Connect Lemon Squeezy
Send your Lemon Squeezy orders, renewals and refunds to Clakta over a webhook, and credit each sale to the visitor who made it.
Connect Dodo Payments
Point Dodo Payments at Clakta with a webhook so your payments, refunds and chargebacks arrive automatically, and each sale is matched to the visitor who made it.