Setup Guide

How to connect Stripe to Margin — find your API key

3 minutes · Stripe integration · Payment sync

Connecting Stripe to Margin automatically imports your Stripe payments, refunds, and payouts as transactions — so your income records are always complete without manual entry.

What does the Stripe integration do?

When you connect Stripe, Margin:

Step-by-step: connecting Stripe

  1. 1
    Log in to the Stripe Dashboard
    Go to dashboard.stripe.com and sign in to your Stripe account. Make sure you're viewing your live account, not test mode.
  2. 2
    Navigate to API keys
    Click Developers in the top-right navigation bar, then select API keys from the left sidebar menu.
  3. 3
    Copy your secret key
    Under 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
  4. 4
    Paste into Margin
    In Margin, go to Settings → Integrations → Stripe. Paste your secret key into the field and click Save.
  5. 5
    Run the first sync
    Click Sync now. Margin pulls in your Stripe transaction history. For large accounts this may take a minute. New transactions will sync automatically every day.
Use your live key, not your test key

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.

  1. In the Stripe Dashboard, go to Developers → API keys
  2. Scroll down and click Create restricted key
  3. Give it a name like "Margin read-only"
  4. Under Permissions, enable Read for: Charges, Refunds, Balance, Balance transactions, Payouts
  5. Click Create key and copy the key
  6. Paste it into Margin as above
Also use PayPal?

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

Common questions

How far back does Margin import Stripe transactions?
Margin imports your full Stripe transaction history from the date your Stripe account was created, up to the current date. This may take a few minutes for older accounts with many transactions.
I process payments in multiple currencies — will Margin handle this?
Yes. Margin imports all Stripe currencies and stores the original currency amounts. For accounting and MTD purposes, Margin converts to GBP using the exchange rate at the time of the transaction.
What happens to Stripe fees — are they recorded separately?
Margin imports gross payment amounts. Stripe fees are reflected in your net payouts. You can categorise the difference as a payment processing expense when reconciling.
Will Margin see my customers' card details?
No. Stripe API keys do not expose card numbers, CVVs, or other sensitive payment data. Margin can only see the non-sensitive transaction metadata (amounts, dates, descriptions).

Stop manually recording your Stripe income

Connect Stripe to Margin and every payment appears automatically — categorised and ready for your MTD quarterly update.

Start free trial