iOS 17+ Guide

Export Your Apple Pay Transactions to a CSV File

A step-by-step interactive walkthrough for building an iOS Shortcut that automatically captures every tap-to-pay transaction and saves it to a spreadsheet-ready CSV file.

📋8 Steps~5 min setupNo app required
Scroll to begin
Lee Patterson

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.

What comes next? Future iterations could include receipt scanning via the iPhone camera, automatic category tagging, and monthly expense summaries — all while keeping data entirely on-device.
Before You Begin

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.

The Walkthrough

8 Steps to Automated Tracking

Follow each step below. The entire setup takes about five minutes.

Step 01

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.

  1. 1Find and open the Shortcuts app on your iPhone. It has a colorful icon with overlapping rectangles.
  2. 2Tap on the Automation tab 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".

iPhone showing the Shortcuts app Automations tab
Step 02

Create a New Automation

You will create a personal automation that triggers automatically whenever you make a payment with Apple Pay.

  1. 1If this is your first automation, you will see the trigger list right away — skip to the next sub-step.
  2. 2If you already have automations, tap the + button in the upper-right corner of the Automations tab to start a new one.
  3. 3Scroll down the list of triggers and tap Transaction (labeled Wallet on 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.

iPhone showing the Transaction trigger selection screen
Step 03

Configure the Trigger

Choose which payment cards and categories this automation should respond to. For comprehensive expense tracking, select all options.

  1. 1In the When I tap section, tap to select all your payment cards — or choose specific ones to track.
  2. 2In the Category section, select all categories for complete coverage.
  3. 3Scroll to the bottom and select Run Immediately — this is crucial for background automation.
  4. 4Turn off the Notify When Run switch to prevent notification clutter.
  5. 5Tap Next in 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.

Step 04

Start a Blank Automation

Now you will build the actual shortcut actions that capture and format your transaction data.

  1. 1On the next screen, tap the New Blank Automation card (labeled Create New Shortcut on iOS 26+).
  2. 2You will see a Search Actions bar at the bottom and an empty automation editor. You are now ready to add actions.
Step 05

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.

  1. 1Tap the Search Actions bar at the bottom of the screen.
  2. 2Type Date and select the Date action from the results (the one with a red calendar icon — not "Format Date").
  3. 3The action will appear in your automation showing Current Date in 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.

Step 06

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.

  1. 1Tap the + button below the Date action (or tap Search Actions at the bottom). Search for Text and select it.
  2. 2Tap inside the empty Text field. A keyboard will appear with a variables bar above it.
  3. 3In the variables bar, find and tap Current Date (the orange token from your Date action) to insert it into the Text field.
  4. 4Type a comma , after the Current Date token.
  5. 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 select Name from the dropdown list.
  6. 6Type a comma , after the Name token.
  7. 7Tap Shortcut Input in the variables bar again. A new blue Shortcut Input token will appear. Tap the blue token that says "Shortcut Input" and select Merchant from the dropdown.
  8. 8Type a comma , after the Merchant token.
  9. 9Tap Shortcut Input one more time. Tap the blue token that says "Shortcut Input" and select Amount from 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.

iPhone showing the Text action with Current Date, Name, Merchant, and Amount variables
Step 07

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.

  1. 1Tap + (or Search Actions) to add another action. Search for Append to Text File and select it.
  2. 2The action will read: "Append Text to ..." — it automatically uses the output from your Text action.
  3. 3Tap the blue folder name (it may say Shortcuts by default). A folder picker will appear — navigate to or create a folder in iCloud Drive for your expenses (e.g., 2026 Expenses).
  4. 4In the File Path field, type a filename ending in .csv, for example: apple_expenses.csv
  5. 5Make sure the Make New Line toggle 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.

Step 08

Save Your Automation

With all actions configured, save the automation and verify it looks correct before your first real transaction.

  1. 1Review your automation from top to bottom. It should show: Receive transaction as inputCurrent DateText (with Date, Name, Merchant, Amount) → Append Text to [folder].
  2. 2Tap Done in the top-right corner to save.
  3. 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.
  4. 4Tap Done again to confirm. Your automation is now active.
Verify Your Setup

Testing Your Automation

Before relying on the automation for real expense tracking, follow these steps to confirm everything is wired up correctly.

Test 1

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.

Test 2

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.

Test 3

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.

Test 4

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.

Test 5

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.

Common Issues

Troubleshooting

If something is not working as expected, check these common issues and their solutions. Tap any item to expand it.

The Result

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.

apple_expenses.csv
DateNameMerchantAmount
Mar 7, 2026 6:17 PMMarina KnowltonMarina Knowlton$1.00
Mar 7, 2026 6:19 PMMarina KnowltonMarina Knowlton$0.02
Mar 8, 2026 9:42 AMBlue Bottle CoffeeBlue Bottle Coffee$5.75
Mar 8, 2026 12:31 PMWhole Foods MarketWhole 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.

Compatible Applications

Apple NumbersMicrosoft ExcelGoogle SheetsLibreOffice Calc