Get all payments
Use the Get all payments endpoint to retrieve all payment details for a merchant with a single call, including the total amount, tip amount, tax amount, and result status. You can also filter your search results based on the filter
and expand
queries.
Tip
To retrieve a single payment, use the Get a single payment endpoint.
Prerequisites
- Set up a sandbox developer account.
- Create an app in the sandbox to generate a bearer token.
- Existing payments for the merchant.
Steps
- Send a Get request to
/v3/merchants/{mId}/payments
. - Enter the
mId
(merchant identifier). - Enter the value in the following optional parameters:
filter
expand
Restrictions to retrieve payment data requests to 90 days
Welcome to the get all payments pilot!
The restriction of 90 days for search results is limited to specific merchants. Clover will gradually deploy the restriction across the merchant base. As we do this, you can use the Get all payments endpoint to see the restrictions configured for your merchants.
When retrieving payment information, the result does not exceed 90 days, irrespective of search queries in the createdTime
, modifiedTime
, or clientCreatedTime
fields. In all of these fields, Clover uses the common timestamp methods that are milliseconds from the same epoch time as Unix time (Jan 1, 1970). If your app requires Unix time, divide the Clover timestamp by 1000.
Scenarios
The following table describes scenarios of restrictions of search results:
Request condition | Operator | Sample | Result (payment information) | Example |
---|---|---|---|---|
Date range | (Greater than (>) or greater than and equal to (>=) and (Less than (<) or less than and equal to (<=)) | (> or >=) Date 1 and (< or <=) Date 2 | Date 2 to Date 1 (if the difference between the dates is less than 90 days) and Date 2 - 90 days (if the difference between the dates is greater than 90 days) | Oct 5, 2023 + Jan 5, 2024 |
Single date | Greater than (>) or greater than and equal to (>=) | > or >= Date 1 | Date 1 + 90 days | June 5, 2023 + 90 days |
Single date | Less than (<) or less than and equal to (<=) | < or <= Date 1 | Date 1 - 90 days | June 5, 2023 - 90 days |
Request example
curl --request GET \
--url https://sandbox.dev.clover.com/v3/merchants/5AKPFE9YAQSJ1/payments \
--header 'accept: application/json' \
--header 'authorization: Bearer d952cae7-2abc-d23e-0007-87fghijklmn'
Response example
{
"elements": [
{
"id": "VKWC1WFBFD30G",
"order": {
"id": "50ZDWK09W586G"
},
"tender": {
"href": "https://sandbox.dev.clover.com/v3/merchants/5AKPFE9YAQSJ1/tenders/JCNP5PN0JA058",
"id": "JCNP5PN0JA058"
},
"amount": 212,
"cashbackAmount": 0,
"employee": {
"id": "DFLTEMPLOYEE"
},
"createdTime": 1726876836000,
"clientCreatedTime": 1726876836000,
"modifiedTime": 1726876835000,
"offline": false,
"result": "SUCCESS",
"note": ""
},
{
"id": "G31P50D62MKVM",
"order": {
"id": "W7C4V8CFEE34P"
},
"tender": {
"href": "https://sandbox.dev.clover.com/v3/merchants/5AKPFE9YAQSJ1/tenders/JCNP5PN0JA058",
"id": "JCNP5PN0JA058"
},
"amount": 214,
"cashbackAmount": 0,
"employee": {
"id": "DFLTEMPLOYEE"
},
"createdTime": 1726358433000,
"clientCreatedTime": 1726358433000,
"modifiedTime": 1726358432000,
"offline": false,
"result": "SUCCESS",
"note": ""
},
}
Updated about 17 hours ago