Step 4. Verify receipts
Verify the validity of the receipt received after the payment is completed and whether it has been forged or tampered with. This blocks fraudulent purchase attempts through hacking or payment manipulation and ensures the reliability of payment data. Deliver products to the user only after the receipt passes verification.
Receipt verification flow
To request receipt verification, the app server calls the receipt verification API of the Hive Axyl Server API. The app client passes the values needed for verification to the app server, and the app server receives the verification result directly without going through the app client.
- The app client passes the receipt and purchase information received from the store to the app server.
- The app server requests receipt verification from the Hive Axyl server through the Hive Axyl Server API.
- The Hive Axyl server checks the receipt again with the Apple App Store and returns the verification result to the app server.
- The app server checks the verification result and returns the values needed for Step 5 to the app client.
Depending on the product type, receipt verification is divided into consumable product receipt verification and subscription product receipt verification. For consumable products, a receipt is issued for each purchase, and for subscription products, a receipt that indicates the subscription status is issued.
Implementation order
Follow the process below to verify Apple receipts.
- Prepare receipt information
- Collect the receipt verification request values in the app client and pass them to the app server
- Verify receipts with the Hive Axyl Server API
- Request consumable product receipt verification or subscription product receipt verification on the app server and check the result
When receipt verification is complete, proceed to Step 5. Deliver products and finish transactions.