question

mybmr avatar image
mybmr asked markola answered

How to do order payment using application tender via ECommerce API?

Currently, we are using clover PAY API to complete order payments using our app's tender.

https://apisandbox.dev.clover.com/v3/merchants/{Merchant_id}/orders/{Order_id}/payments


Now we want to remove the above API as it was deprecated and we want to replace above API ECommerce API. We try to achieve this using the below API but looks like it only supports Cash & Check tender only, Is there any ECommerce API available which we can use to complete order payment API using our APP's tender OR any possibility using below API


"Pay for an order" ECommerce REST API

https://scl-sandbox.dev.clover.com/v1/orders/{orderId}/pay

we are passing Tender Object with our application's tender data like label_key="com.app.xyz" , label="My Application" , id="TenderId"


Request

-> POST https://scl-sandbox.dev.clover.com/v1/orders/TP8M7KJXMGAAA/pay http/1.1

D: Content-Type: application/json; charset=UTF-8

D: Content-Length: 75

D: Authorization: Bearer 11d2535e-cccc-8ce8-fcef-b931e9b12345

D: {"ecomind":"moto","tender":{"label_key":"com.package.xyz"}}

D: --> END POST (75-byte body)

D: <-- 400 Bad Request https://scl-sandbox.dev.clover.com/v1/orders/TP8M7KJXMGAAA/pay (356ms)


Response

{"message":"400 Bad Request","error":{"type":"invalid_request_error","code":"invalid_request","message":"Invalid alternate tender label key. Valid ones are com.clover.tender.cash and com.clover.tender.check"}}


Please suggest if there is any way to use the above API to complete order payment using our app's tender OR any other Ecommerce API available which can fulfill our requirement.

e-commerce api
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

Use the following API to create a payment record on the order:

https://docs.clover.com/reference/ordercreatepaymentfororder-2

10 |2000

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

markola avatar image
markola answered

Thanks for an interesting blog moto x3m. What else may I get that sort of info written in such a perfect approach? I have an undertaking that I am just now operating on, and I have been on the lookout for such info moto x3m bike race game.

10 |2000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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