chrisjholly avatar image
chrisjholly asked chrisjholly commented

Paying for a clover order with Credit Card

Hi Clover,

I am following the guide: on how to send payment details for the order to be charged against. I get the key and generate the encrypted card number and sent it to POST /v2/merchant/{mId}/pay along with CVV. From this the order gets changed state to PAID and I receive a response of APPROVED and the order is shown on the device as:

  • Entry Method: KEYED
  • Card Transaction Type: PREAUTH
  • Card Transaction State: PENDING

Full Details here:

I am testing against an emulator and my MID is 111111111111. Since the card being used has an incorrect CVV the transaction should fail. In addition the PREAUTH state never changes from PENDING. Is this due to using an emulator and not a real merchant account? If it is how do I go about getting a merchant account so I can test this fully.

Thanks Chris

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

chrisjholly avatar image chrisjholly commented ·

Thanks for the response Anthony. We now have a Clover Mini connected to your sandbox server. We have completed an order and want to test refunding an order however I am getting the response: {"message":"Can not delete order with an associated payment."}

The scenario is:

  1. Customer makes order through API.
  2. Clover device receives the response and venue worker decides the product is not avaliable (eg out of stock)
  3. The order needs to be refunded.

Is there a way to refund an order without deleting it?

1 Like 1 ·
Mike M avatar image Mike M commented ·

Refunding via both Rest API and SDK is not possible. It is locked down for 3rd party developers due to the possibility of it enabling full-on theft, among other security concerns.

You will need to provide messaging to the merchant to notify them to manually refund lineitems or an entire order via the Orders app. Please see

You could also query the Clover device's inventory to verify that a product is indeed available prior to placing an order.

1 Like 1 ·
anthonypinto avatar image anthonypinto commented ·

Which environment are you testing against? If you aren't already, I would recommend trying this test on the sandbox server ( And The sandbox environment uses a more sophisticated mock payment gateway than the default black hole gateways used on the other servers.

0 Likes 0 ·
chrisjholly avatar image chrisjholly commented ·

Thanks Mike. We are currently on a sandbox device but every transaction is approved. Is there a way we can simulate failed orders?

0 Likes 0 ·

1 Answer

Mike M avatar image
Mike M answered

Hi @chrisjholly, I do not know off the top of my head and will research that quickly. In the meantime, can you please create a separate question for "simulating failed orders"? That way future developers can benefit from the information since I don't believe this forum's search functionality extends to comments. Thanks!

Also please provide your merchant ID so we can check something on our side.

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