question

Sukhbir Singh avatar image
Sukhbir Singh asked zgreathouse Deactivated commented

when we call clover api for payment it's working fine for sandbox account but in production we got 401 unauthorized exception

@glenn at clover
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

zgreathouse avatar image
zgreathouse Deactivated answered zgreathouse Deactivated commented
When receiving a 401 error there are always two things you want to double check.
1. Verify the api_token is correct
- Note: Tokens generated from the dashboard will not work for payment related endpoints (See documentation here.)
2. Make sure Permissions are set properly on your prod account as.
- Note: If permissions are changed, you must uninstall and then reinstall the app and request a new API_token. API_tokens do not expire for a year, however if you uninstall the app you lose your token. (See documentation here.)
2 comments
10 |2000

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

Sukhbir Singh avatar image Sukhbir Singh commented ·

We have changed the api_token and create the order using clover sdk and call clover API for payments then we got "Order not found" exception. Please let me know how to configure our clover device for production environment. so that we can test it.

0 Likes 0 ·
zgreathouse avatar image zgreathouse Sukhbir Singh commented ·

If I understand you correctly, you created the order with your app. However, when attempting to fetch the order data with the API, you are getting an error "Order not found."

Could you please provide a code snippet of your endpoint and a screenshot of the order you created on your Merchant Dashboard?

0 Likes 0 ·

Welcome to the
Clover Developer Community