I am not able to trigger Paypal REST API webhook events - paypal

I'm trying to implement the Paypal REST API for a client and I'm at the point where I need to test the webhook system. I can not get the API to generate an event; a successful payment should generate one, I've also tried using the REST API to issue refunds, and I've tried issuing refunds from the developer sandbox. None of those activities have generated an event for me.
For example, if I execute the command:
curl -v -X GET -H 'Authorization: Bearer VALID_BEARER_TOKEN' 'https://api.sandbox.paypal.com/v1/notifications/webhooks-events'
I get this:
{"events":[],"count":0}
Even after a dozen or so successful payments and maybe a half-dozen refunds, in both sandbox and live, I see "count": 0. The sandbox merchant center and transaction detail both are aware of the correct state of each transaction, and if I query the /v1/payments/payment/{id} resource, I see the correct state for that {id}.
Operationally, I have everything set up correctly:
the webhook uri is registered correctly in the app details, with subscriptions to all event types
the endpoint has a valid SSL Certificate
the endpoint has no firewall or other security that would prevent a successful SSL connection (I've tested this thoroughly)
I have application logging ratcheted up to the finest detail, with no results. I have tcpdump listening on the webhook target machine just to see if any handshake is attempted, also with no results. I've even tried the old "delete and recreate" trick with the app, which didn't help. I've also registered a new PayPal merchant account and encountered the same problem.
I do see IPN traffic for one of the accounts that had a default IPN handler enabled. I would prefer to use the webhooks if at all possible, the reason my client wants to do this in the first place is to get away from IPN.
Am I missing a setting somewhere? Is there some magic undocumented flag? Or is webhook support too new and I shouldn't rely on it and just stop wasting my time and go back to IPN?

There's nothing wrong on your side. If you do sale, paypal webhooks only support echeck case for now. PayPal is adding webhooks support covering other funding sources for sale payment, estimated release is in next Jan.

To update this thread, PayPal has added webhooks support for other funding sources for sale payment.
https://developer.paypal.com/docs/integration/direct/rest-webhooks-overview/

Related

PayPal webhook all events remain pending

When I complete a payment with PayPal using a sandbox account, webhook events are listed as "Pending" with an orange icon in the "Webhook events" section of the PayPal developer dashboard, and the log shows that the webhook has not been called. However, when using a different REST API app, the webhook call works perfectly!
I have tried:
Ensuring that currency is correctly configured
Changing the "Payment Review" setting to "Off" for each sandbox account
Making the app call the webhook for all events
Comparing settings with the other app I made, for which the webhook does get called
Checking that the webhook causes log output, so there is no error causing the lack of output
What other things could be causing this difference, making webhook calls work for one app but get stuck in "Pending" for another that I created more recently?
I was testing in wrong way, i had a test ambient develop and when I was sending events to paypal, the return route was indicating to production ambient. Thats my error and my soluction was buying some stuffs in production ambient. Summarize, the paypal cant get a response for your event, in other words, paypal cant finish the event. Verify your RETURN URL and CANCEL URL.
Sandbox accounts and REST Apps are free and unlimited, so if one isn't working the way you need it to, the simple solution is to not use it anymore and use any number of new ones you create instead.
But if this remains an issue for you, it seems like you should direct the question to PayPal's support, since you've included no request/response log information to actually review for what might be different about the two apps or accounts' situations that causes one to be pending.

REST Client not generating Webhook Events in Sandbox

I am unable to get the Paypal provided REST client (the client side js) to trigger webhook events in the sandbox to receive payment confirmation on my server app.
Here's what I can do/ have done:
I have created a REST app in the sandbox.
I have subscribed to all webhook events.
I am able to pay with the client app using my sandbox client id and see see the payment reflected in the facilitator account.
I am able to generate a webhook event using the Webhook simulator and receive it / parse it on my server.
However, when I do a sandbox payment transaction using the client, no webhook event is created (as reflected in the Webhook events list provided in the dashboard), nor it is sent to my server. Again, my server receives simulated webhooks just fine.
The problem seems to be that the Paypal REST Client is not generating a webhook event. I have tripled checked everything, but cannot see what I've missed. Help!
I have the same problem. I racked my brain trying to figure out if something was wrong with my code. I contacted Paypal and they said this is an ongoing issue with Paypal sandbox and are working to resolve it.

Get data on PayPal subscription profile without access to original IPN

One of my customers had a website hosted on FusionHQ with subscription profiles through PayPal. When migrating the payments, I guessed I could just change the IPN and would get the new messages. But it seems that Fusion has manually set nofify_url parameters for their subscription profiles and there seems to be no way to change the notify_url.
Though slightly annoying, I guessed I could still use the classic payments API to get information and do something stupid like checking the subscribers' status on the assumed expiration date. But, it turned out that PayPal doesn't allow it because the specific API FusionHQ has used, with the following error message:
Subscription Profiles not supported by Recurring Payment APIs.
The thing is that there is no way I can get access to the old IPN server since it is on FusionHQ's domain. After searching through StackOverflow, I've really lost all hope of doing this in a decent way, and I'm about to redirect my customer's PayPal emails to some SMTP bot to parse them and give me the transactions update. But this is obviously a very crappy and unreliable way. So, does anyone have any idea of what to do?

How can I use sandbox's webhooks and transactions?

How can I use webhooks on the sandbox? I'm using the Ruby Official SDK. I'm following this workflow:
I start a payment using intent: 'sale' and payer: {payment_method: 'paypal'}
Redirect to Paypal
Customer approve payment and is redirected back to my site
Execute payment
I can see that the buyer account has this transaction. I can also see that the seller received the transaction amount, but some things don't seem to work:
The app never receives the webhook call, even though the server contains a valid SSL certificate.
Transactions are never listed under "Transactions".
I also just noticed that when I try to create a new user account, a "Webhooks Simulator" link appears on the sidebar, but it rejects my URL, even though it is valid: https://dl.dropboxusercontent.com/s/xjewf2r5xtwm797/2015-03-10%20at%2012.55%20PM.png
Am I missing something? Do these features (webhooks and transactions) require some specific payment method?
So what is your funding source? echeck or credit card, for CC, you should see webhooks immediately. Your payment is valid, there's no special setup needed for using webhooks on sandbox. Have you tested the same thing on LIVE?

Payout in Sandbox

Paypal newbie here. I am using the .net sdk to call PayPal's rest api in the Sandbox environment. I am trying to test a batch payout(Mass Payment).
Issue 1. The sandbox "facilitator" account which came pre-created has a zero balance. I cant seem to find any way to get some money in the account so that i can test payouts. If i create a new business account, i get to specify an opening balance, but when i try to do payouts using this new account, i get back a 403 forbidden response when i try to payout even though i am able to get a token successfully.
Issue 2: Using the facilitator account, i am able to submit a payout request, but its behavior seems to have changed since a couple of day ago. A few days ago, all payout request used to be DECLINED and would show up on the transactions list on the sandbox site. I assumed they were getting DECLINED because the balance was zero. Since yesterday, all payout transactions via the facilitator account stays in PENDING stage and they do not show up on the transaction list. A Payment/Get request for the payout_batch_id always returns back as pending even aftter a day, but theres no sign of those transactions on the sandbox site.
1 - Creating a fresh account and giving it an opening balance is correct, and that should work just fine for you to test MassPay. If you're getting a 403 error that sounds like a problem with your API endpoint or something. Need to see a sample of the API request/response to know more on that.
2 - Again, need to see a sample of the API request/response that you're getting to know more here. My MassPay transactions in the sandbox work just fine. Here's an example. You'll see the request and response data there, showing it was successful. Then when I go look at the separate accounts I see the money as expected.