Stripe
This guide will help you generate the necessary API credentials to ingest financial reports and transaction data from Stripe into your Payrails account.
Prerequisites
- A Stripe account with Administrator or Developer permissions
- Access to the Stripe Dashboard
Overview
To ensure we can ingest data for both your production and testing environments, you will need to generate two separate API keys:
- One for Live Mode (production)
- One for Test Mode (sandbox)
We recommend using Restricted API Keys for both. This follows security best practices by limiting our access strictly to the reporting data we need.
Step-by-step instructions
Step 1: Generate your Live Mode Key
-
Log into your Stripe Dashboard
-
Ensure the Test mode toggle (usually in the top-right or top-left corner) is OFF
-
Navigate to Developers > API keys
-
Under the "Restricted keys" section, click Create restricted key
- Note: Do not use the "Secret key" unless specifically required
-
Name the key:
Payrails Live Reporting -
Under the Permissions section, configure the following access:
- Reporting:
- Locate Report Runs and Report Types
- Select Write (Required to generate new reports on your behalf)
- Core:
- Locate Files
- Select Read (Required to download the generated report files)
- Reporting:
-
Click Create key
-
Complete the 2FA verification if prompted
-
Copy the key (it will start with
rk_live_...) and store it securely. You will not be able to view it again
Step 2: Generate your Sandbox (Test Mode) Key
-
In the Stripe Dashboard, switch the Test mode toggle to ON
-
Navigate to Developers > API keys
-
Under the "Restricted keys" section, click Create restricted key
-
Name the key:
Payrails Sandbox Reporting -
Configure the same permissions as the Live key:
- Reporting > Report Runs and Report Types: Write
- Core > Files: Read
-
Click Create key
-
Copy the key (it will start with
rk_test_...) and store it securely
Step 3: Share credentials with Payrails
Share your API credentials in a secured way with Payrails. Please clearly label which key is for Live and which is for Sandbox.
Recommended methods:
- Use your preferred secrets manager or vault tool (1Password Shared Vaults, AWS Secrets Manager, or GCP Secrets Manager)
- If a shared vault is not possible, share credentials over a PGP-encrypted file
Updated about 19 hours ago