Accessing Full Apple Pay Transaction Data in AppIntents

I'm currently working on an AppIntent in my app to import Apple Pay transactions via Transaction triggers in Shortcuts. While I can access the transaction name with the following code:

@Parameter(title: "Transaction")
var transaction: String

I'm not sure how to retrieve the full details of the transaction, including:

  • Card or Pass
  • Merchant
  • Amount
  • Name

At the moment, transaction only provides the name as a string, but I need access to the complete transaction data. I know that by selecting specific fields like Amount, Merchant, etc., I can retrieve each piece of data individually, but it would be much easier and more user-friendly to simply retrieve the entire transaction object at once.

Has anyone successfully retrieved all details of an Apple Pay transaction in this context, and if so, could you share how to do so?

Accessing Full Apple Pay Transaction Data in AppIntents
 
 
Q