Getting started

How to connect my Asaas payment gateway

Connect your Asaas account to Baila (the BYOG model) so you receive payments directly, with nobody in between.

Baila uses the BYOG (Bring Your Own Gateway) model: the ticket money lands straight in your Asaas (the payment gateway) account, without ever passing through Baila. For that to work, you have to connect your Asaas account to the dashboard once.

Before you start

You will need:

  • An active Asaas account with a verified CPF (Brazilian taxpayer ID) or CNPJ (Brazilian company tax ID)
  • Your Asaas API key (production or sandbox) — get it at asaas.com under Perfil (top-right corner) → Integrações → Chaves da API
  • Your Baila profile already filled in with a CPF/CNPJ (see the related article)

Step by step

In the Baila dashboard, open Integrations in the side menu. Under Payment gateways, click Install (or Configure, if it is already installed) on the Asaas card. The settings open in a window.

Paste the API key you copied from the Asaas dashboard into the Asaas API key field and click Save. The key is stored encrypted and never shown back — once saved, the field only tells you a key is on file; type in it only to replace it.

When you save, Baila makes a test call to the Asaas API to confirm the key works (you can repeat it with Validate credentials). If it fails, review the status of your Asaas account (verified CPF/CNPJ, account active and with nothing outstanding) before trying again. Until the key is validated, you cannot publish paid events.

Next, set up the webhook in the Asaas dashboard following the section below. Without it, payment confirmations, refunds, and chargebacks never reach Baila.

Never share your Asaas API key. It grants full access to the account your money lands in. If you suspect it leaked, revoke the key in the Asaas dashboard immediately and generate a new one.

Setting up the webhook at Asaas

In the Asaas dashboard, go to Integrações → Webhooks → Adicionar Webhook and fill in exactly the fields below. Without this step, Baila receives no payment confirmations, refunds, or chargebacks. The Asaas dashboard is Portuguese-only, so each field is given below by its literal Asaas label with the English meaning next to it.

Webhook details

  • Este Webhook ficará ativo? (will this webhook be active?) — turn the toggle on.

  • Nome do Webhook (webhook name) — any name you recognize, for example Baila.

  • URL do Webhook (webhook URL) — paste exactly:

    https://api.vaidebaila.app/api/webhooks/asaas
  • E-mail — an address you actually check: Asaas uses it to warn you if webhook delivery fails.

  • Versão da API (API version) — select v3.

  • Token de autenticação (authentication token) — paste the webhook token generated by Baila. In the Baila dashboard, under Integrations › Asaas, in the Webhook section, click Generate token and then Copy (the baila_whk_... format). If you generated a token before, it is still the same one — nothing needs to change in Asaas. That token is how Baila confirms the webhook really came from your Asaas account.

  • Tipo de envio (delivery mode) — select Sequencial (sequential; recommended, so event order is preserved).

  • Fila de sincronização ativada? (sync queue enabled?) — leave it on.

Events to tick

Under Adicionar Eventos → Cobranças (charges), tick the events below.

Shortcut: you can click Selecionar Todos (select all) in the Cobranças section — the extra events are ignored by Baila with no side effects.

If you would rather tick only what is needed, enable just these (Baila ignores the rest):

  • PAYMENT_RECEIVED
  • PAYMENT_CONFIRMED
  • PAYMENT_OVERDUE
  • PAYMENT_DELETED
  • PAYMENT_REPROVED_BY_RISK_ANALYSIS
  • PAYMENT_REFUND_IN_PROGRESS
  • PAYMENT_REFUNDED
  • PAYMENT_CHARGEBACK_REQUESTED
  • PAYMENT_AWAITING_CHARGEBACK_REVERSAL
  • PAYMENT_CHARGEBACK_DISPUTE

Click Salvar (save) in the top-right corner to finish.

What happens if the key expires

If Asaas revokes or invalidates your key, Baila can no longer capture payments. You will not be able to publish new paid events until you register the key again and validate it under Integrations › Asaas.

Check what is missing: the Payments page

The Payments page (side menu) shows, step by step, what is ready on your gateway — key saved, key validated, webhook, payout account — and what each step unlocks: selling tickets and publishing paid events, fan-club billing, co-hosting with revenue sharing. Every pending step has a button that opens the Asaas window right at that spot.