简体   繁体   中英

paypal webhook RestApi

I need to implement paypal webhook Rest Api, through which I have to listen to the paypal payment activity.

I am not able to find the way to implement it. I studied paypal documentation, and have done the following based on its suggestions :

  1. First I created an application through which I got the client id and a secret id using this I got the accesskey.

  2. Using the accesskey I created webhook and registered the event type in this url , but I am still not able to listen to any event. So please suggest me how paypal webhook works and the way to do it using java code.

As mentioned at https://developer.paypal.com/docs/integration/direct/rest-webhooks-overview/ to use Webhooks in the Sandbox or Live environment, do the following:

  1. Go to the My REST apps page.
  2. Create an application if you haven't done so already.
  3. Add a webhook URL (the maximum number of webhooks you can register is 10 per application).
  4. Subscribe to the event types of interest.

You will then see the webhook URL, the webhook ID, and the events tracked. This webhook ID is used in the Webhooks API to update a webhook, delete a webhook, get a webhook, and list subscribed webhook event types.

As per your post i believe you have successfully completed up to step 4. Now to listen to the events you subscribed to, you may need to trigger those events. You can read more about when and how events are triggered at https://developer.paypal.com/docs/integration/direct/rest-webhooks-overview/#event-type-support

You may want to refer to PayPal Java SDKs for code samples: https://github.com/paypal/PayPal-Java-SDK

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM