payments
Requires at least one of the permissions payments:payment:list or purchase:payment:list.
Lists payments, collections and supplier payments, with optional filters and skip / take paging. Collections need the payments list permission and supplier payments the supplier payments list permission; a caller holding one sees only that side.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query Payments {
payments {
total
payments {
id
checkNumber
currencyCode
paymentNumber
referenceNumber
status
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query Payments {\n payments {\n total\n payments {\n id\n checkNumber\n currencyCode\n paymentNumber\n referenceNumber\n status\n }\n }\n}"
}
EOF
Response:
{
"data": {
"payments": {
"total": 0,
"payments": [
{
"id": "id",
"checkNumber": "string",
"currencyCode": "string",
"paymentNumber": "string",
"referenceNumber": "string",
"status": "APPROVED"
}
]
}
}
}
payments(
filter: PaymentFilterInput
skip: Int
take: Int
): PaymentConnection!
Arguments
payments.filter ● PaymentFilterInput input
Optional filters.
payments.skip ● Int scalar
Number of payments to skip. Send with take for paging.
payments.take ● Int scalar
Number of payments to return.
Type
PaymentConnection object
A page of payments and the total number that match.