venmo setup for devs outside usa - paypal

Hey i have been trying to develop solutions for venmo. I used the html checkout code from venmo integrations tab in paypal dev dashboard. I see the venmo button i click it and venmo sandbox opens , no app switch occurs as per the flow.
My test setup - based outside USA , using. a vpn simulating USA location
created a business account in USA on paypal.
I tried the vpn and went through the docs . did not find anything even configured the webhooks on my sandbox , the payload shows no sign of venmo payment
doc link followed
demo link

Venmo doesn't operate in the sandbox. When clicking a venmo button, the window opens and tells you that it's working. That means: it's working.
You can test PayPal payments in the sandbox. If sandbox PayPal payments do not show in the receiving sandbox business account or do not result in webhooks being sent, this is because your integration is not configured with the correct credentials or your webhooks are not subscribed and set up correctly for that same app/client ID.
Why you are using webhooks to begin with is another matter. A server-side integration with the v2/checkout/orders API and paired with buttons for approving the order gives an immediate notification of success or failure. There's no reason to wait for or be dependent on a separate webhook notification.

Related

How to receive webhooks from paypal donations? (and a few other misunderstandings)

Good day, everyone. I'm a bit stumped on this subject. I have a bit of experience with PayPal developer apps when it comes to subscriptions but this issue with donations is stumping me.
I would like to receive webhooks when a donation is made. I have created a new app in paypal developer dashboard, assigned it the webhook URL (a web app running on Python Flask) and while I have been able to successfully send and receive mock sandbox webhooks from the developer sandbox dashboard for testing so I know everything is configured to work. I just can't figure out how to now establish the live environment donations handling.
I have a business and a developer PayPal account. Within my business account (which I assume is the one that does live donation transactions), I have created a donation button. Logic would dictate that within this donation button setup, there should be a select option to specify the app who's webhooks these donations need to be using. But there is no such thing and PayPal's developer forum is deserted.
The general question is:
How does one set up a donation button to receive webhooks to a certain app or is that not how this works? Because I can have multiple donation buttons for various purposes, campaigns and configurations and I don't need webhooks for all of them. If I am forced to receive all donations, at least I see that there's a donation button ID which I can use to filter out donations coming from other buttons. But I can't even do that if I am not receiving donation webhooks at all.
Looks like for the time being to make this work I have to use Smart Buttons instead of donation buttons in Paypal. With smart buttons I can specify an app id I created in the developer dashboard and receive the webhooks this way.

Does PayPal REST Webhook supports instant payments notification

I am building the system to listen to the Payment changes in PayPal for that I research and recommended using Webhooks over the IPN.
As of now, I can able to create an app and add webhooks with event subscribers. Also, with the webhook simulator I am getting notified correctly but with the actual Payment made in the sandbox does not trigger anything to the listener.
I have verified the correct business account linked with credentials as well.
Everything is working perfectly except the Webhooks triggering from PayPal.
Also, as noting is triggering I do not have debug id as well.
If you have not registered any webhook listeners for any of your REST Apps (either sandbox or live), PayPal will not send any webhooks because it does not know which ones to send events for, or where to send them.
To register webhooks for an app, either:
Find the app for the correct sandbox account in My Apps and Credentials (or create one), and Add Webhook
Do so via using thewebhooks API, with the correct REST App client id and secret for authentication
Until you register a listener URL for event(s), no webhooks will be sent.

Pay Pal webhooks never called

