
Lee Patterson
I have been curious about AI and technology for a while now, so I wanted to test a quick, practical project. The idea was simple: find a better way to track my everyday expenses. I figured a good starting point was to automatically export the transactions I already make through Apple Pay on my iPhone.
Down the road I would like to add more functionality — capturing receipts with the camera, categorising purchases automatically, maybe even generating monthly summaries. But every journey starts with a first step, and this is mine.
One thing that mattered to me from the start: privacy. I did not want my financial data floating around on the web. This entire setup runs locally on my iPhone, with the transaction log stored in a file only I can access. No cloud services, no third-party apps, no data leaving my device.
Prerequisites
Make sure you have the following before starting. This entire setup uses built-in Apple tools — no downloads or purchases required.
iPhone
An iPhone running iOS 17 or later. The Transaction trigger was introduced in iOS 17 and is required for this automation.
Shortcuts App
The official Apple Shortcuts app, which comes pre-installed on modern iOS versions. No third-party apps needed.
iCloud Drive
Enabled on your device to store the resulting CSV file. The file will be accessible from any device signed into your iCloud account.
Important Limitations
Be aware of these constraints before you begin.
NFC Tap-to-Pay Only
This automation triggers only for physical NFC payments. Online purchases and in-app Apple Pay transactions will not be captured.
Future Transactions Only
The shortcut begins logging from the moment you set it up. It cannot retroactively import your past transaction history.
Apple Card Exception
If you use Apple Card, you can separately download monthly statements directly from the Wallet app under Card Balance.
8 Steps to Automated Tracking
Follow each step below. The entire setup takes about five minutes.
Open the Shortcuts App
The Shortcuts app is your command center for this automation. It comes pre-installed on iOS, so there is nothing to download.
- 1Find and open the
Shortcutsapp on your iPhone. It has a colorful icon with overlapping rectangles. - 2Tap on the
Automationtab at the bottom center of the screen.
Tip:If you cannot find the Shortcuts app, swipe down on your home screen and search for "Shortcuts".

Create a New Automation
You will create a personal automation that triggers automatically whenever you make a payment with Apple Pay.
- 1If this is your first automation, you will see the trigger list right away — skip to the next sub-step.
- 2If you already have automations, tap the
+button in the upper-right corner of the Automations tab to start a new one. - 3Scroll down the list of triggers and tap
Transaction(labeledWalleton iOS 26+).
Tip:On iOS 18, there is no separate "Create Personal Automation" step — tapping the Automation tab (or the + button) takes you directly to the trigger list.

Configure the Trigger
Choose which payment cards and categories this automation should respond to. For comprehensive expense tracking, select all options.
- 1In the
When I tapsection, tap to select all your payment cards — or choose specific ones to track. - 2In the
Categorysection, select all categories for complete coverage. - 3Scroll to the bottom and select
Run Immediately— this is crucial for background automation. - 4Turn off the
Notify When Runswitch to prevent notification clutter. - 5Tap
Nextin the top-right corner to proceed.
Tip:Selecting "Run Immediately" means the automation will execute silently in the background every time you pay — no manual confirmation needed.
Start a Blank Automation
Now you will build the actual shortcut actions that capture and format your transaction data.
- 1On the next screen, tap the
New Blank Automationcard (labeledCreate New Shortcuton iOS 26+). - 2You will see a
Search Actionsbar at the bottom and an empty automation editor. You are now ready to add actions.
Add a Date Action
First, add a Date action to capture the timestamp of each transaction. This creates a variable you will reference in the next step.
- 1Tap the
Search Actionsbar at the bottom of the screen. - 2Type
Dateand select theDateaction from the results (the one with a red calendar icon — not "Format Date"). - 3The action will appear in your automation showing
Current Datein orange text. This is correct — it captures the exact date and time when the transaction occurs.
Tip:Adding a separate Date action is the most reliable way to capture the transaction timestamp. Its output becomes a Magic Variable you can reference in subsequent actions.
Add the Text Action
The Text action formats each transaction as a row of data. You will combine the date, name, merchant, and amount into a comma-separated line.
- 1Tap the
+button below the Date action (or tapSearch Actionsat the bottom). Search forTextand select it. - 2Tap inside the empty Text field. A keyboard will appear with a variables bar above it.
- 3In the variables bar, find and tap
Current Date(the orange token from your Date action) to insert it into the Text field. - 4Type a comma
,after the Current Date token. - 5In the variables bar, scroll right and tap
Shortcut Input. A blue token labeled Shortcut Input will appear in the Text field. Tap the blue token that says "Shortcut Input", then selectNamefrom the dropdown list. - 6Type a comma
,after the Name token. - 7Tap
Shortcut Inputin the variables bar again. A new blue Shortcut Input token will appear. Tap the blue token that says "Shortcut Input" and selectMerchantfrom the dropdown. - 8Type a comma
,after the Merchant token. - 9Tap
Shortcut Inputone more time. Tap the blue token that says "Shortcut Input" and selectAmountfrom the dropdown.
Tip:Your completed Text field should show: `Current Date` `,` `Name` `,` `Merchant` `,` `Amount` — each variable appears as a colored pill-shaped token separated by commas. The Name and Merchant fields may show the same value (the merchant's name), but including both ensures you capture all available data.

Add the Append to File Action
This action saves each formatted transaction line to a file in iCloud Drive, building your expense ledger over time.
- 1Tap
+(orSearch Actions) to add another action. Search forAppend to Text Fileand select it. - 2The action will read: "Append
Textto ..." — it automatically uses the output from your Text action. - 3Tap the blue folder name (it may say
Shortcutsby default). A folder picker will appear — navigate to or create a folder in iCloud Drive for your expenses (e.g.,2026 Expenses). - 4In the
File Pathfield, type a filename ending in.csv, for example:apple_expenses.csv - 5Make sure the
Make New Linetoggle is on (green) — this ensures each transaction appears on its own row.
Tip:The file and folder will be created automatically on the first transaction if they do not already exist. You can name the folder anything you like — for example, "2026 Expenses" to organize by year. The .csv extension is important so spreadsheet apps can recognize the file format.
Save Your Automation
With all actions configured, save the automation and verify it looks correct before your first real transaction.
- 1Review your automation from top to bottom. It should show:
Receive transaction as input→Current Date→Text(with Date, Name, Merchant, Amount) →Append Text to [folder]. - 2Tap
Donein the top-right corner to save. - 3You will see a summary screen showing: Automation set to
Run Immediately, Notify When Run set to off, the When trigger listing your selected cards, and the Do section showing your actions. - 4Tap
Doneagain to confirm. Your automation is now active.
Testing Your Automation
Before relying on the automation for real expense tracking, follow these steps to confirm everything is wired up correctly.
Run a manual test
Open your automation in the Shortcuts editor and tap the Play button (triangle icon) at the bottom-right. This runs the shortcut immediately. If it completes without a red error banner, the file path and actions are configured correctly. Note: the Name, Merchant, and Amount fields will be empty because there is no real transaction — this is normal.
Check the file was created
Open the Files app on your iPhone. Navigate to iCloud Drive → your chosen folder (e.g., "2026 Expenses"). You should see your .csv file (e.g., apple_expenses.csv). Tap it to open — you should see at least one row with a date.
Make a real tap-to-pay purchase
Use Apple Pay at any NFC terminal (even a small purchase like $0.01 if your bank allows it). After the payment completes, wait a few seconds for the automation to run silently in the background.
Verify the transaction was logged
Open the Files app and check your CSV file again. You should see a new row with the date, merchant name, and amount filled in. If you open the file in Numbers, Excel, or Google Sheets, each comma-separated value will appear in its own column.
Temporarily enable notifications (optional)
If you want to confirm the automation triggers on each payment, go back to the automation summary and turn on "Notify When Run". You will receive a notification each time the shortcut runs. Turn it off again once you have confirmed it works.
Important:When you run a manual test using the Play button, the Name, Merchant, and Amount fields will be empty because there is no real transaction providing data. This is completely normal. Only a real tap-to-pay purchase will populate all fields. You can delete any test rows from your spreadsheet afterward.
Troubleshooting
If something is not working as expected, check these common issues and their solutions. Tap any item to expand it.
Your Transaction Data
Every time you make a purchase with Apple Pay via tap-to-pay, the transaction details are automatically appended to your file. Here is what the output looks like when opened in a spreadsheet app.
| Date | Name | Merchant | Amount |
|---|---|---|---|
| Mar 7, 2026 6:17 PM | Marina Knowlton | Marina Knowlton | $1.00 |
| Mar 7, 2026 6:19 PM | Marina Knowlton | Marina Knowlton | $0.02 |
| Mar 8, 2026 9:42 AM | Blue Bottle Coffee | Blue Bottle Coffee | $5.75 |
| Mar 8, 2026 12:31 PM | Whole Foods Market | Whole Foods Mkt | $47.23 |
Accessing Your File
Open the Files app on your iPhone and navigate to iCloud Drive → your chosen folder (e.g., "2026 Expenses"). Tap the .csv file to preview it, or open it in any spreadsheet app.
