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.

This is done in the organizer dashboard

Open the dashboard at dashboard.vaidebaila.app. The vaidebaila.app website is where the public buys tickets; managing your events happens in the dashboard. When a step happens somewhere else, such as the check-in app, the article says where.

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. You set it up once, and only events with paid tickets need it. Start with the Asaas registration: its approval is the slowest step.

Before you start

You do not need a CPF (Brazilian taxpayer ID) or CNPJ (Brazilian company tax ID) in your Baila profile. Each link opens the right Asaas page; apart from sign-up, if you are not signed in, Asaas asks you to sign in first. The Asaas dashboard is Portuguese-only, so each place is given by its literal Asaas label.

What to doWhere it is in AsaasLink
Create the account (free)Sign-upOpen in Asaas
See what the approval is missingMinha conta › Situação cadastralOpen in Asaas
Send your documentsMinha conta › DocumentosOpen in Asaas
Fill in your business informationMinha conta › Informações › Dados comerciaisOpen in Asaas
Add your bank accountMinha conta › Informações › Contas BancáriasOpen in Asaas
Enable splitIntegrações › SegurançaOpen in Asaas
Generate the API keyIntegrações › Chaves de APIOpen in Asaas

1. Create your Asaas account

Your Asaas account is where the ticket money lands. It is free, with a CPF or a CNPJ.

In Asaas: the sign-up page · Open in Asaas

  1. Fill in your e-mail and password (1).
  2. Accept the terms (2).
  3. Click Criar conta (create account) (3).

The Asaas sign-up page, in Portuguese: 1, the e-mail and password fields; 2, accepting the terms; 3, the Create account button

2. Get your account approved by Asaas (KYC/KYB)

Until Asaas approves your registration, it refuses every charge, by Pix or by card. The review takes 2 to 7 days (see the times): do this step before the others.

In Asaas: Perfil › Minha conta › Situação cadastral (profile › my account › registration status) · Open in Asaas

  1. Under Situação cadastral (1), see what is missing.
  2. Fill in your business information (2) and send your documents (3) through each stage's Clique aqui (click here) link. Add your bank account too.
  3. Follow each stage's status (4). Baila e-mails you once the account is approved.

The registration status tab of My account in Asaas, in Portuguese: 1, the registration status tab; 2, the click-here link for business information; 3, the click-here link for documents; 4, each stage's status: approved, under review and pending

Under Documentos (documents) (1), each document shows its status (2). The ID documents and the selfie are sent through the Asaas app or the onboarding link, as the screen says.

The documents tab of My account in Asaas, in Portuguese, with the account holder's name hidden: 1, the documents tab; 2, the under-review status of the ID documents

What each of Baila's approval notices means is under Asaas account approval (KYC/KYB).

3. Enable payment split

Split sets aside, on every sale, Baila's service fee and, when co-hosting, each co-host's share. Since November 2026, Asaas blocks split on accounts that have never used it, and Baila cannot check whether it is on: enable it before your first sale.

In Asaas: Perfil › Integrações › Segurança (profile › integrations › security) · Open in Asaas

  1. Open the Segurança tab (1).

    The Integrations tabs in Asaas: 1, the Security tab

  2. In Habilitar Split de pagamento (enable payment split), click Habilitar Split (2) and confirm with the code sent by SMS or with the Token App. The Situação (status) changes from Desabilitado (disabled) to Habilitado (enabled).

    The Enable payment split panel in Asaas, with the status Disabled and, at 2, the Enable split button

Accounts that have already used split do not need to do anything. On a subaccount, the main account enables it, and that applies to every subaccount.

4. Generate the API key

The API key lets Baila create the charges in your account. Generate a production key: a sandbox key is refused.

In Asaas: Perfil › Integrações › Chaves de API (profile › integrations › API keys) · Open in Asaas

  1. Click your profile icon in the top-right corner (1), then Integrações (2).

    The Asaas profile menu, in Portuguese, with the e-mail and bank details hidden: 1, the profile icon; 2, the Integrations item

  2. Open the Chaves de API tab (1) and click Gerar chave de API (generate API key) (2).

    The API keys tab at Asaas, in Portuguese: 1, the API keys tab; 2, the Generate API key button

  3. Copy the key right away: Asaas shows it only once.

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

5. Connect Asaas to Baila

Baila tests the key with Asaas right away and stores it encrypted; it is never shown back.

In Baila: Integrations › Payment gateways › Asaas › Install (or Configure), or the Connect Asaas button on the page of an event with paid tickets.

  1. In the Connect Asaas window, click I have the key (1).

    Step 1 of the Connect Asaas window: Get your API key from Asaas, with where to find the key in Asaas and the Open Asaas and I have the key buttons; 1, the I have the key button

  2. Paste the key in the field (1) and click Save and validate (2). The window validates the key and gets everything ready to receive: there is nothing else to copy or paste.

    Step 2 of the Connect Asaas window: 1, the Asaas API key field (hidden); 2, the Save and validate button

