This guide shows you how you can easily connect Salesforce to Stripe using the Chargent Payment Processing for Salesforce application. Chargent will allow you to initiate Stripe payments (charge credit cards or ACH / eChecks) directly from Salesforce, either via embedded buttons or scheduled batches for recurring payments.
Note: This is primarily a synchronous integration, meaning that transactions sent to Stripe from Salesforce will update Salesforce with the Stripe responses (approved / declined with related information), but historical data or transactions that are not initiated from Salesforce will not be synced from Stripe to Salesforce.
If you do not yet have a Stripe account, you can sign up for a developer account in just seconds -- all you need is an email address. Of course, if you wish to process real (live) transactions, you will need to open a full account and provide more information including financial information.
All Stripe transactions use the same server endpoint (https://api.stripe.com), so test transactions should be sent using the "Test Secret Key", and live transactions should be sent using the "Live Secret Key". We recommend creating two different Gateway records in Chargent for test and production, to keep both test and live options. You can easily deactivate the test gateway record in Salesforce when you are ready to process live credit card transactions, but you may wish to use it again for future testing at some point.
If you signed up for a developer account, you won't be able to use Stripe in live mode until you fully activate your account, so this is not a concern. But it is always best to check, since payment gateways typically have a setting to control test / live, in addition to changes made on the integration side (for example, using the Stripe "Test Secret Key" instead of the "Live Secret Key" in the Salesforce gateway record).
Chargent Payment Processing for Salesforce supports Stripe's secure tokenization feature. Tokenization helps you meet PCI compliance, by storing transaction data such as credit card numbers on Stripe's servers, and associating it with a token Chargent stores in Salesforce for use in future transactions.
You can also use the tokenization feature when migrating existing customers in Stripe to Chargent. This is useful because the customer tokens can easily be exported and imported into Salesforce, whereas credit card numbers cannot generally.
Stripe tokens start with cus_. Click Customers on the left and export on the upper right to get the data you need to import your customers into Salesforce. Insert the id column in the export file to the Chargent Token field to complete the migration. We recommend setting a Stripe test gateway record in Salesforce using the test credentials from Stripe, per the instructions above, then running it in parallel to your current system for a full month to validate that all is correct.
You have now successfully integrated Salesforce and Stripe, via the Chargent Payment Processing for Salesforce app. There are many more options for integrating business processes, as well as ways to customize Chargent further. But the basic connection is now in place, and you can process one-time or recurring credit card payments through Stripe directly from Salesforce.
When Chargent is installed in a Salesforce Sandbox, transactions are always sent to the payment gateway's test / sandbox / development environment, regardless of whether Chargent's Test Endpoint checkbox is checked. This is done as a security precaution, to prevent real transactions from being accidentally sent from a Salesforce Sandbox.
When Chargent is installed in a production or developer Salesforce org, the Test Endpoint checkbox on the Gateway record will select between sending to the payment gateway's live and test environments. (There are a few exceptions, such as Stripe, which has a single endpoint to send transactions to, and different credentials for live versus test transactions).
If you wish to send live transactions from a Salesforce Sandbox, as a final step in testing, simply use Chargent's Endpoint Override field on the Gateway record, and enter the production endpoint of your chosen gateway there.
Here is the production endpoint URL for Chargent's integration with Stripe:
Note that the full endpoint URL must be entered in the Endpoint Override field, and the domain must be present in the Remote Site Settings (for standard Chargent integrations it should be already present).