- 07 Dec 2023
- 2 Minutes to read
- Print
- DarkLight
Stripe Webhooks, Live Mode
- Updated on 07 Dec 2023
- 2 Minutes to read
- Print
- DarkLight
To use the following instructions, you must have Salesforce administrator access to Salesforce and Stripe.
Once you have connected to Stripe, it's time to configure webhooks. Webhooks automatically send specified data from Stripe to Salesforce.
Go to Setup.
Type “Sites” in the Quick Find box.
Click Sites.
If a Force.com domain has not been set up, continue with the instructions. Otherwise, navigate to the steps for Site Configuration.
Enter your Force.com domain.
Click Check Availability.
Review and accept the Site terms of use.
Click Register My Force.com Domain.
Click New next to Sites.
Set Site Label = "Webhook".
The Site Name will auto-populate.
Click Default Web Address and enter the name you used for the Site Label.
Set Active = “TRUE”.
Click the Active Site Home Page lookup. (This will open a new window.)
Click InMaintenance.
Click Save.
Click the newly created Site Label.
Click Public Access Settings.
Click Assigned Users.
Click "Site Guest User, Webhook".
Add the Blackthorn | Payments (Site Guest User) permission set to this user's record.
For users looking to set up Webhooks with a Payments package older than v5.6, you will need to add the Blackthorn | Payments (Webhooks) permission set. Additionally, you will need to add a Sharing Rule to allow the Site Guest User to access the Payment Gateway object.
The Blackthorn | Payments (Site Guest User) permission set is now a dual-purpose permission set with packages v5.6 and beyond. This permission set will be used for webhook setup and REST API setup.
Go to Stripe and log into your test or production account.
Type "developers" and select “Developers > Webhooks”.
Click Add an endpoint.
Copy and paste the URL below into the Endpoint URL field. “https://SITE_DOMAIN_NAME/SITE_PATH/services/apexrest/bt_stripe/webhook/WEBHOOK_LABEL”
Without closing Stripe, go back to Salesforce and copy the Site URL you just created.
Replace https://SITE_DOMAIN_NAME/SITE_PATH with your Site URL.
Without closing Stripe, go back to Salesforce and click the App Launcher.
Select Blackthorn | Payments (Admin).
Click the Payment Gateways tab.
Go to the Payment Gateway you want to connect to webhooks and copy the value you placed in the Webhook Label.
Replace WEBHOOK_LABEL with the value from your Payment Gateway.
In the Version field, select the latest API version.
Click on Select events under “Select events to listen to.”
Check Select all events.
Click Add events.
Click Add endpoint.
You now have successfully set up your Stripe Webhook!
Test the webhook connection by creating test Transactions, Subscriptions, or any other general payment processing tasks. You should see successful Webhook Events in your Stripe Dashboard.