I have been using Pay Pal for payments from our website for many years without problems.
We currently use Pay Pal buttons to redirect to Pay Pal's website for the payment, and have it return to our website to record the payment.
Now we are trying to configure webhooks in Pay Pal to have it notify our server of payments. The goal is to have auto renewing subscriptions that call the webhook every month when Pay Pal automatically processes the payment.
So I setup the webhooks on,
https://developer.paypal.com/
I setup the webhooks for both the sandbox and live account, and verified it can call the webhook successfully through their webhook simulator.
However, when any payment is made through our website the webhooks are never called?
I've tried everything, but they are never called.
Are the webhooks only called if you make the payment through the Pay Pal API, or are they also called if a payment is made directly, or through a Pay Pal button?
Do they get called for auto-renewing subscriptions?
Okay, so now I know that said you did set up the webhooks. However, I am still going to include doing that in my answer anyway.
Step 1: Creating The PayPal Application
Visit URL: https://developer.paypal.com/developer/applications/ and
click 'create app'
Give your Application some name and move forward.
Step 2: Adding/Managing WebHooks For Your Application
After creating the app, you will be presented with this screen.
Scroll a bit down and click 'Add Webhook'.
Add your desired webhooks (subscription webhooks are here). If you are not sure. Just choose 'All events' (the first option) for the time being. Also, make sure you add a Webhook URL.
Step 3: Listening for WebHooks
Webhook Details:
https://developer.paypal.com/docs/api-basics/notifications/webhooks/event-names/#sales
The webhook you need to listen for auto-renewing subscriptions is: PAYMENT.SALE.COMPLETED
Step 4: Verifying you are getting the Callbacks
You can visit:
https://developer.paypal.com/developer/dashboard/webhooks/live to see
all the webhooks that were fired by PayPal (only stores up to 30 days).
Personally, I would try to log everything that I receive at my
endpoint and compare my log with PayPal's log.
Step 4: Validating the Callbacks
Furthermore, you can also visit:
https://developer.paypal.com/docs/api-basics/notifications/webhooks/rest/#to-use-the-paypal-rest-sdks-to-verify-event-notifications
to get the sample code(s) to validate the callback (webhooks) once you receive
them.
Please understand the distinction as i have quoted from the below sources.
The PayPal REST APIs use webhooks for event notification.
.
.
The Paypal BuyButton triggers IPN

Paypal app. From sandbox to live

I implemented paypal sandbox in my application and after hours of headaches with their documentation, I managed to implement a working app that uses their RestAPI. Now I want to go live with the application.
In their documentation the steps to go live with the app are as follows:
1. Ensure your application adheres to the PayPal Application Policies and Guidelines.
2. Update the Sandbox API credentials in your PayPal calls to those assigned to a live PayPal account.
3. Update your PayPal endpoints from the Sandbox to the PayPal production servers.
4. Register your application with PayPal.
5. If your application makes use of Adaptive operations, obtain a live AppID.
6. Go Live!
I don't understand how can I register my application with PayPal (point 4). In the documentation, it says that my app needs to be approved by PayPal and that's it. How do I do that ? How do I submit my app for reviewing ?
If I understand correctly, point 1, 2 and 3 affect only my code, registering the new credentials, right ?
Finally, I need an appID, but I guess that comes as soon as the app has been approved by PayPal to go live.
The full documentation I followed is here.
Thank you.
As Per Paypal Documentation : Registering your application with PayPal :
Submitting your application
To submit your website or mobile application to PayPal:
Log into the PayPal Developer website using the credentials of the
PayPal account registered to the application owner.
Note: The PayPal account associated with the application must be a
verified Premier or verified Business account. Click Dashboard at the
top of the page to open the My Apps & Credentials page. (Alternately,
you can go directly to the My Applications page by navigating to the
My Apps & Credentials page on the Developer website.)
Registering a REST API app
In the REST API apps section, click Create app. See creating an app
for more information. Registering an NVP/SOAP API app
Click Dashboard at the top of the page to open the My Apps &
Credentials page. Click the Create and manage NVP/SOAP API apps link
at the bottom of the page. Click New App on the left nav bar to access
the App Information form. Complete the form and click the Submit App
button. To ensure the fastest possible application review, supply as
much information as possible when completing the submittal form. Tip:
When filling out the application, be sure to provide the e-mail
address that corresponds to the PayPal account that is used make API
calls. The type of API operations used in your application dictates
the review process applied to your application. PayPal divides
applications into three distinct review categories:
Merchant APIs include Express Checkout, Website Payments Pro, Button
Manager, Mass Pay, Recurring Payments, and all of the Informational
APIs. Adaptive APIs include Adaptive Payments, Adaptive Accounts, the
Permissions Service, and the Invoicing Service. Calls to these APIs
require an AppID value. Mass Pay includes only the MassPay operation
As per 2020
PayPal developer guideline, you just have to mail them all the required things that they want to register your app.
Login to http://developer.paypal.com.
Click on the Dashboard menu item at the top.
Under the REST API Apps section, click the Create App button.
Proceed with the steps to create the app.

How to test webhooks in paypal sandbox?

I have implemented paypal payment in my shop with the new paypal rest api.
I noticed the is no notification url any more to get a callback when i create a transaction. But i saw that there are now webhooks. So i configured some webhooks in paypal and would not like to test them.
But i can not find any tool or interface to test the webhooks. I do not mean the way to access them by the rest api. I want paypal to execute a request to my server when a payment is for e.g. revoked somehow.
Where can i tell paypal to execute webhook request?
You need to setup the APN gateway.
In the developer account, you can log into the test accounts in sand box mode.
Next go to the account settings and look for APN.
You can setup the path to your test servers url and capture the "webhooks" there.
Hope this helps.