Filtering
Method's API supports filtering for endpoints that return a list of a certain record. You can optionally provide parameters to filter for specific records. Not all properties of a resource can be filtered. Refer to the list below for resources with their supported filters.
Resources with supported filters
- Payments - payment list parameters
- Accounts - account list parameters
- Entities - entity list parameters
- cURL
- Node.js
- Python
GET
/payments?source=acc_JMJZT6r7iHi8e&status=pending
curl "https://production.methodfi.com/payments?source=acc_JMJZT6r7iHi8e&status=pending" \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc"
GET
/payments?source=acc_JMJZT6r7iHi8e&status=pending
const payments = await method.payments.list({
source: 'acc_JMJZT6r7iHi8e',
status: 'pending',
});
GET
/payments?source=acc_JMJZT6r7iHi8e&status=pending
payments = method.payments.list({
'source': 'acc_JMJZT6r7iHi8e',
'status': 'pending'
})
RESPONSE
{
"data": [
{
"id": "pmt_rPrDPEwyCVUcm",
"reversal_id": null,
"source_trace_id": null,
"destination_trace_id": null,
"source": "acc_JMJZT6r7iHi8e",
"destination": "acc_AXthnzpBnxxWP",
"amount": 5000,
"description": "Loan Pmt",
"status": "pending",
"error": null,
"metadata": null,
"estimated_completion_date": "2020-12-11",
"source_settlement_date": "2020-12-09",
"destination_settlement_date": "2020-12-11",
"fee": null,
"created_at": "2020-12-09T00:42:31.209Z",
"updated_at": "2020-12-09T00:43:30.996Z"
}
]
}