question

jitendra avatar image
jitendra asked jitendra commented

Ecommerce v1/refunds API returns 401 unauthorized while the other APIs are working fine

The response is

Array ([message] => 401 Unauthorized    
[error] => Array([code] => processing_error
[message] => 401 Unauthorized))


e-commerce api
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.

Frank Faustino avatar image Frank Faustino ♦♦ commented ·

Can you please include the full request (including headers with Authorization, request body) in a curl command? Make sure your reply is only visible to moderators since it'll have an access token.

0 Likes 0 ·

1 Answer

Frank Faustino avatar image
Frank Faustino Deactivated answered jitendra commented

I noticed your access token doesn't have PAYMENTS_R permissions. Go to the "Requested Permissions" page in your App Settings, then enable Payments Read (also Payments Write and Ecommerce) permissions for your app. Afterwards, uninstall, then reinstall the app on your test merchant to generate a new access token with the new permission set.

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.

jitendra avatar image jitendra commented ·

Thanks, that worked

0 Likes 0 ·

Welcome to the
Clover Developer Community