startRefreshReceiptRequest method

Future<void> startRefreshReceiptRequest({
  1. Map<String, dynamic>? receiptProperties,
})

Uses SKReceiptRefreshRequest to request a new receipt.

If the receipt is invalid or missing, you can use this API to request a new receipt. The receiptProperties is optional and it exists only for sandbox testing. In the production app, call this API without pass in the receiptProperties parameter. To test in the sandbox, you can request a receipt with any combination of properties to test the state transitions related to Volume Purchase Plan receipts. The valid keys in the receiptProperties are below (All of them are of type bool):

  • isExpired: whether the receipt is expired.
  • isRevoked: whether the receipt has been revoked.
  • isVolumePurchase: whether the receipt is a Volume Purchase Plan receipt.

Implementation

Future<void> startRefreshReceiptRequest(
    {Map<String, dynamic>? receiptProperties}) {
  return _hostApi.refreshReceipt(receiptProperties: receiptProperties);
}