question

eingfilip avatar image
eingfilip asked eingfilip edited

Create Order > Crate Payment Record > Create Authorization > Charge for an order flow

Hi everyone, we need your help.
We have an app for food ordering. Customer is able to sit in restaurant, order a food trough our app on mobile (which is WEB based), can update order, add new items to the order and on the end customer can pay for an order trough our app. Current flow is:
    1. Customer open/create order which we keep in our database
    2. Customer update order which we keep in our database
    3. When customer wants to finish ordering we do:
    4. Create order on clover using
    5. POST /v3/merchants/{mId}/atomic_order/orders
    6. We charge order using
    7. POST /v1/orders/{orderId}/pay
What we want to achieve next is to authorize payment. We are not sure do we have correct flow to follow.
    1. Customer open/create order and we immediately create clover order using
    2. POST /v3/merchants/{mId}/atomic_order/orders
    3. We create payment record for an order using
    4. POST /v3/merchants/{mId}/orders/{orderId}/payments
    5. We create an authorization on a Payment using
    6. POST /v3/merchants/{mId}/authorizations
    7. Customer update order, we update clover order using
    8. POST /v3/merchants/{mId}/orders/{orderId}/bulk_line_items
    9. We update an authorization on a Payment using
    10. POST /v3/merchants/{mId}/authorizations/{authId}
    11. Customer wants to finish ordering, are we able to charge on a same way as we do now by calling /v1/orders/{orderId}/pay ? Is this ensure that we can charge for authorized amount?
We need clarification do we have right flow and how to finish last step, charging for authorized amount?!
Payments
10 |2000

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

0 Answers

·

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