The sections under the window (Installments and fees, Invoices and Split revenue with co-hosts) are optional. If Asaas refuses the key, see Key refused or expired.

6. Publish the paid event

With the key validated and the account approved, the window says Ready to sell.

In Baila: the Connect Asaas window; what is still missing shows under Finance › Payments.

  1. Click Go back and publish the event (1) and publish it.
  2. If the account is not approved yet, the window shows the Asaas account approval notice instead of Ready to sell: see what each notice means.

The Connect Asaas window done: Ready to sell, with the three steps complete and, at 1, the Go back and publish the event button

If something does not work

Asaas account approval (KYC/KYB)

Asaas checks the person who holds the account (KYC, know your customer) and, for a company account, the company itself (KYB, know your business). Baila checks the approval on its own: when the key is validated, when you open the Payments page or the Asaas window, every hour while the account is not approved (about once a day after), and whenever Asaas refuses a charge because of the account.

The Asaas account approval notice, on the Payments page (Finance › Payments) and in the Connect Asaas window, shows what Asaas answered:

What Baila showsWhat it meansWhat to do
Asaas needs information to approve your accountAsaas is waiting for Business information, Bank account and/or Documents.Click Open Asaas and send what it asks for (step 2).
Your account is under review at AsaasYou sent everything and Asaas is reviewing it.Nothing: Baila e-mails you once it is approved.
Asaas rejected your account registrationAsaas did not approve the account.Contact Asaas support, or connect another Asaas account.
We could not check your Asaas account yetAsaas did not answer Baila.Nothing: Baila checks again on its own. If you like, click Check now in a moment.
Account approved, but no active Pix keyCards are enabled, but buyers are not offered Pix yet.Usually nothing: Baila creates a random Pix key in your Asaas account right after the approval, and Pix shows up within minutes. If the notice stays, see No Pix key.
No noticeAccount approved with an active Pix key: Pix and card enabled.Nothing.

The Check now button asks Asaas right away, for example just after you send your documents. It shows for members who manage payments, with the date of the last check under the notice.

What is blocked until the approval

  • Publishing an event with paid tickets (and putting a paid tier on sale on an event already published): the event page says that Asaas has not approved your account yet (KYC/KYB), that without the approval no payment — Pix or card — is received, and to see what is missing under Finance › Payments.
  • New fan-club subscriptions: the fan sees This fan club is not accepting payments right now. Please try again later.
  • Events that were already on sale: buyers see This event is not accepting payments right now. Please try again later., instead of having Asaas refuse the charge.

Free events do not depend on the approval. As soon as Asaas approves the account, everything works again on its own, with no need to reconnect or publish again.

How long Asaas takes to approve the account

Asaas states up to 2 business days for the review, counted from the moment every document is sent. Among Baila's organizers, an account opened with a CNPJ is usually approved in about 2 days; one opened with a CPF, in about 3 days, and it has taken up to 7. The time is Asaas's: Baila cannot speed the review up.

Open the Asaas account at least a week before you start selling. While the review runs, create the event and leave everything ready: as soon as Asaas approves the account, you only have to publish.

E-mail notices

Your organization's main contact gets an e-mail when the account stops being approved (under review, with something missing, or rejected), with what is missing and the link to Asaas, and another one when Asaas approves it. An account approved from the start sends no e-mail.

No Pix key

Without an active Pix key, Asaas cannot reliably generate the Pix QR code: in some cases it still generates a temporary one that can only be paid until 11:59 PM the same day, and Asaas itself says this will end. That is why Baila hides Pix from buyers, on the website and in the app, until the key is active.

You do not have to register a key: as soon as Asaas approves the account, Baila creates a random Pix key in it, which takes a few minutes to become active. If you already have a key (of any type), Baila does not create another. Meanwhile, the Payments page shows the Active Pix key at Asaas step as Needs attention, and both it and the Asaas window show the notice Account approved, but no active Pix key.

