This article explains how to integrate Stripe with your Brilliant Assessments site so you can charge respondents for assessments. It covers creating a Stripe account, testing the integration in sandbox mode, and switching to live mode for production payments.
If you wish to charge respondents to take your assessments, you need to set up an account at Stripe.com and integrate it with your Brilliant Assessments site. We recommend testing the integration in Stripe's sandbox (test mode) first before going live.
Tip: Always test your Stripe integration in sandbox mode before switching to live keys. This lets you verify payments work correctly without processing real charges.
On this page
1. Prerequisites
Before you begin, make sure you have:
- A Stripe account. If you do not have one, sign up at stripe.com.
- Admin access to your Brilliant Assessments site > Site Settings > Integrations > Stripe. Refer to Stripe tab for more details.
- At least one assessment with pricing enabled. Refer to Pricing tab in Assessment Settings for more details.
2. Enable Sandbox (Test Mode) in Stripe
We recommend starting in Stripe's sandbox environment so you can test payments without processing real charges.
- Log in to your Stripe Dashboard.
- In the top-right corner of the dashboard, look for the Test mode toggle. If you are on a newer Stripe account, look for a Sandbox option in the top navigation or account menu instead.
- Click the toggle to switch to Test mode. You will see an orange banner or indicator confirming you are now in the test environment.
Note: The location of the test mode toggle may vary depending on when your Stripe account was created. Newer accounts may use "Sandbox" instead of "Test mode." Both function the same way. (see Testing | Stripe Documentation)
3. Copy Your Test API Keys
While in test mode, locate and copy your test API keys.
- In the Stripe Dashboard, click Developers in the bottom-left menu.
- Click API keys.
- Copy the Publishable key - this starts with
pk_test_in test mode. - Copy the Secret key - this starts with
sk_test_in test mode. You may need to click Reveal test key to view it.
Tip: Test keys always begin with pk_test_ and sk_test_. Live keys begin with pk_live_ and sk_live_. Double-check the prefix to make sure you are using the correct set.
4. Enter API Keys in Brilliant Assessments
Now paste the keys into your Brilliant Assessments site settings.
- In your Brilliant Assessments site, go to Site Settings > Integrations > Stripe.
- Paste the Secret key into the Stripe Private Key field.
- Paste the Publishable key into the Stripe Public Key field.
- Click Save.
Note: The keys are stored encrypted. When you return to the Site Settings screen, the key fields will appear blank. You only need to re-enter them if you want to change them.
5. Test a Payment
With test keys in place, run a test transaction to confirm everything is working.
Enable Pricing on an Assessment
- Go to your assessment's Settings > Pricing tab.
- Check Credit Card Payment Required.
- Enter a test price (e.g., $10.00) and select your currency.
- Click Save.
Make a Test Payment
Open your assessment's respondent link in a new browser tab. You will see a credit card payment form. Use Stripe's test card details:
- Card number: 4242 4242 4242 4242
- Expiry date: Any valid future date (e.g., 12/2030)
- CVC: Any three-digit number (e.g., 123)
- Other fields: Use any values you like
Submit the payment. If successful, you should see the test charge appear in your Stripe Dashboard under Payments (in test mode).
Note: You will get an error if you use a real card number in test mode or a test card number in production mode.
6. Switch to Live Mode
Once you have confirmed that test payments are working, switch to your live Stripe keys to start accepting real payments.
- In the Stripe Dashboard, switch off test mode (or exit the Sandbox) so you are back in live/production mode.
- Go to Developers > API keys and copy your live Publishable key (
pk_live_) and Secret key (sk_live_). - In Brilliant Assessments, go to Site Settings > Integrations > Stripe.
- Replace the test keys with your live keys:
- Paste the live Publishable key into the Stripe Public Key field.
- Paste the live Secret key into the Stripe Private Key field.
- Click Save.
Important: Make sure to replace the test keys with live keys before going live. Leaving test keys in place means real payments will not be processed.
FAQs & Troubleshooting
Use the questions below to troubleshoot common Stripe integration issues.
Comments
0 comments
Please sign in to leave a comment.