cancel
Showing results for 
Search instead for 
Did you mean: 

REST API to get order id for payment and cancel payment processing

Highlighted

REST API to get order id for payment and cancel payment processing

Followed the document on Magento 2.3 REST API based checkout processing given here - https://devdocs.magento.com/guides/v2.3/rest/tutorials/orders/order-create-order.html

 

Credit card payment required order id. As I understand the payment-information API has to called to get the order_id and the same should be used in the credit card payment. What if the user cancels the payment or payment fails due to wrong payment details?

 

Should I call API to cancel the order? or there is a way to get order_id without actually calling payment-information. Please suggest.