Error Reading Order File in Apple Wallet

Hello,

I’m encountering an issue with Apple Wallet orders. Every time I send an order file to my iPhone, I get the error message: “Error reading order file.”

Steps Taken:

1.	Order File Structure:
•	I created an order.json file with the minimal required fields, including:
•	Order Type Identifier (created on the Apple Developer portal)
•	Merchant Identifier: (created on the Apple Developer portal)
•	Status: open
•	Other necessary fields, such as authenticationToken, createdAt, updatedAt, and payment.
2.	Manifest and Signature:
•	A manifest.json file was generated with the SHA-256 hash for each file (e.g., order.json, images).
•	The manifest was signed using my Apple developer certificates:
•	Signer Certificate: signerCert.pem
•	Signer Key: signerKey.pem
•	WWDR Certificate: wwdr.pem
•	Verification of the manifest and signature was done using OpenSSL:
•	Command used: openssl smime -verify -in signature -inform DER -content manifest.json -noverify
•	The verification was successful, but the iPhone still returns the error.
3.	File Packaging:
•	The final package includes the following files:
•	order.json
•	Images (e.g., gardenya_logo.png)
•	manifest.json
•	signature
•	The files were packaged into a .order file (renamed from .zip).
4.	Apple WWDR Certificate:
•	I used Apple WWDR MP CA 1 - G1 for signing the package.

Issue:

Despite following all steps in the Apple documentation, the order file cannot be read by the iPhone, and the error message displayed is “Error reading order file.”

Additional Information:

•	Manifest and Signature: Both files have been validated and match the package contents.
•	Apple Developer Certificates: Used valid Apple Developer certificates.
•	Order Schema: The order.json file follows Apple’s schema for orders.

Could you please provide guidance on resolving this issue? Any suggestions on what could be causing the error, or additional steps to check, would be greatly appreciated.

Thank you for your support!

Answered by Ibtekarlabs in 804311022

Hello @Engineer ,

My issue has been resolved; it was related to certificates (Failed to evaluate trust).

Process to follow:

  1. Create a Merchant Identifier ID.
  2. Create an Order Type Identifier ID.
  3. Download and install the WWDRCAG3 Certificate: Apple WWDRCAG3 Certificate (I am not sure if steps 1, 2, and 3 need to be in this specific order).
  4. In Keychain -> Keychain Access -> Certificate Assistant -> Request a Certificate from Certificate Authority -> Save to file.
  5. Create the Order Type ID Certificate and upload the file from step 4.
  6. Download the Order Type ID Certificate and install it.
  7. Export both the installed certificate and WWDRCAG3 from Keychain in .p12 format.
  8. Convert the Certificate.p12 to certificate.pem and private_key.pem.
  9. Convert WWDRCAG3.p12 to WWDRCAG3.pem.
  10. Use certificate.pem, private_key.pem, and WWDRCAG3.pem to sign the manifest.json file.

Thank you.

The best first course of action here would be to use Console.app to monitor to the relevant processes related to your app and extensions.

A good way to start would be with filtering by the BundleID of the target and / or the target name itself (the process name).

Also be sure to check the system processes for additional information. This will vary based on what and where you are looking but you starting with the above will give you a good start.

Rico

WWDR - DTS - Software Engineer

Hello @Engineer ,

Thank you am almost there got the following messages:

  • Failed to evaluate trust. Description: <private>
  • Failed to load order from URL <private> with error: Error Domain=FinanceKit.OrderBundleSignatureValidationError Code=0

I was wondering if there is a way to reveal or access the logs hidden under the <private> fields to help further diagnose the issue.

Any guidance you can provide would be greatly appreciated.

Thank you

Accepted Answer

Hello @Engineer ,

My issue has been resolved; it was related to certificates (Failed to evaluate trust).

Process to follow:

  1. Create a Merchant Identifier ID.
  2. Create an Order Type Identifier ID.
  3. Download and install the WWDRCAG3 Certificate: Apple WWDRCAG3 Certificate (I am not sure if steps 1, 2, and 3 need to be in this specific order).
  4. In Keychain -> Keychain Access -> Certificate Assistant -> Request a Certificate from Certificate Authority -> Save to file.
  5. Create the Order Type ID Certificate and upload the file from step 4.
  6. Download the Order Type ID Certificate and install it.
  7. Export both the installed certificate and WWDRCAG3 from Keychain in .p12 format.
  8. Convert the Certificate.p12 to certificate.pem and private_key.pem.
  9. Convert WWDRCAG3.p12 to WWDRCAG3.pem.
  10. Use certificate.pem, private_key.pem, and WWDRCAG3.pem to sign the manifest.json file.

Thank you.

Error Reading Order File in Apple Wallet
 
 
Q