Listar cobros en Asaas, con una API

Lista los cobros (cobrancas), con filtro opcional por cliente, suscripción, estado, forma de pago, fecha de pago o referencia externa. Los valores están en reales. La respuesta trae data, totalCount y hasMore; pagina con offset y limit mientras hasMore sea true.

Identificador
asaas_list_payments

La llamada

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>"
  }
}

Tu sistema envía el id de la conexión de tu cliente y los argumentos de la tool. Los headers son los mismos de toda la API de Connect: el token de tu producto y el token de tu cliente.

Parámetros

Las descripciones de los parámetros siguen la documentación oficial de la app, en inglés.

ParámetroTipoObligatorioDescripción
customerstringNoOnly the payments of this customer, the cus_ id from List customers.
subscriptionstringNoOnly the payments generated by this subscription, the sub_ id from List subscriptions.
statusstringNoOnly 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
billingTypestringNoOnly the payments of this billing type. UNDEFINED is a payment where the payer chooses the method.Valores: UNDEFINED, BOLETO, CREDIT_CARD, PIX
paymentDatestringNoOnly the payments paid on this date, in YYYY-MM-DD.
externalReferencestringNoOnly the payments with this identifier of your own system, saved in externalReference.
offsetintegerNoPosition of the first payment of the page. The default is 0; add limit to it for the next page.
limitintegerNoPayments per page, from 1 to 100. The default is 10.

Conexiones posibles

Tu cliente conecta su cuenta de Asaas una sola vez, con uno de los modos de abajo. La misma conexión sirve para todas las tools del toolkit.

Clave de API

Tu cliente pega la clave de la app en una pantalla de Connect, o tu sistema envía la clave con POST /api/customer-toolkits, sin pantalla.

La respuesta

Si la llamada tiene éxito, Connect conserva el status y el cuerpo de la respuesta de la app. Los errores HTTP devueltos por la app usan el objeto {error, api_error}; la autenticación o validación pueden fallar antes de la ejecución. El header X-Toolkit-Execution-Id identifica la ejecución registrada, disponible en GET /api/tools/executions/{uuid}.

Lista para agentes de IA

El input de esta tool es un JSON Schema, disponible en GET /api/tools/asaas_list_payments. Se convierte en la definición de tool de tu agente sin conversión.

Otras tools de Asaas

Ver las 12 tools

Toolkits de la misma categoría

Ver los 100 toolkits

Mira Connect aplicado a tu producto.

Pruébalo durante 15 días sin tarjeta, o cuéntale tu caso a nuestro equipo.