MobiariDocs

Asaas

Take credit cards, in installments, into your Asaas account.

With Asaas connected, your online store's credit card payments go to your Asaas account. At checkout, the customer picks the installments in your store and is taken to Asaas's secure page to type the card. Once paid, they come back to the order page in your store, and the order is confirmed by itself. Card details stay with Asaas: they never pass through Mobiari.

Asaas can also issue boleto, when you switch it on. Pix stays with Mercado Pago or Banco Inter. If Mercado Pago is also connected, cards go through Asaas.

Before you start

  • An Asaas account.
  • Permission to generate API keys on that account.
  • Your store's address, to register at Asaas (see Coming back to the store).

1. Create an API key at Asaas

  1. Sign in to your Asaas account.
  2. Open Integrações → Chaves de API and click Gerar chave de API.
  3. Copy the key. It is shown only once. Production keys start with $aact_prod_ and sandbox (test environment) keys with $aact_hmlg_.

2. Connect it in Mobiari

  1. In the panel, open Settings → Payments and freight and, under Pagamentos (Payments), click Asaas.
  2. Paste the Chave de API (API key) and click Salvar (Save).

Mobiari checks the key with Asaas right away and sets up the webhook that confirms payments by itself, named "Mobiari" under Integrações → Webhooks. Don't delete or pause that webhook. If something is wrong, the screen shows "O Asaas recusou a conexão:" followed by Asaas's message. Once saved, Test connection checks the key whenever you want, and the Ativo (Active) switch turns cards through Asaas on or off at checkout.

Integration screens stay in Portuguese

The labels on this screen are shown in Portuguese even when the dashboard is in English.

To test without charging for real, use an Asaas sandbox key ($aact_hmlg_). The environment comes from the start of the key; the Ambiente de testes (sandbox) option is only for old keys without that prefix. Then switch to the production key.

Coming back to the store

For the customer to come back to your store by themselves after paying, your store's address must be registered at Asaas under Minha conta → Informações comerciais → Site. Without it, payments still work and orders are confirmed, but the customer stays on Asaas's page instead of coming back.

Installments and fees

The installments offered are your store's, under Settings → Store settings → Orders and deadlines → Installments. With Store interest (monthly rate), installments past the interest-free ones carry your rate, and Asaas charges the total with interest. Mercado Pago interest, paid by the customer does not apply on Asaas: only the interest-free installments are offered. In the interest-free installments, the customer pays the same total in any number of installments. Asaas's fees are charged to your account, according to your Asaas plan.

Asaas requires the payer's CPF or CNPJ, so checkout asks for it for cards as well. Asaas's own e-mails and texts to the customer are switched off: your store is the one that tells the customer about the order.

Saved cards

With Settings → Store settings → Orders and deadlines → Saved cards → Offer to save the card on, a customer with an account can tick Salvar este cartão para as próximas compras before going to Asaas's page. Once the payment is approved, the store keeps the card token Asaas returns, with the brand and the last 4 digits. Next time, the customer picks the card under Seus cartões salvos and pays without leaving the store or typing the card again.

Asaas returns the token only when card tokenization is on for your account; in production, ask Asaas to turn it on. Without it, payment works as usual and the card is not saved. The customer removes a card in Meus dados: Asaas has no way to delete a token, so the store forgets the card and never uses it again. Cards are in the customer's data export and are deleted when you erase their data.

Refunds

An order paid through Asaas is refunded from the order itself (open it in Sell → Orders), with Refund: Mobiari asks Asaas for the refund and the money goes back to the customer's card. The amount starts as what is left on the payment. Single payments can also be refunded in part; installment purchases only in full (Asaas refuses a partial amount on those).

Common problems

  • "O Asaas recusou a conexão" (Asaas refused the connection). The key is wrong, was revoked or belongs to another environment. Generate a new one under Integrações → Chaves de API.
  • Checkout asks for a CPF or CNPJ. Asaas requires it: without it the card is not charged (the message says to enter the CPF or CNPJ to pay by card).
  • The customer paid but stayed on Asaas's page. Your store's address is not registered at Asaas. The order is confirmed all the same.
  • The order was not confirmed. Check that the "Mobiari" webhook is still active at Asaas. Mobiari also checks pending charges on its own.
  • I want to refund part of an installment purchase. You cannot: installment purchases at Asaas can only be refunded in full.

Next steps

On this page