Connecting a Stripe Platform Account To Violet
Overview
As you develop a storefront, one of the most important things to understand is how you will get paid when items are sold. How does money reach your account for sales made through your application? How will that money reach the Merchants you have integrated with?
With Violet Payments, all payment processing, including charging the shopper, calculating your commissions, calculating fees, and transferring funds is handled by Violet on your platform Stripe account. Violet also handles all logic to refund payments if there is a return and reverses the relevant transfers. To do this, a platform Stripe account needs to be connected to Violet with the correct scopes and credentials.
The following operations can then be performed through Violet directly on your Stripe account:
- Onboarding Merchants through Violet Connect
- Performing Checkout through Violet
- Processing Payments
- Processing Transfers
- Processing Payouts
- Processing Refunds
- Processing Transfer Reversals
Additionally, with Violet Payments, every order placed through Violet automatically generates Distribution records, Payouts, and Payout Summaries, all readily available out-of-the-box. Violet also offers an easy way to export data for reconciliation with bank statements, simplifying accounting processes. Discover more about the full suite of features available with Violet Payments here.
This guide goes through the steps needed to connect a platform Stripe account with Violet.
Privacy and Security
Violet will encrypt and store any keys in HashiCorp Cloud Platform Vault. They will not exist in Violet’s system, and only privileged Violet services will be able to read them.
HashiCorp Vault is a highly secure tool for managing secrets, encryption keys, and sensitive data, featuring strong encryption, robust access control, and detailed auditing. Vault is widely trusted in the industry for its reliability and security features.
Learn more about HashiCorp Cloud Platform Vault, here.
Stripe Account ID
1. Create a Stripe account if you don’t have one already.
If you don’t have a Stripe account, you can follow this guide to create one.
2. Store the accountId
in a secure location.
The Stripe Account ID for your platform account is available in Account Settings. This identifier is shared across both Test and Live mode.
3. Make sure Stripe Connect is Enabled
If you do not have Stripe Connect enabled for your Stripe account, read through the steps below.
Stripe Restricted Key
A Stripe restricted key is an API key generated via the Stripe CLI or the API keys page in the dashboard, with specific limitations on the API requests it can execute. For each restricted key that you create (one for test mode, one for live mode), permissions must be granted for both the Platform Account and Stripe Connect. Platform Account permissions allow Violet to process webhooks, while Stripe Connect permissions enable Violet to create Stripe Connect accounts on behalf of your platform account.
At the end of the next series of steps, you will securely share your Stripe keys with Violet in the following format:
Create Test Mode Stripe Keys
- Visit https://dashboard.stripe.com/apikeys
- Toggle into “Test” mode
- The Stripe Publishable Key is visible under the “Standard Keys” section of that page.
- Visit https://dashboard.stripe.com/test/apikeys/create
- Create a Test Mode Restricted Key named
violet-test
with the scopes described here - Save the Key in a secure location.
Create Live Mode Stripe Keys
- Visit https://dashboard.stripe.com/apikeys
- Make sure Test Mode is not turned on.
- The Stripe Publishable Key is visible under the “Standard Keys” section of that page.
- Visit https://dashboard.stripe.com/apikeys/create.
- Create a Live Mode Restricted Key named
violet-live
with the scopes described here - Save the Key in a secure location.
Setup Stripe OAuth
In addition to a restricted key, Violet requires Client keys that Stripe generates for Stripe OAuth. The Stripe Client key lets Violet authenticate a Merchant’s Stripe Standard accounts to the Stripe Platform account via OAuth 2.0. With OAuth, Merchants can connect their existing Stripe Standard accounts to receive payouts, instead of having to create a new Stripe Express account.
Configure Stripe OAuth for Test Mode
-
Go to https://dashboard.stripe.com/test/settings/connect/onboarding-options/oauth
-
Toggle “on” the setting that says “Enable OAuth”
-
Copy the “Test Mode Client ID” in a secure location
-
Click on “Add URI” to add the following Redirect URIs.
Configure Stripe OAuth for Live Mode
-
Go to https://dashboard.stripe.com/settings/connect/onboarding-options/oauth or turn off “Test” mode from the toggle in the right hand corner of the screen.
-
Toggle “on” the setting that says “Enable OAuth”
-
Copy the “Live Mode Client ID” in a secure location
-
Click on “Add URI” to add the following Redirect URIs.
Send Stripe Keys to Violet
-
Visit https://violetio.github.io/credentials-encryptor/encrypt-stripe-creds.html
-
On this page, enter the credentials from Stripe that were saved in the steps above.
-
Click “Encrypt”
-
This will generate a payload beneath your credentials
-
Copy the payload and send it to Violet via Slack or DevRev
-
Do this for both Test Mode and Live Mode
Testing your Stripe Account Connection
Merchant Onboarding
To test the connection, onboard a test Merchant through the Sandbox Mode Violet Connect URL and then navigate to https://dashboard.stripe.com/test/connect/accounts/overview. The payout account created for the new Merchant should be visible in the Stripe Account that was connected to Violet.
Checkout
To test Checkout against your Stripe account, you can create and submit an Order in Test Mode as described here.
The Order object will have a PaymentTransaction
on it, which includes a payment_provider_transcation_id
. This is the ID of the Payment Intent in Stripe. You can navigate to this payment intent by doing the following:
- Copy the payment intent ID and navigate to https://dashboard.stripe.com/test/payments.
- Paste the
payment_intent_id
in the search bar. Hit Enter. - Stripe dashboards should automatically take you to the succeeded payment intent.
Alternatively, you can paste the Violet Order ID in Stripe’s search bar and hit enter. Violet attaches metadata to the transaction in Stripe, so you should be able to see any associated payment intents and transfers when searching by Order ID.
Was this page helpful?