question

sachin avatar image
sachin asked David Marginian Deactivated answered

v3/merchants/{mID}/payments? giving 500 Internal Server Error

Request:

https://api.clover.com/v3/merchants/{mId}/payments?offset=0&limit=500&expand=tender&expand=refunds&expand=serviceCharge&expand=cardTransaction


Response:

{"message":"500 Internal Server Error"}


My code is

$url="https://api.clover.com/v3/merchants/{mid}/payments?offset=0&limit=500&expand=tender&expand=refunds&expand=serviceCharge&expand=cardTransaction";



$ch = curl_init( $url );
# Setup request via GET.

$header = array(
'Accept: application/json',
'Authorization: Bearer '.$api_token.''
);

curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_HEADER, 0);
# Return response instead of printing.
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
# Send request.
$itemResult = curl_exec($ch);
curl_close($ch);
# Print response.

print_r($itemResult);





Payments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered

Don't do this. The request is likely timing out (taking >20 seconds). Some merchants have A LOT of payments. You need to constrain your query by date/time - https://docs.clover.com/docs/applying-filters.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community