What does the Stripe integration do?
When you connect Stripe, Margin:
- Imports all Stripe charges, refunds, and payouts as transactions
- Matches payouts to your bank account for easy reconciliation
- Labels Stripe income automatically so you can categorise it quickly
- Syncs new transactions daily so your records stay current
Step-by-step: connecting Stripe
-
1Log in to the Stripe DashboardGo to dashboard.stripe.com and sign in to your Stripe account. Make sure you're viewing your live account, not test mode.
-
2Navigate to API keysClick Developers in the top-right navigation bar, then select API keys from the left sidebar menu.
-
3Copy your secret keyUnder Standard keys, you'll see a Publishable key and a Secret key. Click Reveal live key next to the Secret key, then copy it. It starts with
sk_live_.sk_live_51Ab...Xyz -
4Paste into MarginIn Margin, go to Settings → Integrations → Stripe. Paste your secret key into the field and click Save.
-
5Run the first syncClick Sync now. Margin pulls in your Stripe transaction history. For large accounts this may take a minute. New transactions will sync automatically every day.
Stripe gives you separate keys for live and test mode. Test keys start with sk_test_. Make sure you copy the live secret key starting with sk_live_ — test transactions won't appear as real income.
Using a restricted API key (recommended)
For better security, you can create a restricted key that gives Margin read-only access to your Stripe data. This limits what Margin can access if your key is ever compromised.
- In the Stripe Dashboard, go to Developers → API keys
- Scroll down and click Create restricted key
- Give it a name like "Margin read-only"
- Under Permissions, enable Read for: Charges, Refunds, Balance, Balance transactions, Payouts
- Click Create key and copy the key
- Paste it into Margin as above
Margin also integrates with PayPal. You can connect both Stripe and PayPal simultaneously. Go to Settings → Integrations → PayPal and enter your PayPal Client ID and Secret.
What Margin can and cannot do with your Stripe key
- ✓ Read your payments, refunds, and payouts
- ✓ Read your balance and transaction history
- ✗ Create charges or move money
- ✗ Issue refunds
- ✗ Change your Stripe account settings