as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
useIapPurchaseUpdates(purchaseUpdatesRequest: PurchaseUpdatesRequest): { iapPurchaseUpdatesLoading: any; iapPurchaseUpdatesError: any; iapPurchaseUpdates: any; }
useIapPurchaseUpdates hook should be called in your main screen component. This hook automatically invokes getPurchaseUpdates API and populates states during main screen launch and App state transitions from BG -> FG. “iapPurchaseUpdates” state returned by this hook has unfulfilled and canceled consumable purchases. Amazon recommends that you persist the returned PurchaseUpdates data and query the system only for updates by calling the hook with reset flag being false. This hook ensures to keep getting you latest purchase updates.

Parameters

purchaseUpdatesRequest

PurchaseUpdatesRequest Purchase Updates request parameters

Returns

{ iapPurchaseUpdatesLoading: any; iapPurchaseUpdatesError: any; iapPurchaseUpdates: any; } States and value of Purchase updates
最后修改于 2026年8月25日