Listar cobranças no Asaas, por uma API

Lista as cobranças, com filtro opcional por cliente, assinatura, status, forma de pagamento, data de pagamento ou referência externa. Os valores são em reais. A resposta traz data, totalCount e hasMore; pagine com offset e limit enquanto hasMore for true.

Identificador
asaas_list_payments

A chamada

POST https://connect.reportei.com/api/tools/asaas_list_payments/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "customer": "<customer>"
  }
}

Seu sistema envia o id da conexão do cliente e os argumentos da tool. Os headers são os mesmos de toda a API do Connect: o token do seu produto e o token do cliente.

Parâmetros

As descrições dos parâmetros seguem a documentação oficial do app, em inglês.

ParâmetroTipoObrigatórioDescrição
customerstringNãoOnly the payments of this customer, the cus_ id from List customers.
subscriptionstringNãoOnly the payments generated by this subscription, the sub_ id from List subscriptions.
statusstringNãoOnly the payments in this status. PENDING waits for payment, OVERDUE is past the due date, CONFIRMED is paid by card but not yet credited, and RECEIVED is paid and credited.Valores: PENDING, RECEIVED, CONFIRMED, OVERDUE, REFUNDED, RECEIVED_IN_CASH, REFUND_REQUESTED, REFUND_IN_PROGRESS, CHARGEBACK_REQUESTED, CHARGEBACK_DISPUTE, AWAITING_CHARGEBACK_REVERSAL, DUNNING_REQUESTED, DUNNING_RECEIVED, AWAITING_RISK_ANALYSIS
billingTypestringNãoOnly the payments of this billing type. UNDEFINED is a payment where the payer chooses the method.Valores: UNDEFINED, BOLETO, CREDIT_CARD, PIX
paymentDatestringNãoOnly the payments paid on this date, in YYYY-MM-DD.
externalReferencestringNãoOnly the payments with this identifier of your own system, saved in externalReference.
offsetintegerNãoPosition of the first payment of the page. The default is 0; add limit to it for the next page.
limitintegerNãoPayments per page, from 1 to 100. The default is 10.

Conexões possíveis

O seu cliente conecta a conta do Asaas uma vez, por um dos modos abaixo. A mesma conexão serve para todas as tools do toolkit.

Chave de API

O cliente cola a chave do app numa tela do Connect, ou o seu sistema envia a chave por POST /api/customer-toolkits, sem tela.

A resposta

Em caso de sucesso, o Connect preserva o status e o corpo da resposta do app. Erros HTTP retornados pelo app usam o envelope {error, api_error}; falhas de autenticação ou validação podem ocorrer antes da execução. O header X-Toolkit-Execution-Id identifica a execução registrada, consultável em GET /api/tools/executions/{uuid}.

Pronta para agentes de IA

O input desta tool é um JSON Schema, disponível em GET /api/tools/asaas_list_payments. Ele vira a definição de tool do seu agente sem conversão.

Outras tools do Asaas

Ver as 12 tools

Toolkits da mesma categoria

Ver os 100 toolkits

Veja o Connect aplicado ao seu produto.

Teste por 15 dias sem cartão, ou mostre seu cenário ao nosso time.