Creating Webhooks In PayPal

Introduction

Note: In most cases, you won’t need to manually create or configure a Webhook. It is automatically generated during the add-on setup process. Follow this guide only if the Webhook is not active message is displayed.

Webhooks are notifications that PayPal sends to your website whenever specific events occur, such as processing a subscription, issuing a refund, or approving a payment. This article explains how to manually set up a webhook or customize the events you want to receive.

PayPal webhooks setup.

Automatically activate the Webhook

This is the recommended setup for most users, as it ensures immediate and accurate communication between your PayPal account and Gravity Forms. In this case the process is done automatically in the background as part of the add-on connection process.

Manually set the Webhook ID

If the automatic setup doesn’t work, you can manually create a webhook in PayPal and provide its ID in Gravity Forms. For more information on creating webhooks in PayPal, refer to this article.

Note: When creating the webhook, the URL should have the following format www.yoursite.com/?callback=gravityformsppcp

Image showing Webhook section in the PayPal checkout settings

Steps To Create A Webhook in PayPal

  1. Log In to the PayPal Developer Dashboard. If you don’t already have a PayPal Developer account, you’ll need to create one.
  2. Create or Select an App → Navigate to My Apps & Credentials.
    If you don’t have an existing app, click Create App to generate your API credentials. This will also allow you to subscribe to webhook events.
    If you already have an app, proceed by clicking on the app name under the REST API apps section.
  3. Subscribe to Webhook Events. Inside your app details, scroll down to the Webhooks section → Click Add Webhook → Enter the URL for your listener — this is the endpoint URL that will receive incoming HTTP POST notifications triggered when specific events occur.
  4. Select the events from the Event types list to which your app will subscribe. You can either select All Events or choose one or more individual events. Gravity Forms PayPal Checkout Add-On uses these events:
    PAYMENT.CAPTURE.REFUNDED
    PAYMENT.CAPTURE.REVERSED
    PAYMENT.AUTHORIZATION.VOIDED
    PAYMENT.CAPTURE.COMPLETED
    PAYMENT.CAPTURE.DENIED
    PAYMENT.CAPTURE.DECLINED
    PAYMENT.SALE.COMPLETED
    BILLING.SUBSCRIPTION.PAYMENT.FAILED
    BILLING.SUBSCRIPTION.CANCELLED
    BILLING.SUBSCRIPTION.EXPIRED
  5. Click Save. The dashboard will display your webhook listener URL, the ID for the webhook, and the events you have subscribed your app to.

For more information on how to set up webhooks, refer to PayPal’s Subscribe to Webhook Events documentation.