I create a customer, get a token for a test card the one that is 4242, create an order then I try to user the "Pay for an order" call. I get this error:
Here is essentially my request:
Here is essentially my request:
curl --request POST \ --url https://scl-sandbox.dev.clover.com/v1/orders/<ORDER_ID>/pay \ --header 'Accept: application/json' \ --header 'Authorization: Bearer <TOKEN>' \ --header 'Content-Type: application/json' \ --data ' { "ecomind": "ecom", "level2": { "tax_indicator": 0 }, "customer": "<CUSTOMER_ID>", "email": "customer@gmail.com", "source": " <CARD_TOKEN>" } '
Here is the error:
{ "message": "400 Bad Request", "error": { "type": "invalid_request_error", "code": "invalid_request", "message": "Either payment instrument or customer has to be present" } }
I was able to use the token to do a charge but it seems like if my intention is to pay for orders then this call is the right one. Any guidance would be greatly appreciated.