How to hit the Asaas API

Asaas's API handles payments in Brazil — Pix, boleto, and cards. Sandbox: https://api-sandbox.asaas.com/v3; production: https://api.asaas.com/v3. Error messages are in Portuguese.

Authentication

Generate a key under Integrações → Chave de API in Asaas and send it as the access_token header. In the examples it's written {{ASAAS_API_KEY}}.

Full reference: https://docs.asaas.com/

List customers

curl "https://api-sandbox.asaas.com/v3/customers?limit=10" \
  -H "access_token: {{ASAAS_API_KEY}}"
Run in PostTaco

Create a Pix charge

curl -X POST https://api-sandbox.asaas.com/v3/payments \
  -H "access_token: {{ASAAS_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"customer": "{{CUSTOMER_ID}}", "billingType": "PIX", "value": 49.90, "dueDate": "2026-10-15"}'
Run in PostTaco