Stripe Webhooks, Live Mode
  • 07 Dec 2023
  • 2 Minutes to read
  • Dark
    Light

Stripe Webhooks, Live Mode

  • Dark
    Light

Article summary

Important

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.

  1. Go to Setup.

  2. Type “Sites” in the Quick Find box.

  3. Click Sites.

  4. If a Force.com domain has not been set up, continue with the instructions. Otherwise, navigate to the steps for Site Configuration.

  5. Enter your Force.com domain.

  6. Click Check Availability.

  7. Review and accept the Site terms of use.

  8. Click Register My Force.com Domain.
    Deploy_Stripe_1

  9. Click New next to Sites.
    Deploy_Stripe_2

  10. Set Site Label = "Webhook".
    Deploy_Stripe_3

  11. The Site Name will auto-populate.

  12. Click Default Web Address and enter the name you used for the Site Label.

  13. Set Active = “TRUE”.

  14. Click the Active Site Home Page lookup. (This will open a new window.)

  15. Click InMaintenance.
    Deploy_Stripe_4

  16. Click Save.
    Deploy_Stripe_5

  17. Click the newly created Site Label.
    Deploy_Stripe_6

  18. Click Public Access Settings.
    Deploy_Stripe_7

  19. Click Assigned Users.
    Deploy_Stripe_8

  20. Click "Site Guest User, Webhook".
    Deploy_Stripe_9

  21. 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.
    Deploy_Stripe_10

  22. Go to Stripe and log into your test or production account.

  23. Type "developers" and select “Developers > Webhooks”.
    Deploy_Stripe_11

  24. Click Add an endpoint.
    Deploy_Stripe_12

  25. Copy and paste the URL below into the Endpoint URL field. “https://SITE_DOMAIN_NAME/SITE_PATH/services/apexrest/bt_stripe/webhook/WEBHOOK_LABEL”
    Deploy_Stripe_13

  26. Without closing Stripe, go back to Salesforce and copy the Site URL you just created.
    Deploy_Stripe_14

  27. Replace https://SITE_DOMAIN_NAME/SITE_PATH with your Site URL.
    Deploy_Stripe_15

  28. Without closing Stripe, go back to Salesforce and click the App Launcher.
    Deploy_Stripe_16

  29. Select Blackthorn | Payments (Admin).
    Deploy_Stripe_17

  30. Click the Payment Gateways tab.
    Deploy_Stripe_18

  31. Go to the Payment Gateway you want to connect to webhooks and copy the value you placed in the Webhook Label.
    Deploy_Stripe_19

  32. Replace WEBHOOK_LABEL with the value from your Payment Gateway.
    Deploy_Stripe_20

  33. In the Version field, select the latest API version.
    Deploy_Stripe_21

  34. Click on Select events under “Select events to listen to.”
    Deploy_Stripe_22

  35. Check Select all events.
    Deploy_Stripe_23

  36. Click Add events.
    Deploy_Stripe_24

  37. Click Add endpoint.
    Deploy_Stripe_25

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.