question

mohit-kanada avatar image
mohit-kanada asked Raymond Lee Deactivated answered

Issue in clover web API for payment : POST /v2/merchant/{mId}/pay

We are in process to implement pay API "

POST /v2/merchant/{mId}/pay

"
We are passing below values as parameters :{"orderId":"0HJHS0HNF6WWT","zip":"33138","expMonth":"05","cvv":"123","amount":"30.46","currency":"usd","last4":"7771","expYear":"2023","first6":"426428","cardEncrypted":"2f6dc34d1bca83a44b9d21c83bcae9c31c52e0f3"}

Everytime its giving error that : "Please supply a valid currency"
PaymentsWebhooks
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

Raymond Lee avatar image
Raymond Lee Deactivated answered
Can you provide a code snippet of how you are sending the request? I suspect it is a formatting issue of the string passed in.

Also one more thing, the amount should not have any decimals in it, it is assumed that the last 2 digits are cents. So in your case it should be "3046" if passing in as a string, or 3046 if passing in as a long/int.

You can refer to these examples on how to use the dev pay api as well.
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