Webhook notifications upon receiving a payment
I'm having some trouble understanding how an event such as a payment translates to webhook message(s). When a customer pays for their order and adds a tip, is the payment for the subtotal received as a separate event from the payment for the tip, or are the two payments lumped together as one single update event for the orders webhook? Are there any guarantees about this?
-
Hi Ivory,
Thanks for your question! For the Orders webhook, an event is triggered whenever an order is created or updated. When it comes to payments and tips, it depends on the workflow and what the payment includes:
Initial Payment
When a customer pays for their order, including a tip, you'll receive one webhook event for the order update. This single event will reflect the total payment applied, encompassing both the subtotal and the tip amount.
Subsequent Tip Addition
If the initial payment is made without a tip, and then a tip is added later (e.g., the customer adds a tip after the fact, or the server adjusts it), you'll receive a separate, new webhook event indicating that the order has been updated. This new event will reflect the change to the order's payment status, specifically the addition of the tip.
Guarantees
While the exact behavior can depend on the server workflow and what is included in the payment, the general guarantee is that the webhook aims to notify you of any changes to an order's state. This means you can expect:
- Notification when an order is created
- Notification when a payment is applied to an existing order.
- Notification if that payment is subsequently modified (e.g., a tip is added or adjusted).
Essentially, the webhooks will notify you of the current state of the order, including its payment details.
Please let me know if anything is unclear or if you have more questions!
0
Please sign in to leave a comment.
Comments
1 comment