question

saad-bin-iqbal avatar image
saad-bin-iqbal asked saad-bin-iqbal commented

Is there any api or method to sell a item entirely in the background ?

I want to sell an item(from Inventory) just by clicking on a button, means after selecting the item I will click a button and after that, all the process(like creating order and doing payment) should be done in the background without any interaction with User Interface.
Clover MiniClover FlexClover Station
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

brokenoval avatar image
brokenoval answered saad-bin-iqbal commented
You can certainly do this using the Restful APIs documented here.

Firstly you will create the order in the background using the Create Order API
POST /v3/merchants/{mId}/orders

Depending on your use case, you may have to update the order too, this can also be done in the background using
POST /v3/merchants/{mId}/orders/{orderId}

However, at some point you will need to take payment for the order and at that point you will need user interaction because you will need to take payment (unless the order value is Zero or you don't care about accepting money). If that's not relevant to you, you will have to do the following:

You will need to first create a Custom Tender, this is the equivalent of "Credit Card" or "Cash" - most use cases involve own store Loyalty or Gift Cards, but using your own tender will allow you to close out the order. You have to do this only once per merchant using:
POST /v3/merchants/{mId}/tenders
After you have a custom Tender ID for that merchant and an Order ID you can create a payment using:
POST /v3/merchants/{mId}/orders/{orderId}/payments
1 comment
10 |2000

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

saad-bin-iqbal avatar image saad-bin-iqbal commented ·

Thanks a lot, Mr. @brokenOval,

Now I'm gonna implement it. I'll come back here if I stuck.

0 Likes 0 ·

Welcome to the
Clover Developer Community