Those are provided by the bank that issued the card. Your iPhone does not have any account information or details about the transaction. Apple does not either. Your iPhone only submits to the merchant encrypted data and Apple has no knowledge of the transaction, account details, merchant details including location.
The information you see in your Apple Wallet app is provided by the bank that issued the payment method you used for the purchase/transaction. The issuing bank controls all information that you have available in your Apple Wallet app.
Some banks only provide that most recent data, such as last 10 days of transactions. Some banks provide only last 30 days or so. However, some banks provide a continuous, non-deletable stream of transactions. What you see in your Apple Wallet app is solely made available by the issuer.