---
title: How do I connect Stripe or Xero to codus?
question: connect stripe xero
area: integrations
order: 8
surface: desktop
audience: beginner
keywords: [stripe, xero, connect stripe, connect xero, payments, accounting, secret key, restricted key, test mode, live mode, invoices, subscriptions, checkout, client id, oauth, finance, bookkeeping, striped, zero]
related: [integrations-overview, connect-google, connect-meta-ads]
updated: 2026-07-21
---

# How do I connect Stripe or Xero to codus?

Both live in **Integrations** in settings, under **Finance + accounting**. **Stripe** connects with a secret key you paste from your Stripe dashboard. **Xero** connects by making a small Xero app once and signing in through your browser. Once connected, agents can build and inspect payments in Stripe (customers, products, checkout sessions, subscriptions, invoices, and webhooks) and read and write your books in Xero (invoices, bills, contacts, chart of accounts, bank transactions, payments, and reports), all without ever seeing your login.

## Connect Stripe (paste a secret key)

### Before you start

- You need a Stripe account. A **test-mode** key is the safe default and is free to use. codus can build and inspect everything in test mode without touching real money.
- For live data, a **restricted key** (it starts with `rk_`) with only the permissions you need is the safest choice. With a live key connected, agents make live writes only when you explicitly ask for that exact operation.

### Steps

1. Open the gear (**⚙**), click **See all settings →**, then click **Integrations**.
2. Find the **Stripe** card and click **Open Stripe API keys**. Your browser opens dashboard.stripe.com/apikeys, under **Developers → API keys**.
3. Copy a **secret key**. It starts with `sk_` (a standard secret key) or `rk_` (a restricted key). Toggle test mode on the Stripe dashboard if you want a test key.
4. Come back to codus, paste the key into the box on the card, and click **Connect**.

### How do I know it worked?

The card shows a green **Connected** label with your account name and the mode, for example "Connected · Your Company · test mode" or "· LIVE". The mode tells you at a glance whether codus is pointed at test or live data.

## Connect Xero (make an app, then sign in)

Xero uses a secure sign-in, so instead of a password you make a small Xero app once and paste its **Client id**. codus then runs the sign-in for you in your browser. There is no secret to share.

### Before you start

- You need a Xero login. You will register a developer app, which is free and takes a few minutes. No Xero developer experience is needed.
- Keep the codus window open during the steps: it shows you the exact **Redirect URI** to register, with a **Copy** button.

### Steps

1. Open the gear (**⚙**), click **See all settings →**, then click **Integrations**, and find the **Xero** card.
2. Click **Open the Xero developer apps page**. Your browser opens developer.xero.com/app/manage.
3. Sign in with your normal Xero login, then click **New app**.
4. Give it a name like **codus**. For integration type, choose **Mobile or desktop app**. This is the secure option that needs no secret.
5. For **Redirect URI**, paste the exact value the codus card shows. Click **Copy** on the card to grab it, then paste it into Xero.
6. Create the app, open it, and go to the **Configuration** tab. Copy the value in the **Client id** field there. Use that field, not the id in your browser's address bar, or Xero rejects it with an "unknown client" error.
7. Back in codus, paste the Client id into the box on the card and click **Connect with Xero**.
8. Your browser opens the Xero sign-in page. Log in, choose the organisation you want codus to access, and click **Allow access**. codus flips to Connected on its own.

### How do I know it worked?

The card shows a green **Connected** label with your organisation name. If you gave codus access to more than one organisation, a dropdown appears on the card so you can switch which one is active.

## Common problems

- **Stripe: the box would not accept my key.** Paste the full secret key that starts with `sk_` or `rk_`. A publishable key (`pk_`) is not a secret key and will not work.
- **Stripe: I want to be sure it will not touch real money.** Connect a test-mode key. codus can do everything in test mode. Live writes only happen with a live key and only when you ask for that exact action.
- **Xero: "unknown client" error.** You copied the wrong id. Open your app's **Configuration** tab and copy the **Client id** shown there, not the id from the browser address bar.
- **Xero: the browser opened but nothing happened in codus.** Finish the sign-in in the browser (log in, pick the organisation, **Allow access**). If you closed Settings mid-way, open the card and click **Connect with Xero** again.
- **Either one: I want to disconnect.** Click **Disconnect** on the card and confirm. codus forgets the connection; reconnect any time.
