I'm implementing a simple payment workflow using paypal REST API. I first create a payment, redirect the user to the URL returned by this call, and execute the payment upon approval.
To make it more reliable, I'd like to use webhook notifications.
And this is when it starts being a problem: I don't receive any notification.
Given the different Q&A I read so far, here are my remarks:
Is there something more I should do to make it works? Or is there something more I could do to debug it?
Bonus: Am I right to expect "PAYMENT.AUTHORIZATION.CREATED" and "PAYMENT.SALE.COMPLETED/DENIED" notifications in my case?
EDIT2: So after one month, I'm coming back to this issue. I can now see the webhook event in the dashboard (no clue what changed), and its status is PENDING. Its transaction-id is 4396a630-78bc-11e6-8890-77339302725b. Any idea how I could get more details about why it's pending?
From PayPal tech support:
"I see that you have payment review enabled on the test account.
Can you please disable it and submit some transactions and ensure that they have completed, then check for the webhook notifications."
This setting can be found in Sandbox > accounts. Then for each account you use, in profile > settings, set "Payment Review" to off.
That solved my problem.
Note: In my understanding, after executing a payment, if the status is "approved", the payment was completed. It is not the case, since payment might be automatically put to review. If like me you need to have a complete control over the state of a payment, you might need to switch to payment with intent="authorize". You will need another step after execution, which is capturing the payment. You can then subscribe to:
to monitor its actual state.
Regarding "PAYMENT.AUTHORIZATION.CREATED" webhook event, it is triggered after a payment has been executed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With