- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm trying to get a webhook event object on Asp.Net WebApi controller but the 'resource' property on the WebhookEvent keeps arriving as 'null' although the JSON value is full with data in the JSON body of the request.
Other top-level fields of the WebhookEvent are filled with data (See attached screenshot of VisualStudio debugging mode).
I am using Postman to post the request (See attached screenshot of the configuration I use).
Below are also the controller signature and the body I send in the request (which was copied from another webhook request).
What am I doing wrong?
Thanks for helping!
Shauli
My controller signature is :
[HttpPost] public IHttpActionResult Post(WebhookEvent webhookEvent)
and the JSON received in the request body is:
{ "id": "WH-aaaaaaaaaaa-bbbbbbbbb", "event_version": "1.0", "create_time": "2017-11-26T07:04:05.000Z", "resource_type": "payouts_item", "event_type": "PAYMENT.PAYOUTS-ITEM.SUCCEEDED", "summary": "A payout item has succeeded", "resource": { "payout_item_id": "aaaaaaaaa", "transaction_id": "bbbbbbbbb", "transaction_status": "SUCCESS", "payout_item_fee": { "currency": "USD", "value": "0.2" }, "payout_batch_id": "cccccccccc", "sender_batch_id": "ddddddddd", "payout_item": { "recipient_type": "EMAIL", "amount": { "currency": "USD", "value": "10.0" }, "note": "This is a note", "receiver": "buyer_abc.com", "sender_item_id": "eeeeeeeeeee" }, "time_processed": "2017-11-26T07:04:05Z", "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/payouts-item/aaaaaaa", "rel": "self", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/payouts/aaaaaaaa", "rel": "batch", "method": "GET" } ] }, "links": [ { "href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-aaaaaa-bbbbbbbbbb", "rel": "self", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-aaaaaa-bbbbbbbbbb/resend", "rel": "resend", "method": "POST" } ] }
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Resolved.
It was the "content-length" header which didn't have the correct value to match the body length.
Hope that will help someone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Resolved.
It was the "content-length" header which didn't have the correct value to match the body length.
Hope that will help someone.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Friend got hacked and our transactions are being disputed in About Protections
- The merchant's account is not able to process transactions in About Business
- Unable to purchase anything in About Payments
- PayPal Refunded Buyer, Buyer sent damaged/missing items Package. PayPal refuses to look at case. in About Protections
- Return Item Postage Refund in Refunds and cancellations