question

devender avatar image
devender asked Mark Mullan Deactivated answered

Please supply a valid currency.

I am trying to charge my customer using Credit , Debit card payment process in php using curl.
I am using the below API URL and data passed to API :-

https://sandbox.dev.clover.com/v2/merchant/xxxxxxx...
Payment detail
{
   "orderId": 21769,
    "currency": "usd",
    "amount": 100,
    "tipAmount": 0,
    "taxAmount": 0,
    "expMonth": 12,
    "cvv": 123,
    "expYear": 2022,
    "cardEncrypted": "BhSLEeL4gs349jX4+ivrxdBZl4l5puUeqKZl+CGsVlPjud3XYUTKX9rKnW4LnQnspnW+OMnAJElBaJHXaVk6IMRyFxQEJ1j1aafv2+lcQStvsDmSNAiE0OW8vgKwd4JFGIdDWkQcrCY8GI7UfxrFk1APO\/30iMxcSD+ItzdI2+jrxjkXD1h\/\/UHQ6fd2x8sPkwX8l1fvvJeWR0szJ\/dJ5q5THKRweH8nyzHFW6eK6vdvLdu\/7DxjCA0+9meZaFP6im+fNyNAfF2lM4guDDMoRJfyZ9MYYLt\/r6vyvbu6bnm5EKoVMdas7q6h9OveQmrMzdaGawlBcyybuWDw0Tp2Cw==",
    "last4": "0010",
    "first6": "476173"
}
RESPONSE :-

string(45) "{"message":"Please supply a valid currency."}"
What type of currency type should i need to apply or should i need to do any configuration in setting. I am using sandbox.
PaymentsPaymentConnectorWebhooks
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

Mark Mullan avatar image
Mark Mullan Deactivated answered
Hi @devender, your "currency" key: value looks fine in that request body, and should pass our server-side validation. The orderId should be an alphanumeric 13-digit value.

When I POST your payload to
https://apisandbox.dev.clover.com/v2/merchant/{merchantId}/pay
I receive a 400 response:

{    "message": "Cannot find order with id: 21769. The order may not exist or has been deleted."}

What's the exact endpoint that you are hitting? Are you still seeing this response?
10 |2000

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