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

  1. In Clakta, go to Project settings → Sales platforms.
  2. 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.
  3. In another tab, open Lastlink, go to Produtos and click the product you want to connect.
    produtos lastlink
  4. In the product's settings, open Integrações, find Lastlink - Webhook and click Ativar.
    integracoes lastlink
    ativar webhook lastlink
  5. Click Novo webhook and fill in the form:
    novo webhook lastlink
    • 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 LastlinkWhat happens in Clakta
      Compra CompletaRecords the sale.
      Pagamento de Renovação EfetuadoRecords each renewal as a new sale.
      Pagamento ReembolsadoMarks the order as refunded.
      Pagamento EstornadoMarks 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.

      configurar webhook lastlink

      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.

  6. At the top of the same form, Lastlink shows a code under Token. Click Copiar.
  7. Go back to Clakta, paste the code into Token and click Finish.
  8. Return to Lastlink and click Salvar.
    salvar webhook lastlink

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 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 Lastlink | Clakta