BillingFlowParams.Builder

com.appcoins.sdk.billing.BillingFlowParams.Builder

Builder class used to construct the BillingFlowParams.


Public Methods


build

BillingFlowParams build()

Creates the BillingFlowParams.

Returns

BillingFlowParams reference with the values injected in the Builder to initiate the Billing Flow.


setDeveloperPayload

BillingFlowParams.Builder setDeveloperPayload(String developerPayload)

Defines the developerPayload.

Parameters

NameTypeDescription
developerPayloadStringString based payload to be used by the Developer to save important values for Purchase identification. (max. 512 chars)

Returns

BillingFlowParams.Builder reference of the Builder.


setFreeTrial

BillingFlowParams.Builder setFreeTrial(Boolean freeTrial)

Defines the freeTrial. It should be used for the Subscription type products to launch a Free Trial type of Purchase.

Parameters

NameTypeDescription
freeTrialBooleanDetermines if the Billing Flow to launch is a Free Trial or not.

Returns

BillingFlowParams.Builder reference of the Builder.


setObfuscatedAccountId

BillingFlowParams.Builder setObfuscatedAccountId(String obfuscatedAccountId)

Defines the obfuscatedAccountId.

This value is used to identify potential irregular activity and prevent those users of committing fraud. Do not use this parameter to store any Personally Identifiable Information about the User.

This parameter will be used to verify if a User is capable or not of using Free Trials.

Parameters

NameTypeDescription
obfuscatedAccountIdStringValue to identify a User uniquely specific to the Developers Application (eg: via External Login)

Returns

BillingFlowParams.Builder reference of the Builder.


setProductDetailsParamsList

BillingFlowParams.Builder setProductDetailsParamsList(List<ProductDetailsParams> productDetailsParamsList)

Defines the productDetailsParamsList. A list of the ProductDetailsParams to be Purchased.

❗️

Important

This value is required to initiate a Billing Flow.

In the list only 1 single ProductDetailsParams must be provided.

Parameters

NameTypeDescription
productDetailsParamsListList<ProductDetailsParams>List containt the ProductDetailsParams of the Product to be Purchased.

Returns

BillingFlowParams.Builder reference of the Builder.