Discussions

Ask a Question
Back to All

Android SDK 2.9.1 > Error : 400 Bad Request > setVariationId()

Hi, Team

We are facing the below issues when trying to set up an event after purchase.

Ref Doc: https://docs.adapty.io/docs/android-observer-mode#ab-tests-analytics

Request is unsuccessful. https://api.adapty.io/api/v1/sdk/in-apps/transaction-variation-id/ Code: 400, Response: {"errors":[{"detail":"Transaction with this id does not exist","status":"400","source":{"pointer":"/data"},"code":"TRANSACTION_NOT_FOUND"}]}

Adapty.setVariationId(purchase.getOrderId(), paywall.getVariationId(), new ErrorCallback() {
            @Override
            public void onResult(@Nullable AdaptyError error) {
                if (error == null) {
                    ObLogger.i(TAG, "setVariationId onResult: EventSent --> ");
                } else {
                   ObLogger.i(TAG, "setVariationId onResult: error --> " + error.toString());
                }
            }
        });

Note:

  1. Paywall: Comes from "Adapty.getPaywall()" function
  2. Purchase: Comes from GooglePlayBilling "onPurchasesUpdated()" method.

SDK : implementation 'io.adapty:android-sdk:2.9.1'