Configure Webhooks in Stripe
  • 02 Apr 2024
  • 1 Minute to read
  • Dark
    Light

Configure Webhooks in Stripe

  • Dark
    Light

Article summary

  1. Navigate to your connected Stripe account dashboard. If you are creating a Webhook URL for your Stripe account in test mode, make sure the "Viewing test data" switch is on.Configure Webhooks in Stripe_1
  2. Select the Developers tab.
  3. Click the Webhooks tab and select Add endpoint.
  4. In the Endpoint URL field, set the URL to the Salesforce webhook Site you just created. 
    • Complete the following steps to locate the SITE_PATH value.
      • Go to Setup. 
      • In the Quick Find box, enter “Sites and Domains.” 
      • Click “Sites.” 
      • Click Edit next to the Salesforce webhook Site you just created. 
      • Use the Default Web Address.  
    • Now, you'll need to replace the 3 upper-case values with your org values in this URL: https://SITE_DOMAIN_NAME/SITE_PATH/services/apexrest/bt_stripe/webhook/WEBHOOK_LABEL
      • SITE_DOMAIN_NAME = The Salesforce Domain Name for the Site you set up.
      • SITE_PATH = The Path for the Site.
      • WEBHOOK_LABEL = The value in the Payment Gateway Webhook Label field.
      • NOTE: If you have multiple Stripe accounts connected to your Salesforce org and want to create a Webhook Endpoint for each in Stripe, you can use the same Salesforce Site. Change the WEBHOOK_LABEL part of the URL to the Webhook Label value on the Payment Gateway record you want to use.
  5. For Select events to send, check the Select all events box.
  6. Click Add events.Configure Webhooks in Stripe_6

URL Example

URL Template: https://SITE_DOMAIN_NAME/SITE_PATH/services/apexrest/bt_stripe/webhook/WEBHOOK_LABEL

SITE_DOMAIN_NAME = The Salesforce Domain Name for the Site you set up. To find this value, navigate to the Site record and look at the Custom URLs Related List. Use the Domain Name value. If you see more than 1 domain name, always use the one with “secure” in the name. These domains use “https” which Stripe requires.

SITE_PATH = The Path for the Site. Use the Path value from the Custom URLs Related List of the Site.

WEBHOOK_LABEL = To find this value, go to the Payment Gateway record you want to use. Use the value in the Webhook Label field.

URL Result: https://adminmethods.secure.force.com/stripe/services/apexrest/bt_stripe/webhook/test


What's Next