Hello,
I've used the iframe to create a credit card (clover token), and then that was returned, and I am attempting to a charge, based on the code https://docs.clover.com/docs/using-the-clover-hosted-iframe#creating-a-charge But the PHP Curl call is returning an empty message.
So, I copied the clv_ token into a Bash script, and that then returns an error (as shown below).
Am I doing anything wrong? I have used the Private Token from the Clover eComm Iframe. Ecommerce API token as the authorization: bearer password
I have noticed that the URL to create a charge is scl-sandbox.dev... rather that the URL used to obtain a PAKMS token which is apisandbox.dev... https://docs.clover.com/reference/getapikey
Is there a list of all the endpoints for the APIs?
curl --request POST \ --url 'https://scl-sandbox.dev.clover.com/v1/charges' \ --header 'accept: application/json' \ --header 'authorization: Bearer OBFUSTICATED' \ --header 'idempotency-key 439de284-b9ab-11ec-acf7-7cd30a704cbc' \ --header 'content-type: application/json' \ --data '{"amount":4500,"currency":"usd","source":"clv_1TSTSPM2ujytC4fq3BKqkmoz"}'
JSON:
{"message":"500 Internal Server Error","error":{"code":"processing_error","message":"Internal Server Error."}}