Reputation: 420
We are using REST API interface of Magento 2.3.4 to process orders. Followed 7 steps given in the following link and also added code to capture the payment.
As soon as the payment is captured the status doesn't change from Pending Payment to Processing. However, if we click on Get Payment Update option from Admin panel for the order, status changes to Processing. Any idea which REST API needs to be called to change the status to 'Processing'?
Upvotes: 1
Views: 1985
Reputation: 420
To change the status we used V1/orders/{orderId}/comments end point. Fill in the following fields(Sample value is given in the request body).
{
"statusHistory" : {
"comment": "Payment Successful",
"is_customer_notified": 1,
"is_visible_on_front": 0,
"parent_id": 121123, <-- This is orderId
"status": "processing"
}
}
Upvotes: 1