Use Stripe test keys
A Sandbox project connects to Stripe with test-mode keys.
Do not add Stripe live-mode keys to a Sandbox project. Keys that begin with pk_live_, sk_live_, or rk_live_ belong only in a Live project.
Get the keys from Stripe
In the Stripe Dashboard:
- Turn on Test mode.
- Open Developers, then API keys.
- Copy the test publishable key.
- Reveal and copy the test secret key.
Connect Stripe to the sandbox project
Open the project
Turn on the Sandbox switch in the Modem dashboard and open the Sandbox project.
Open the general tab
Select General. Stripe is listed under Payments.
Start the connection
Select Connect on the Stripe row.
Enter the test keys
Enter the test Secret key and Publishable key. Paste them, or import them from a connected 1Password integration. Both must come from Stripe test mode.
Wait for the check
The status shows Checking connection, then Connected.
Save the connection
Select Connect. Modem saves the connection and sets up the webhook for Stripe events. To change saved keys later, edit them and select Save changes.
Configure Stripe products
A Stripe-backed paid Modem product uses its Stripe Price ID as the SKU. The price must be in the same Stripe test-mode account as the project’s keys. A live Price ID does not work in a test-mode Checkout Session.
Verify the connection
- The Stripe row shows Connected.
- Stripe lists the Modem webhook endpoint in test mode.
Troubleshooting
A product is not available during Checkout
Check that the product’s SKU is a Stripe Price in the connected test-mode account.
Stripe authentication fails
Create or reveal a new test secret key in Stripe, replace the saved key, wait for Connected, and select Save changes.
Before going live
Create a separate Live project and connect it with live-mode Stripe keys. Do not replace a Sandbox project’s test keys with live keys. See Sandbox mode.