How can I request to last payment from the Rest API?
How can I request to last payment from the Rest API?
How about this:
https://dev1.dev.clover.com/v3/merchants/{mId}/payments?orderBy=createdTime&limit=1
https://apisandbox.dev.clover.com/v3/merchants/677*********/payments?orderBy=createdTime&limit=1 Result: : Received non-OK status from server: HTTP/1.1 401 Unauthorized Permission: "Read Payments" on gets is enabled at the app settings. Tried with the auth code, same result.
After a while I've noticed that if you specify "orderBy" it won't let me have the lastest payment made. Removing that solved my issue :)
@jacobabrams answer works! I just tried it. Remember to pass your API token on the "Authorization" header. If you try following with curl, you will see the result.
curl "https://apisandbox.dev.clover.com/v3/merchants/{mID}/payments?orderBy=createdTime&limit=1" -H "Authorization: Bearer YOUR_TOKEN_HERE"
1 Person is following this question.