We are working on a Loyalty Program to provide it as a SaaS. To provide it as a SaaS one of the challenges in front of us was the automation of payment from Customers. In order to facilitate quick, easy and effective payment system we decided to do Stripe Salesforce Integration.
Stripe is a US technology company, operating in over 25 countries, that allows both private individuals and businesses to accept payments over the Internet. Stripe focuses on providing the technical, fraud prevention, and banking infrastructure required to operate on-line payment systems.
In Loyalty Program we involve members in several gamification activities (answering polls, watching videos etc.) and give them loyalty points on successful completion. Members can buy products from the same portal using their loyalty points.
We need to provide a Wallet Facility to the client so that he can track his current credit balance and points utilized by his members at any time with proper expenditure details. There are wallet transactions, transaction can be of two type “Credit Purchased” or “Order Placed by Members”. So when user pays us using stripe we create wallet transaction record with type “Credit Purchased”. When members order any product from portal first we check credit balance or wallet and if there is sufficient balance we create wallet transaction record with type “Order Placed by Members” and let member order the product. On Wallet Object we summarize the wallet transaction records for available credit balance.
Stripe Functionality: -
- Syncing Stripe and Salesforce
- For Stripe Salesforce Integration we have generated the Secret key.
i.e Total Credit Purchased --> Total Credit Purchased using Stripe Total Credit used --> Credit used by the Members of the Program to Order Products from portal as per their Loyalty Points. This can never be more than Total Credit Purchased. Current Credit --> Total Credit Purchased - Total Credit Used.
Whenever any Member try to order any product from portal we check if there is sufficient balance in the wallet, only then we allow members to place order. In other cases we send email to the System Admin. We also have active process which automatically sends email when Wallet Current Credit is below $100. Now the stripe integration is precisely tested and it is working fine with the Loyalty Program’s other Business logic.