cancel
Showing results for 
Search instead for 
Did you mean: 

Find out Order's payment method online or offline

Find out Order's payment method online or offline

I want to use Refunds creation methods described here https://devdocs.magento.com/guides/v2.4/rest/modules/sales/refunds.html

 

It is said that you should use either:

POST V1/invoice/:invoiceId/refund

(If you try to apply the service to an invoice created using an offline payment method, the system will return a validation error.)

 

OR:

POST V1/order/:orderId/refund

(If you try to apply the service to an invoice created using an online payment method, the system will return a validation error.)

 

But how can I find out whether an order was paid using online/offline payment method? 

I haven't found anything regarding it here https://magento.redoc.ly/2.4.0-admin/tag/ordersid#operation/salesOrderRepositoryV1GetGet

 

Thanks!