Work Hours
8:00 am - 6:00 pm UTC+3

Stephanie Fubara

How we integrated Stripe and Bitrix24

Just the other day, I needed a new dress for a work party. I went to an online store, went through the catalogue, chose something nice and paid for it online.  After a few days, it was delivered to my doorstep! As a buyer, I didn’t have to lift a finger, well, except to scroll through the catalogue and authorize the transaction.

This level of convenience that businesses offer their customers is now a norm. From ordering medical supplies to building materials and office supplies, businesses offer their clients optimum convenience.

With payment gateways like Stripe, businesses can guarantee their customers the security of their details and with Bitrix24 CRM, they can control every other aspect of their businesses - Communication between departments, collaboration on projects, time and project management and so on.

Take a fitness club, for instance, the client would log into the website/ app of the fitness club, enter their personal details, choose a plan or trainer and then pay.  The trainers would then contact the newly registered members and grant them access manually, to some groups. When the trainer creates new materials, he/she would have to send them either via email to all their students or to a social network group. 

(P.S We wrote an article on how to gain traction to a fitness network and increase profits with Bitrix24.)

What if we could automate this whole process by integrating the Bitrix24 portal with the fitness school’s chosen payment gateway?


Stripe and Bitrix24 integration 

INTERVOLGA recently integrated Bitrix24 and Stripe for a client.

  1. Our client no longer needs to worry about granting customers access to products or groups manually, since they get it AUTOMATICALLY as soon as they make a payment on stripe. Stripe payment/billing status is displayed on Bitrix24

  2. Whenever someone pays for a subscription plan on Stripe, a new Bitrix24 external user is created automatically.  This way, he has all his leads, and customers in one place. He can send them personalized messages, emails, calls,  from Bitrix24 and everything is saved. 


For this integration, we wrote a PHP script, which we placed on our client’s server. The server has support for Apache PHP and CRON technology.

Our script picks up subscription data from Stripe, compares it with the data in Bitrix24 and then creates and/or updates contacts in Bitrix24. This process is repeated at a 1-minute interval.


How we copy contacts from Stripe to Bitrix24

Before copying contacts from Stripe to Bitrix24, our script verifies the uniqueness of contacts in Stripe. This is to avoid making duplicates of a contact that already exists in Bitrix24, even though a few details might be different.  Our script checks that 

  1.  the customer’s e-mail is tied to ONLY one record 

  2.  they have ONLY one active subscription plan.

In Bitrix24, before creating / updating information (accounts), our script checks that the following conditions are met : 

  1. that an existing contact has ONLY one e-mail in the E-mail field

  2. and that the email is tied to ONLY one contact


More clearly put, the script

  1. gets users subscription information from Stripe

  2. gets contacts information Bitrix24

  3. compares information from Stripe and Bitrix24 to see if there are contacts in Stripe that do not exist in Bitrix24

  4. if there are contacts in Stripe that don’t exist in Bitrix24, copy the contact to Bitrix24 and sync subscription and access information.

  5. Update and display new contact with their subscription status in Bitrix24


After each run, the script writes results in a log (file) - how many contacts were updated, how many weren’t updated and why, and the number of conflicts.


More about our Bitrix24 and Stripe system implementation 

Our script also takes into consideration every possible conflict situation. For example, when there are duplicates of the same contact, our script only copies one to Bitrix24 and writes the other to a log file. 


No new buttons were created in Bitrix24, there’s no need for users to click on anything. The whole process is automatic.

The current integration is “One-way” - data can only be copied from Stripe to Bitrix24, but not from Bitrix24 to Stripe. We are looking forward to the next stage of the project (two-way integration and to add more features).

We are committed to making companies more efficient by helping them make the most of their Bitrix24. 


Conclusion

INTERVOLGA specializes in Bitrix24 customizations and integrations. We are gold-certified partners of Bitrix Inc. and have been in the market since 2012.

We can help you 

  1. sync and integrate all your business systems (accounting, management, billing, payroll, etc) with your Bitrix24 portal so you can manage your business through one system

  2. save time and money by automating your business processes

  3. customize your Bitrix24 portal to fit your company’s needs

  4. and much more


We also integrated Bitrix24 and Twilio to allow you send and receive Twilio SMS in Bitrix24.  Try it for 14 days free.


  • 28.01.2020