This is the java util to decrypt apple payload data from iOS.
With the ephemralKeyString and the encrypted data from ios app response json, these following static methods in AppleUtils.java can be used to decrypt encrypted data as byte[], decrypted JSON String or parse as any object from decrypted JSON:
byte[] decryptAsBytes(String ephemeralKeyString, String privateKeyString, String certificateString, String data);
String decryptAsString(String ephemeralKeyString, String privateKeyString, String certificateString, String data);
T decryptAsObjectFromJSON(Class<T> clazz, String ephemeralKeyString, String privateKeyString, String certificateString, String data);
See Apple Pay Demo