This API returns the below response but the customer token is valid for 2023-01-18
stdClass Object ( [message] => 404 Not Found [error] => stdClass Object ( [code] => invalid_request [message] => Please provide a valid source or token. ) )
This API returns the below response but the customer token is valid for 2023-01-18
stdClass Object ( [message] => 404 Not Found [error] => stdClass Object ( [code] => invalid_request [message] => Please provide a valid source or token. ) )
You need to pass a "source" (card token),see https://docs.clover.com/docs/ecommerce-accepting-payments#paying-for-a-charge.
We are already sending the source
My Request with sample data: {"amount": 10, "currency":"USD","source":"123"}
Source "123" is not a valid source, the "source" must be a card token (or a customer uuid that has a card on file). To obtain a card token you would generally use the iFrame - https://docs.clover.com/docs/clover-iframe-integrations.
I'm sending a valid token on my request. In this community all chat is open, so we are passing dummy tokens here
David Marginian - is there a way to share our actually call request data securely with support to have them look at it and help troubleshoot this?
In this case, I don't believe that is necessary as I believe my last comment will set you straight:
If you were passing a valid token the request would work, so you will need to provide more details about how the token is being generated, etc. One scenario I have seen a 404 is when the token wasn't generated for the correct developer app/merchant. This can happen if you obtain a PAKMS key with an access token that doesn't have the same ownership of the access token you are using to make the charge.
Note: I have seen the above happen when developers were using a merchant token to make the PAKMS call and then using an OAuth token to make the payment call, or vice-versa. Why developers would do this? I don't know. Remember, merchant tokens should not be used in production.
If it doesn't, you can provide the following in a moderator's only comment here:
1) The environment this is happening in (sandbox, prod).
2) The merchant id
3) Your app id
4) ~ time of call including timezone, and amount
3 People are following this question.