What is the difference between Order Creation and Order Payment in the webhooks?
I need a webhook such that everytime an order is made using Cash On Delivery (COD) option, I need a notification to the provided callback URL. Which event should I use?
I guess, it is not possible to get the notification only for COD orders but instead we get one for every order. But then, how do I differentiate COD orders from others? Assuming, 'gateway' parameter provides that info, what does its value contain 'cod' or 'cash on delivery' or something else?
Any help is appreciated! Thank you.
The Payment event is fired when a merchant has chosen to capture the payment for an order.
Regardless of the payment type, the Creation event will include the gateway and the amount even if it's COD. As for the gateway, I believe it's manually entered, so you'll need to inspect the name gateway on the orders transactions. Because of this merchants can set it to whatever (COD, Cash on Delivery, Payment when Received, etc.)