Some Key use cases for Salesforce Stripe integration for Subscriptions and Invoices:
- Manage subscriptions in Salesforce
- Receive invoice and payment updates to your Salesforce org whenever a subscription is processed every(month/year) using Stripe webhooks.
- Perform business logic around failed payments to help agents reach out to customers.
- Create Subscriptions, invoices, payments, and customers in Salesforce using webhooks while being created/updated in Stripe from other peripheral systems.
Bidirectional sync for subscriptions between Salesforce and Stripe:
- In Order to connect Stripe with Salesforce and integrate customers, payment methods and payments check out the previous article.
- 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.
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:
- Go to the Developers->webhook-> click on add endpoint
- 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.
Check out another amazing blog by Kizzy Consulting here: Salesforce Field Service Lightning: Features and Benefits
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.