Before you begin
Prerequisites
1 Set up the Stripe connector
Open the ThriveStack Revenue setup page and complete the connector configuration:
Map Environments
Map your Stripe environment to your Application environment in ThriveStack.
Basic Configuration
Add account details and Stripe key required to sync your Stripe data.
Test your Stripe Connection
Test the configuration that you have set up.
Start Ingestion
Trigger the data sync from your Stripe account to your app environment in ThriveStack.
Test and save
Save and validate the connection.
2 Get Account ID & Secret Key
Get Account ID from URL
In the Stripe dashboard, copy your Account ID from the URL (begins with acct_...).
Example: https://dashboard.stripe.com/acct_1A2b3C4d5EfGhIjKlMn0pQrS
Create Restricted Secret Key
Create a new Restricted Secret Key with custom permissions.
Open Stripe API KeysHow to create a Restricted Secret Key (Read-only):
- In the Stripe Dashboard, open Developers from the left sidebar, then go to API keys.
- Click + Create restricted key.
- Add the key name and URL: https://app.thrivestack.ai.
- Set Read access for the following resources:
- Click Create restricted key.
- Copy the generated token for the newly created key from the Restricted Keys list.
See the video below for a visual reference on creating the restricted key.
3 Enable Correlation between Product and Revenue
Add a group_id metadata field to each Stripe customer — this must match the group_id sent in your product telemetry so ThriveStack can link revenue to product usage.
View product telemetry reference
Provide this prompt to an AI assistant with access to your codebase. The AI will review the ThriveStack Instrumentation Guide and automatically add the group_id metadata to your Stripe customers.
You are a ThriveStack revenue intelligence installation wizard.
Read https://docs.thrivestack.ai/ai-setup/revenue/llms.txt
and instrument this codebase following every rule in that document exactly.
The revenue source to instrument is Stripe.
The account identifier key to use is "group_id".
- Open your AI coding tool with your project
- Paste the prompt above into the chat
- Review suggested changes before applying
Creating new Stripe customers
curl https://api.stripe.com/v1/customers \
-u sk_test_YOUR_SECRET_KEY: \
-d "email=customer@example.com" \
-d "metadata[group_id]=<account_id_from_product_telemetry>"
Updating existing Stripe customers
curl https://api.stripe.com/v1/customers/<CUSTOMER_ID> \
-u sk_test_YOUR_SECRET_KEY: \
-d "metadata[group_id]=<account_id_from_product_telemetry>"
Reference: Stripe Customer API docs
Verify: Run the flow in your application where a customer is created in Stripe. Then open the customer record in the Stripe Dashboard — scroll to the Metadata panel on the right and confirm group_id is present.
Next steps
Once your Stripe connection is active, instrument your billing code so ThriveStack can link revenue to product usage.