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. To retrieve a single payment, use the Get a single payment endpoint.
Prerequisites
- Create merchant-specific API token in sandbox.
- Existing payments in the merchant account.
Steps
- Send a GET request to
/v3/merchants/{mId}/payments. - Enter required information—
mId(merchant identifier). - Set the Authorization header as Bearer token type, and enter the test API token.
- Enter optional parameters—
filterandexpand. For more information, see Apply filters and Use expandable fields.
90-day restrictions on payment data request results
TheGet all paymentspilotThe
get all paymentsrestriction 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 results will not exceed 90 days. This constraint is true even if the search query exceeds a 90-day span using the time-based fields, such as,createdTime, modifiedTime, or clientCreatedTime.
NOTEIn all time-based 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.
Request and response example
curl --request GET \
--url https://apisandbox.dev.clover.com/v3/merchants/5Axxxxxxxxxx1/payments?filter=modifiedTime%3E1704070800000 \
--header 'accept: application/json' \
--header 'authorization: Bearer d952xxxx-xxxx-xxxx-xxxx-xxxxxxxxcae2'{
"elements": [
{
"id": "VKxxxxxxxxxxG",
"order": {
"id": "50xxxxxxxxxxG"
},
"tender": {
"href": "https://apisandbox.dev.clover.com/v3/merchants/5Axxxxxxxxxx1/tenders/JCxxxxxxxxxx8",
"id": "JCxxxxxxxxxx8"
},
"amount": 212,
"cashbackAmount": 0,
"employee": {
"id": "XxxxEMPLOYEE"
},
"createdTime": 1726876836000,
"clientCreatedTime": 1726876836000,
"modifiedTime": 1726876835000,
"offline": false,
"result": "SUCCESS",
"note": ""
},
{
"id": "G3xxxxxxxxxxM",
"order": {
"id": "W7xxxxxxxxxxP"
},
"tender": {
"href": "https://apisandbox.dev.clover.com/v3/merchants/5Axxxxxxxxxx1/tenders/JCxxxxxxxxxx8",
"id": "JCxxxxxxxxxx8"
},
"amount": 214,
"cashbackAmount": 0,
"employee": {
"id": "XxxxEMPLOYEE"
},
"createdTime": 1726358433000,
"clientCreatedTime": 1726358433000,
"modifiedTime": 1726358432000,
"offline": false,
"result": "SUCCESS",
"note": ""
},
}Updated 4 days ago