If the notice lasts more than an hour, register the key yourself: In Asaas: Pix › Minhas chaves (Pix › my keys) · Open in Asaas. Click Cadastrar chave (register key) and pick the key type (the account's CNPJ or CPF, e-mail, phone or random key); Asaas may ask for an SMS or Token App confirmation. In Baila, click Check now on the Pix key notice.

The window asked for the webhook (step 3)

Almost always, Baila gets everything ready by itself when it validates the key. If Asaas refuses or does not answer, the window shows step 3, We could not turn on payment notifications for you, with the URL and token to copy. Without it, Pix does not turn into tickets and Baila does not publish the paid event (it says you have to set up the Asaas webhook before selling paid tickets, because without it Asaas cannot confirm payments). Then do it by hand:

In Asaas: Perfil › Integrações › Webhooks › Adicionar Webhook (profile › integrations › webhooks › add webhook) · Open in Asaas

  1. In Baila's window, copy the webhook URL (1) and the token (2).

    Step 3 of the Connect Asaas window: the webhook URL and the authentication token (hidden), each with a Copy button (1 and 2), and the Pasted in Asaas, finish button (3)

  2. In Asaas, open the Webhooks tab (1) and click Adicionar Webhook (2). Paste the URL and the token, pick v3 under Versão da API (API version) and Sequencial (sequential) under Tipo de envio (delivery mode), click Selecionar Todos (select all) under Cobranças (charges) and save. Each field is explained in Webhook fields.

    The Webhooks tab at Asaas, in Portuguese: 1, the Webhooks tab; 2, the Add webhook button

  3. In Baila, click Pasted in Asaas, finish (3). Baila checks the webhook with Asaas itself within 2 minutes. If the time runs out, the window says what is missing (for example, the webhook is off or lacks the events): check the URL and token you pasted, or click Check again, which also tries to set everything up again.

The Connect Asaas button on the event page reopens the window right on that step.

The event page after Publish with a validated key but no webhook: the notice to set up the Asaas webhook before selling paid tickets, with the Connect Asaas button

Webhook fields

The numbers match the screenshot.

  1. Este Webhook ficará ativo? (will this webhook be active?): turn it on.
  2. Nome do Webhook (webhook name): any name, for example Baila.
  3. URL do Webhook (webhook URL): paste exactly https://api.vaidebaila.app/api/webhooks/asaas.
  4. E-mail: an address you read; Asaas uses it to warn you if webhook delivery fails.
  5. Versão da API (API version): v3.
  6. Token de autenticação (authentication token): Baila's token (the baila_whk_... format), from step 3 of the Connect Asaas window. It is generated the first time and stays the same afterwards. Do not click Gerar Token (generate token): the token is Baila's, and it is how Baila confirms the webhook came from your account.
  7. Tipo de envio (delivery mode): Sequencial (sequential), which keeps the events in order.
  8. Fila de sincronização ativada? (sync queue enabled?): leave it on.
  9. Salvar (save): in the top-right corner, once the events are ticked.

The Asaas webhook form, in Portuguese, with numbered fields: 1, will this webhook be active; 2, webhook name (Baila); 3, webhook URL; 4, e-mail; 5, API version v3; 6, authentication token; 7, sequential delivery mode; 8, sync queue enabled; 9, the Save button

Under Adicionar Eventos › Cobranças (add events › charges), Selecionar Todos (select all) is enough: Baila ignores the events it does not use, with no side effects.

The charges group of the webhook at Asaas, in Portuguese, with the ten events Baila uses ticked and highlighted, and an arrow pointing at the Select all button

To tick only what is needed: 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 and PAYMENT_CHARGEBACK_DISPUTE. If you also issue invoices through Asaas, the INVOICE_* events go on this same webhook, in the Notas fiscais (invoices) group (see How to issue NFS-e invoices automatically with Asaas).

Key refused or expired

If Asaas refuses the key, you see Asaas refused this key. Check that you copied the production key (not the sandbox one). Check the key and that your Asaas account is active with nothing outstanding, and try again. If a key was saved but not validated (Asaas did not answer at the time), Validate the saved key checks it again without pasting it once more.

Step 2 of the Connect Asaas window: the key field (hidden) with Save and validate, and the notice that Asaas refused the key

If Asaas revokes or invalidates the key, Baila can no longer capture payments and you cannot publish new paid events until you register a new key under Integrations › Asaas. Events already on sale keep selling. When you register the new key, the window validates it and gets everything ready again.

Connecting from the event page

Paid tiers can be created before you connect the gateway. On a draft with paid tickets, the Get your event ready to publish checklist (the Summary tab) gains the Connect your payout account step, with a Connect Asaas button. The step is done once Baila has checked the webhook and Asaas has approved the account; when only the approval is left, the button becomes See approval. If you try to publish before that, the page says what is missing (no validated gateway, the webhook notice or the approval notice) and the Asaas window opens right there, on the missing step.

The Get your event ready to publish checklist of a draft with paid tickets: Connect your payout account, with the Connect Asaas button, before Publish

The Payments page

Under Finance › Payments, Payment methods says which account takes Pix and card (with Mercado Pago also connected, you choose there who takes Pix; card always stays on Asaas) and Connected accounts shows Asaas and, when there is one, Mercado Pago. Below, each gateway step shows as done or pending (key saved, key validated, account approved by Asaas, active Pix key, webhook token generated, webhook checked, payout account), with what it unlocks: selling tickets and publishing paid events (a validated key, an approved account and the webhook checked), fan-club billing (a validated key and an approved account) and co-hosting with revenue sharing (a verified payout account). The payout account (Wallet ID) is only used to split revenue when co-hosting. Every pending step has a button that opens the Asaas window right at that spot.

Automatic invoices (optional)

With a company (CNPJ) Asaas account, the Invoices section of the same window turns on automatic NFS-e issuing: for every paid sale, Asaas issues the invoice on behalf of your company and sends it to the buyer. See How to issue NFS-e invoices automatically with Asaas.