Manage Subscriptions and Invoices from Salesforce using Stripe APIs and Webhooks : Kizzy Consulting

Manage Subscriptions and Invoices from Salesforce using Stripe API’s and Webhooks
by: Kizzy Consulting
blow post content copied from  Forcetalks
click here to view original post


While learning about Stripe /Salesforce integration and implementing connectivity between the two systems for customers, payment methods, and payments. I went ahead and explored subscriptions, and invoicing as the subscription has become an integral part of the payment ecosystem. I have also attached the link to my GIT for reference to the code which includes webhooks and Rest API’s for subscription and invoicing.

Some Key use cases for Salesforce Stripe integration for Subscriptions and Invoices:

  1. Manage subscriptions in Salesforce
  2. Receive invoice and payment updates to your Salesforce org whenever a subscription is processed every(month/year) using Stripe webhooks.
  3. Perform business logic around failed payments to help agents reach out to customers.
  4. Create Subscriptions, invoices, payments, and customers in Salesforce using webhooks while being created/updated in Stripe from other peripheral systems.
dont miss out iconDon't forget to check out: Stripe Integration with Salesforce

Bidirectional sync for subscriptions between Salesforce and Stripe:

  1. In Order to connect Stripe with Salesforce and integrate customers, payment methods and payments check out the previous article.
  2. Once Stripe is connected, create a custom object called a subscription, which will be related to Account(customer) with some basic fields like start date, end date, stripe subscription/schedule id.

3. Configure products with prices in Stripe as well as Salesforce as they are required for subscription.

4. Using Triggers we can sync call the stripe schedule API endpoint, which will create a schedule in Stripe. Please note I would suggest going for a schedule rather than a subscription API, as the schedule can be modified. Refer to the code in my GIT repo below for schedule subscription API.

Note: For subscriptions, products need to be configured in Stripe.

Contents

Contribute to sanjeet2401/Salesforce development by creating an account on GitHub.

4. Every month when a subscription is processed invoice and payment records are created which can be synced back to Salesforce using webhooks.

What is Webhooks?

Webhooks are one of a few ways web applications can communicate with each other. It allows you to send real-time data transfer from one application to another whenever a given event occurs.

Steps to configure webhooks in Stripe:

  1. Go to the Developers->webhook-> click on add endpoint
  2. Enter the endpoint where you want to receive the webhook.

3. click on select events to add the events on which the webhook should fire.

4. After configuration, whenever an event occurs, you will receive the payload on the configured endpoint.

dont miss out iconCheck out another amazing blog by Kizzy Consulting here: Salesforce Field Service Lightning: Features and Benefits

Kizzy Consulting

Kizzy Consulting is a Salesforce Consulting Partner based in Panchkula, India. Kizzy has successfully implemented 100+ Salesforce projects for 100+ clients across sectors like Financial Services, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Germany, and Australia. Get a free consultation now by emailing us at [email protected] or Contact us.

The post Manage Subscriptions and Invoices from Salesforce using Stripe API’s and Webhooks appeared first on Forcetalks.


June 21, 2023 at 04:27PM
Click here for more details...

=============================
The original post is available in Forcetalks by Kizzy Consulting
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Salesforce