We're doing API-only integration
Working on V1/charges API with “401 Unauthorized” for weeks on Sandbox. Requests prior to charging are all working without authorization errors. Here are what we've done:
1. Got public key with private auth_token
curl --request GET \
--url 'https://apisandbox.dev.clover.com/pakms/apikey' \
--header 'Authorization: Bearer 7aXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXbd7'
2. Requested card Token
curl --request POST \
--url 'https://token-sandbox.dev.clover.com/v1/tokens' \
--header 'accept: application/json' \
--header 'apikey: d615XXXXXXXXXXXXXXXXXc2b' \
--header 'content-type: application/json' \
--data '{"card":{"number":"6011361000006668","exp_month":"12",
"exp_year":"2030","cvv":"123","brand":"DISCOVER"}}'
3. Make a charge with public auth_token
curl --request POST \
--url 'https://scl.clover.com/v1/charges' \
--header 'accept: application/json' \
--header 'authorization: Bearer f7XXXXXX-XXXX-XXXX-XXXX-XXXXXXXX6b7' \
--header 'content-type: application/json' \
--data '{"amount":1800,"currency":"usd","source":"clv_XXXXXXXXXXXXXXXXXXXXXX"}'
Got:
{
"message": "401 Unauthorized"
}
No further error messages to help identify the cause. Did online searching and reviewed related Clover documents. Any help would be appreciated.