Get Started

Get Collection of Payments

This action returns a collection of payments with statuses if desired.

Table - Get Collection of Payments

Resource Template
/customers{customerId}/batches/{batchId}/
payments?fields=<paymentField[,paymentField]>
&status=<paymentStatus>&ids=
<id1[,id2]>&sortBy=<paymentField,asc/desc>
Http Method GET
Description

Returns a collection of payment representations.

To request payment statuses, 'ids' parameter should be submitted with

comma separated payments' id values. 

To request payments only in a specific status, a ' status' parameter should be

submitted with valid payment status.

If a payment is in ' NotAccepted' status, an 'errorCode' field will indicate the reason.

To limit returned payment representations to only desired fields, the ' fields' parameter

should be used, with comma separated list of fields to return.

' id' field will always be returned.

To sort output by a specific field, 'sortBy' parameter can be used

(default is by CreatedOn timestamp with descending order).

Supported fields to be used with 'sortBy' are 'CreatedOn', 'LastUpdatedOn', 'Id'.

Returned list is limited to 1000 payments with applied default or specified sorting.

Input
{
}
Output
200 OK
{
“payments”:
[
//accepted payment {
"id":"<paymentId>","partnerReference",
"<partner generated reference>",
"paymentReference":"<partner generated reference>",
"status":"<paymentStatus>",
"amountReturned" : "<supplied for payment in Returned status>",
"amountReturnedCurrency" : "<supplied for payment in Returned status>",
"errorCode":"<errorCode>:<error message>",
// <supplied for payments in Rejected or Returned status>
"createdOn":"<timestamp>",
"lastUpdatedOn":"<timestamp>"
},
// not found payment{
“id”:”<paymentId>”,"errorCode":"<Not Found Error Code>"
},
// not accepted payment
{
“id”:”<paymentId>”,“status”: “NotAccepted”,"errorCode":"<errorCode>:<failed validation field>",
// specifies validation error code and a field whichfailed validation}
]
}
]
}
Output (errors)
404 Not Found
 - if a submitted resource location is not found
400 Bad Request
 - query parameters are invalid