Skip to content

Step 4. Verify receipts

After the user completes a payment, cross-check with the PG provider's server whether the order was actually paid. This blocks abnormal access and forged or tampered payment requests and ensures the integrity of the transaction. 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. Because PG payments are completed in an external browser and the app does not receive the payment result directly, the app client first retrieves undelivered orders to get the values needed for verification.

  1. The app client retrieves undelivered orders and passes the sealed receipt and purchase information of each order to the app server.
  2. The app server requests receipt verification from the Hive Axyl server through the Hive Axyl Server API.
  3. The Hive Axyl server checks again with the PG provider whether the order was paid and returns the verification result to the app server.
  4. The app server checks the verification result and returns the values needed for Step 5 to the app client.

Because PG payment does not support subscription payments, only consumable product receipt verification is performed.

Implementation order

Follow the steps below to verify PG payment receipts.

  1. Get completed payment information (get undelivered orders)
    • Retrieve undelivered orders in the app client and pass the receipt verification request values to the app server
  2. Verify receipts with the Hive Axyl Server API

When receipt verification is complete, proceed to Step 5. Deliver products.