Asaas Integration
Asaas is a Brazilian payment platform that handles billing via Pix, boleto, credit card, and subscriptions, plus marketplace split payments and webhook events. The @flux agent uses Asaas alongside Stripe for a complete picture of incoming revenue from Brazilian customers. Theint-asaas skill talks to Asaas API v3 via a static API key — no OAuth, no token rotation. Setup is a single .env edit.
Setup
1. Get Your API Key
- Log in at asaas.com
- Go to Minha Conta > Integrações > API
- Generate (or copy) your API key
- Asaas has separate keys for sandbox and production — start with sandbox until you are confident the integration is behaving correctly
2. Configure .env
ASAAS_SANDBOX=true is the safe default. It makes all calls hit https://sandbox.asaas.com/api/v3 instead of production. Set it to false only when you are ready to move charges, customers, and subscriptions into your real account.
3. Test the Connection
Use the skill directly through curl (the simplest test):https://api.asaas.com/v3 for production.
How Authentication Works
Asaas uses a static API key sent as a custom HTTP header on every request:.env and you are done.
The base URL is chosen dynamically based on ASAAS_SANDBOX:
ASAAS_SANDBOX=true→https://sandbox.asaas.com/api/v3(default)ASAAS_SANDBOX=false→https://api.asaas.com/v3
Available Operations
Theint-asaas skill documents 15 operations grouped by domain:
Enums You Will Use Often
billingType (how the customer pays):
BOLETO— Brazilian bank slipCREDIT_CARD— credit cardPIX— instant transferUNDEFINED— let the customer choose at checkout
status (lifecycle):
PENDING— awaiting paymentRECEIVED— paidCONFIRMED— paid and reconciledOVERDUE— past due dateREFUNDED— refundedRECEIVED_IN_CASH— marked as paid in cashREFUND_REQUESTED,CHARGEBACK_REQUESTED,AWAITING_CHARGEBACK_REVERSALDUNNING_REQUESTED,DUNNING_RECEIVED— collectionsAWAITING_RISK_ANALYSIS— under fraud review
Data Formats
All operations expect Brazilian document formats stripped of punctuation:Example Calls
Webhooks
Asaas can send real-time events for payment status changes (created, received, overdue, refunded, chargeback) and subscription lifecycle. Configure the webhook URL in the Asaas dashboard under Integrações > Webhooks — this part is done in the dashboard, not via the API. Theget_webhook_events operation is available to list the last events received by Asaas (useful for debugging delivery failures).
Advanced Endpoints (Reference Only)
The following are documented by the Asaas API but not wrapped by the skill yet:- Credit card tokenization (requires extra fields and PCI considerations)
- Receivables anticipation (
antecipações) - Tax/fiscal info attached to payments
- Batch payment creation
workspace/projects/mcp-dev-brasil/packages/payments/asaas/ and the official docs.
Skills That Use Asaas
Troubleshooting
401 invalid_token
Your ASAAS_API_KEY is wrong, expired (manually rotated), or you are mixing sandbox and production keys. Re-copy the key from the Asaas dashboard, making sure you are on the correct environment, and confirm ASAAS_SANDBOX matches.
400 invalid cpfCnpj
You passed a CPF or CNPJ with dots, dashes, or slashes. Asaas expects digits only — 11 for CPF, 14 for CNPJ.
Sandbox calls returning production data (or vice versa)
Double-checkASAAS_SANDBOX in .env. The two environments are completely isolated — a customer created in sandbox does not exist in production.
Webhook is not firing
Webhooks are configured in the Asaas dashboard, not in.env. Go to Integrações > Webhooks, make sure the URL is reachable from the public internet, and use get_webhook_events to inspect delivery attempts.