# Flow Guide: Record transactions automatically when using Apple Pay

## iOS Shortcuts

Record an expense in Flow automatically every time you tap to pay with Apple Pay — no typing, no opening the app.

ℹ️ Version

This guide assumes Flow **v0.19.3** or later. The _Record an Expense_ action and its field layout were finalized in that release.

## What you're building

Apple's **Shortcuts** app on iOS can react to system events. One of those events is "I just paid with a card in my Wallet". You'll wire that trigger to Flow's _Record an Expense_ action, pre-filled with the transaction amount Apple Pay just charged. The result: every Apple Pay purchase becomes an automatic Flow expense.

## Step 1 — Create the automation

Open the **Shortcuts** app and tap the **Automation** tab at the bottom. Tap the **+** button to start a new automation.

## Step 2 — Choose the Wallet trigger

From the list of triggers, pick **Wallet**. This fires whenever a card transaction goes through Apple Pay.

On the next screen you can **add or remove specific cards** (e.g. only your personal card, not the business one) and **filter by merchant categories**. Leave both at their defaults if you want every Apple Pay charge to be logged.

## Step 3 — Run immediately (recommended)

Scroll down on the trigger setup and choose **Run Immediately**. Without this, you'd have to tap a notification to confirm each automation run, defeating the point. Optionally toggle **Notify When Run** if you want a small heads-up that Flow logged the expense.

Tap **Next**, then choose **Create New Shortcut**.

## Step 4 — Add Flow's "Record an Expense" action

In the new shortcut, search for **Flow** in the action picker. Pick the **Record an Expense** action.

## Step 5 — Wire up the amount

Tap the **Amount** field on the action. Pick **Shortcut Input** as the source — this is the data the Wallet trigger passes in. From the field picker that follows, select **Amount** so Flow receives just the number, not the whole transaction blob.

⚠️ Older Flow versions

On Flow **older than v0.19.2**, empty fields can prevent the action from running. Drop a placeholder (a single dash `-`) into anything you're leaving blank. v0.19.2 and later handle empty fields gracefully.

## Step 6 — Pick a destination account (optional)

Tap the **Account** field and type the account name. The match is exact — typos fall through. If you leave it empty or it doesn't match, the expense lands in your default account, which is usually what you want for a "card I always pay with" automation.

## Step 7 — Save

Tap **Next**, review the automation summary, and tap **Done**. From this point, every Apple Pay charge that matches your trigger filters will quietly create a matching expense in Flow.

💡 Try it

The fastest way to verify the automation is wired up: make a small Apple Pay purchase, then open Flow. The expense should be sitting in today's group, with the right amount, in your default account.
