How to link a webhook to an action (API request)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to determine if a webhook is linked to my API request, so I can avoid duplicated actions.
For example, if I made a partial refund via API, I immediately update that in my database.
Later, I will receive a webhook that notifies me about a refund. How can I know if that's an additional refund, or the one I created?
If I completely ignore webhooks, then if for example a refund is issued through PayPal, and not with my API request, then my system will not know about it.
And if I will only listen to changes with webhooks, everything will be delayed.
Is there any way to know?
I'm using Payments API v1 throguh PayPal-PHP-SDK
- Labels:
-
Webhooks REST APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @HTMHell,
Thank you for contacting PayPal community.
Our sincere apologies for the inconvenience caused.
I request to please use "transaction_id" unique identifier to identify the webhooks.
For example, when you process a refund via API call please track the transaction ID in your internal database and once you receive PayPal webhooks event notification use the "transaction_id" to compare.
Detailed guide link for reference.
Thank you for understanding and patience.
Sincerely,
Chiranjeevi
PayPal, Inc.
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply!
I don't have a transaction_id parameter in the webhook request being sent to me.
Do you mean resource.id?
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- PAYER_ACTION_REQUIRED returned for Capture intent when calling v2 checkout orders in Sandbox Environment
- API TRANSACTION_REFUSED in Sandbox when Capturing Payment in REST APIs
- Can't capture order, loop on action-required in REST APIs
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- Sandbox webhook resend button doesn't work in Sandbox Environment