question

lsitio avatar image
lsitio asked cherry commented

How can I get the default service charge?

I am trying to get the default service charge but I am getting:

"message": "401 Unauthorized"

I use:

{
                {url}}/v3/merchants/{
                {mId}}/default_service_charge

My sandbox's API token have all the permissions set for reading and writting.
REST APIAPI TokenDeveloper Pay API
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.

cherry avatar image cherry commented ·

It seems like the issue might be related to authentication or permissions. Double-check that your API token is correctly included in the Authorization header with the "Bearer" prefix. Also, ensure the token has the necessary permissions to access the default_service_charge endpoint. If the problem persists, try regenerating the token or confirming the { {mId}} and endpoint URL are accurate for your sandbox environment.

Derrick henry contract


0 Likes 0 ·
cherry avatar image cherry commented ·

To resolve the 401 Unauthorized error, include the Authorization header with the format:

plaintextCopy codeAuthorization: Bearer YOUR_API_TOKEN

Ensure the token is valid and has the correct permissions. Also, check that the API endpoint is correctly formed and that your sandbox environment has the right access. If the issue persists, verify your token and check the API settings in the developer portal. jermaine jakes

0 Likes 0 ·
zgreathouse avatar image
zgreathouse Deactivated answered
Currently we do not expose an endpoint to update your DefaultServiceCharge. However, the DefaultServiceCharge can be updated through the Merchant Dashboard or Setup app on your Clover Device.
10 |2000

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

zgreathouse avatar image
zgreathouse Deactivated answered zgreathouse Deactivated edited
1. Does any other endpoint work with that API Token? My guess is the API Token you are using is invalid. See this thread on when API Tokens expire.

2. If not the token it is possible that your { {url}} is incorrect. Be sure to double check your environment - sandbox/ prod.

3. If it is neither of those, make sure your { {mId}} is correct.
10 |2000

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

lsitio avatar image
lsitio answered
OK, thanks I am retrieving correctly the ID but now I need to modify the percentage. It's possible to modify the default service charge from the REST 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.

Welcome to the
Clover Developer Community