Hi,
I am currently working on allowing users to create and pay for an order to a clover merchant through a mobile application. Currently, this is the approach I am following:
1.User creates a checkout order- https://sandbox.dev.clover.com/v3/merchants/{mId}/atomic_order/checkouts
- The user then taps an "Order now" button, which calls the following:
2. Create Order - https://sandbox.dev.clover.com/v3/merchants/{mId}/atomic_order/orders
- Once the create order call is completed, the user is redirected to the IFrame in a WebView, and enters their card details, when they submit the card details, the following endpoint is called.
3. Pay for Order - https://scl-sandbox.dev.clover.com/v1/orders/{orderId}/pay
From my understanding, if the payment for the order fails, the order is still being created, and will still show up in the Clover Merchants Order screen as Open. Is there a way to prevent this from happening? Is the best way to do this to catch any error that would happen during payment and then delete the order? Let me know if there is a better approach to my problem. Also, this approach should have minimal PCI compliance burden correct?
Thank you!