question

seaton avatar image
seaton asked seaton commented

E-Commerce API - 401 error when captured later, when captured when charge created works fine

Dear Clover team,


we have an issue in the production environment with E-Commerce API.


Description of issue:

When Charge with flag capture = true is submitted everything works fine, payment is authorized and refund works fine as well.

However, when Charge is submitted with flag capture = false and later merchant wants to capture funds Clover throws an exception with error code 401 Unauthorized.

This functionality is tested on the sandbox environment and everything works ok.


We would appreciate quick feedback since we need to resolve the issue asap before 7 days expires (today is the last day for first transactions).

I can share merchantId if needed for the investigation.


Thank you.


Best,

SeatOn Team



e-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 seaton commented

This is likely due to the permissions on your app being incorrect and inconsistent between the sandbox and production environments. https://docs.clover.com/docs/ecommerce-app-permissions. Capturing a charge requires Read payments, Write payments and Online payments. If your app does not have these permissions then you need to request them, get that change approved and then have the merchant uninstall/re-install your app.

5 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.

David Marginian avatar image David Marginian ♦♦ commented ·

I just verified that in production your app does not have payments write, in sandbox it does. This is not an issue on our end but an issue with your apps permissions.

0 Likes 0 ·
seaton avatar image seaton commented ·

Thank you David, you're right.

Write permission was not selected on the production environment.

Question: once "write" permission is approved and the merchant de-install/re-install app he will be able to capture funds created before uninstall/re-install?

I know that this is a mistake on our side, however, is it possible to get fast approval for write permission, since the live client waiting to capture some funds (for a few of the today is the last day when he can do it - according to documentation reservation of funds is kept for 7 days).


Thank you!

Best,

SeatOn Team

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ seaton commented ·

"Question: once "write" permission is approved and the merchant de-install/re-install app he will be able to capture funds created before uninstall/re-install?"

Yes.

"I know that this is a mistake on our side, however, is it possible to get fast approval for write permission, since the live client waiting to capture some funds (for a few of the today is the last day when he can do it - according to documentation reservation of funds is kept for 7 days)."

I will see what I can do, let me know when the change has been made. I am not certain about permission changes and they may require some sort of legal review.


1 Like 1 ·
David Marginian avatar image David Marginian ♦♦ David Marginian ♦♦ commented ·

Ok, I saw the request come through, I will try to get someone to look at it. In the meantime I suggest you align your sandbox app permissions with your production app permissions and make sure all other functionality in your app functions correctly so that something like this doesn't happen again.

1 Like 1 ·
Show more comments

Welcome to the
Clover Developer Community