question

mlyon avatar image
mlyon asked mlyon commented

401 Unauthorized processing_error on /v1/refunds API endpoint (sandbox)

I'm having issues accessing the refunds endpoint on my test system. I found some other threads with similar issues, but those seemed to be related to permissions problems on the app. However I've enabled every app permission to try to resolve it (and have then refreshed the oauth access token), but I'm still getting the 401 Unauthorized error.

The charge I'm attempting to refund was created with the /v1/charges endpoint. It is not associated with an order. I'm able to retrieve the charge with the /v1/charges/id endpoint, but I can't refund it using the same ID.

What else should I check? The documentation on Refunding Payments (under eCommerce API tutorials) says that I should be able to refund a charge created with the /v1/charges endpoint. Are there other restrictions I'm not aware of?

An example ID of a charge I'm trying to refund is TJMA6Y86T2P3C. My test app ID is H5B5NTTATVM6E.

Thanks!

Sandboxe-commerce api
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 mlyon commented

Refreshing the OAuth token isn't enough, you need to uninstall/reinstall the app - https://community.clover.com/articles/23744/resolving-401-unauthorized-responses-when-making-a.html.

The permissions required for the ecomm api's are documented here - https://docs.clover.com/docs/ecommerce-app-permissions.

1 comment
10 |2000

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

mlyon avatar image mlyon commented ·

Oops, I didn't realize I needed to reinstall the app! My bad.

I uninstalled/reinstalled, then tried again, and started getting "400 bad request" errors. However I just tried again after waiting a few minutes and that seems to have resolved itself now. I'll mark this as answered and will follow up if I run into other problems.

Thanks for the quick response!

0 Likes 0 ·

Welcome to the
Clover Developer Community