question

ivan-garcia avatar image
ivan-garcia asked washington-l-braga-jr commented

Creating Orders from the API - Pay them from other Payment Gateway

Hello,

Our customer has the 90% of his business in the restaurant with the Clover app but he has a 10% customers ordering him from outside the restaurant.

We are developing for our customer a mobile app that allows the final users to place orders in our customer's restaurant, and pick-up them later or order for delivery. We would like to pay these orders in an external payment gateway. Could we place orders and pay them in an external gateway?

I'm sorry to ask but I'm unable to find enough information about the orders flow in the documentation.

Thanks. Kind regards,

Ivan

Orders
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

Jacob Abrams avatar image
Jacob Abrams answered washington-l-braga-jr commented

Sounds like you want to use our web API from your mobile app to mark the order paid? You probably need to create a custom tender to keep track of these payments. A tender is a payment method like cash, check or gift card. You can make your own tender so the merchant knows how this order was paid. I couldn't find a v3 API function for creating a tender so you might need to use the v2 API. Take a look at the Tenderssection here: https://www.clover.com/rest-api. Once you have created your tender you should be able to POST a payment to /v3/merchants/{mId}/orders/{orderId}/payments using your custom tender. You may then need to finally POST to /v3/merchants/{mId}/orders/{orderId} with state set to PAIDas discussed here: http://devask.clover.com/question/110

4 comments
10 |2000

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

ivan-garcia avatar image ivan-garcia commented ·

Hello, Yes, the orders from our app are going to be paid in a non Clover payment Gateway. As you said, we need to mark these orders as paid. Thanks for the answer. Can we still use the V2 API? Are you still supporting this version of the API? Kind regards, Ivan.

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Yes the v2 API is still supported and works fine. I recommend using it any time you can't use the v3 API.

0 Likes 0 ·
washington-l-braga-jr avatar image washington-l-braga-jr commented ·

We're setting orders as paid using a "external payment" tender, by fetching all merchant tenders and grabbing the id of the one where labelKey equals "com.clover.tender.external_payment". Is it safe to assume all merchants will have a default "external payment" tender @jacobabrams?

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Yes that is a system tender that all merchants have, see: https://github.com/clover/clover-andr...

0 Likes 0 ·

Welcome to the
Clover Developer Community