# requestItemListOfNotConsumed

open fun requestItemListOfNotConsumed(@NonNull activity: Activity, @NonNull configuration: PurchasableConfiguration, @NonNull callback: GamebaseDataCallback<List<PurchasableReceipt>>)

Request a Item List which is not consumed. You should deliver this itemReceipt info to your game-server to consume it or request consumeAPI to ToastCloud IAP Server.

    'Important' : This API is used to retry transaction.

Content copied to clipboard
See follow guide : https://docs.toast.com/ko/Game/Gamebase/ko/aos-purchase/#retry-transaction-flow

Call this API for retry transaction next situations:

- After logged in.
- Before calling 'Gamebase.Purchase.requestPurchase()' API.
- When entered lobby or in-game shop.
- When user open profile or postbox.

Example Usage:

    final PurchasableConfiguration configuration = PurchasableConfiguration.newBuilder().build();
    Gamebase.Purchase.requestItemListOfNotConsumed(activity, configuration, new GamebaseDataCallback<List<PurchasableReceipt>>() {
        @Override
        public void onCallback(List<PurchasableReceipt> data, GamebaseException exception) {
            if (Gamebase.isSuccess(exception)) {
                // succeeded.
                for (PurchasableReceipt receipt : data) {
                    // Send userId, gamebaseProductId, paymentSeq, purchaseToken to game server
                    // and process 'Consume Flow'.
                    // See follow guide:
                    // <a href="https://docs.toast.com/ko/Game/Gamebase/ko/aos-purchase/#consume-flow">...</a>
                    String userId = Gamebase.getUserID();
                    String gamebaseProductId = receipt.gamebaseProductId;
                    String paymentSeq = receipt.paymentSeq;
                    String purchaseToken = receipt.purchaseToken;
                    // You can extract 'payload' what you entered.
                    String payload = receipt.payload;
                }
            } else {
                // failed.
            }
        }
    });

Content copied to clipboard

#### Since

Added 2.45.0.

#### Parameters

activity

current Activity.

configuration

sets additional conditions for retrieving results.

callback

callback pass to API result.

#### See also

PurchasableConfiguration
PurchasableReceipt
GamebaseDataCallback

open fun requestItemListOfNotConsumed(@NonNull activity: Activity, @NonNull callback: GamebaseDataCallback<List<PurchasableReceipt>>)

### Deprecated

Request a Item List which is not consumed. You should deliver this itemReceipt info to your game-server to consume it or request consumeAPI to ToastCloud IAP Server.

#### Since

Added 1.4.0.

#### Deprecated

As of release 2.45.0, use requestItemListOfNotConsumed method instead.

#### Parameters

activity

current Activity.

callback

callback pass to API result.

#### See also

PurchasableReceipt
GamebaseDataCallback