question

developerr avatar image
developerr asked David Marginian Deactivated commented

Please provide a valid source or token

When i use OAuth response CODE sandbox enviroment after i will generate token using this [https://token-sandbox.dev.clover.com/v1/tokens ] api after getting card token

clv_1TSTXXXXXXXXXXXXXX


then we will use https://scl-sandbox.dev.clover.com/v1/charges api for charges but he return error

{"message":"404 Not Found","error":{"code":"invalid_request","message":"Please provide a valid source or token."}}

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.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

It appears to me that the card token was generated using the PAKMS key from a merchant token (which you have set-up for your test merchant RKM...F1) and that you are possibly using an OAuth token (from your app, not a merchant token) to make the charge? You can't mix and match these. If you are using an OAuth token the steps should be:

1) Obtain your PAKMS key using your OAuth token.

2) Tokeniz the card with the PAKMS key retrieved in step 1.

3) Make the charge using the same OAuth token that you used to retrieve the PAKMS key.

10 |2000

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

developerr avatar image
developerr answered David Marginian Deactivated commented

Please provide me reference url regarding this

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.

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