Current Customers, Please Read! Salesforce Summer '20 Update.
The Salesforce '20 update has tightened up the guest user access. Guest users can no longer have "View All" permissions. Our webhook permission set has been updated with the latest release to remove this permission. We've also added a step below to add a sharing rule while setting up webhooks. Please upgrade to the latest version and review all of the setup steps below.
Webhooks provide a mechanism where a server-side application (In this case Stripe) can notify a client-side application (in this case Payments) when a new event (like customer create, update, delete, charge capture, charge failed, etc) has occurred on the server.
Webhooks automatically send specified data to a destination (endpoint) from database events. Our Payments app utilizes webhooks for many of our features, such as updating your Salesforce org with credit card information and creating Dispute records.
Webhook allows us to stay up-to-date by updating the card on file with any recent changes in the credit card information by major credit card companies.
Allow Payouts to be received in Salesforce.
After capturing the transaction, webhooks allows disputes to be created in Salesforce.
Notifies/updates of any deleted payment gateway customer record or payment method.
Recognize any changes in Stripe Billing subscription/Invoices.
Maintains consistency of all records from Stripe into Salesforce and so on.
Create a Force.com Domain
SetupIn the Quick Find, type in and click "Sites."
- If a Force.com domain has not been set up continue with the instructions, otherwise navigate to Step 2.
- Enter a value for your Force.com domain and click check availability.
- Click New next to Sites.
- Set a
Site Name, and
Default Web Address(We suggest using
- Check the
- On the active Site home page field click the
Lookup iconand select In Maintenance (the page is not visible, it's just a placeholder because a value is required).
Require Secure Connections (HTTPS).
- Click Save.
Salesforce Summer '20 Enhancement to Data Security
Settings for the guest user have been updated. In order to set up webhooks correctly, please make sure to pay close attention to steps 3 and 4.
- Assign the Blackthorn | Payments (Webhook Event Admin) permission set to the public user:
- Navigate back to the site you created
- Click on the
Public Access Settingsbutton
Click on the "View Users" or "Assign Users" button
Click on the user
- Add the Blackthorn | Payments (Webhook Event Admin) permission set to this user's record
Not seeing a Blackthorn | Payments (Webhook Event Admin) permission set? Please upgrade to the latest version then try again.
- Click Save
- Create and add a sharing rule to the Payment Gateway object.
This sharing rule must be created to ensure the guest user continues to have the proper access and allows webhooks to work as expected.
Configuration for the sharing rule:
1. Add a label and a name.
2. Set rule type to "Guest user access, based on criteria".
3. Add criteria webhook label not equal to null.
4. Share with your Site Guest User.
5. Set access level to read-only.
- Configuring Webhooks and adding Webhook Events
- 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.
- Select the Developers tab on the left-hand side.
- Click the Webhooks tab and select
- In the
Endpoint URLfield you need to set the URL to the Salesforce webhook site you just created. You'll need to replace the 3 upper-case values with your org values in this URL:
SITE_DOMAIN_NAME = The Salesforce Domain Name for the site you setup. To get 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 is required by Stripe.
SITE_PATH = The Path for the Site. Use the
Path value from the Custom URLs related list of the Site. (Refer above screenshot)
WEBHOOK_LABEL = To get this value, navigate to the Payment Gateway record you want to use. Then copy the value from the
Webhook Label field.
So for the images above, your webhook URL would be:
If you have multiple Stripe accounts connected to your Salesforce org, and want to create Webhook Endpoint for each in Stripe, you can use the same Salesforce Site - you just need to change WEBHOOK_LABEL part of the Url to the
Webhook Labelvalue of the
Payment Gatewayrecord you want to use.
- In Events to Send, click "receive all events" and Add endpoint.
- Navigate to your connected Auth.net account dashboard.
- Click on Account tab | Settings | Webhooks.
- Define a 'Name'
- Follow Step 4 from above to generate the
- Set Status = Active
- Under Select Events, check "All Events" and Save.
If you have multiple Auth.net accounts connected to your Salesforce org, and want to create Webhook Endpoint for each in Auth.net, you can use the same Salesforce Site - you just need to change WEBHOOK_LABEL part of the Url to the
Webhook Labelvalue of the
Payment Gatewayrecord you want to use.
- Test Webhook Connection
Test webhook connection in Stripe
Verifying in Test Mode:
Select the Webhook tab on the left-hand side.
Click on your URL.
* In the top right, click "Send Test Webhook."
- Event Type: "Customer.created" and click "Send Test Webhook."
If you received a "Test webhook sent successfully" message, then Webhooks are set up correctly!
Test webhook connection in Authorize.net
Click on Account tab | Settings | Webhooks.
Edit Endpoint and flip the status to Inactive and Save.
You will see a Test Webhook button as shown in the below screenshot.
- If you received a "Ping successful" message at the top, then Webhooks are set up correctly!
- Verifying in Live Mode
In live mode, don’t forget to create a new URL. You can copy your Test Webhook URL, and update the
Webhook Label from your live Payment Gateway record.
- Create a new Customer in Stripe.
- Click on the newly created customer record, scroll down to Events, and select the Event record.
- Scroll down to Webhooks.
If the Webhook record says "Success", then Webhooks are set up correctly in Production.
- Adding Webhook signatures in Stripe (optional)
Webhook signatures is an additional layer of security. When setting them up, the system makes sure that the webhook event messages are not corrupted in Salesforce.
- Go to Stripe Dashboard | Webhooks
- Select the webhook
- On the Signing Secret section click 'Click to Reveal'
- Navigate in your Salesforce Org to Setup | Custom Metadata Settings
- Click Webhook Secret | Manage Records
- Enter values for 'Label', 'Webhook Secret Name' and 'Signing Secret'
- Insert the Virtual Terminal onto your parent object(s) Page Layouts.
- Use Payment Schedules to create future looking Transactions in minutes.
- Learn about our supported Payment Methods.
If you have received an error in the Setup Wizard, Webhooks or have a question, please view our Troubleshooting and Frequently Asked Questions. If you still have Setup Wizard or Webhook questions, please contact Blackthorn Support. We're happy to help!
Updated 8 days ago