question

asd avatar image
asd asked David Marginian Deactivated commented

cors error when sending request to https://scl-sandbox.dev.clover.com/v1/charges

We are tokenizing card in hosted iframe and using the returned token id as source for v1/charges in our web app. From console it works fine on tokenizing the card but give cors error on request to v1/charges.

Any help would be appreciated.

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

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

You need to make the payment from your server (not the browser).

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

Thanks for your time. It is not giving cors error but now it gives unauthorized error. I have tried making request here https://docs.clover.com/reference/createcharge and its working here. Any ideas of what i might be the problem?

0 Likes 0 ·
Are you making the request from the web browser or your server? You CANNOT make the charge call from a browser. It works from our docs site but it won't work from your website.
0 Likes 0 ·
asd avatar image asd David Marginian ♦♦ ·
I am making request from server
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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