> For the complete documentation index, see [llms.txt](https://onestore-dev.gitbook.io/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onestore-dev.gitbook.io/dev/eng/tools/billing/v21/references/classes/purchaseflowparams.builder.md).

# PurchaseFlowParams.Builder

public final class PurchaseFlowParams.Builder extends Object\
java.lang.Object    ↳ com.gaa.sdk.iap.PurchaseFlowParams.Builder

\
A builder that helps create a [PurchaseFlowParams](/dev/eng/tools/billing/v21/references/classes/purchaseflowparams.md) instance easily.

\
Public methods <a href="#id-en-purchaseflowparams.builder-publicmethods" id="id-en-purchaseflowparams.builder-publicmethods"></a>
---------------------------------------------------------------------------------------------------------------------------------

***

### setProductId <a href="#id-en-purchaseflowparams.builder-setproductid" id="id-en-purchaseflowparams.builder-setproductid"></a>

PurchaseFlowParams.Builder setProductId(String productId)

| **Parameters:**            |                       |
| -------------------------- | --------------------- |
| productId                  | ID of in-app products |
| **Returns:**               |                       |
| PurchaseFlowParams.Builder | <p><br></p>           |

### setProductType <a href="#id-en-purchaseflowparams.builder-setproducttype" id="id-en-purchaseflowparams.builder-setproducttype"></a>

PurchaseFlowParams.Builder setProductType(String productType)

| **Parameters:**            |                                                                                                                |
| -------------------------- | -------------------------------------------------------------------------------------------------------------- |
| productType                | <p><a href="/pages/GzTZSxN4YNICgDrEwrN2">PurchaseClient.ProductType<br></a>Product type of in-app products</p> |
| **Returns:**               |                                                                                                                |
| PurchaseFlowParams.Builder | <p><br></p>                                                                                                    |

### setProductName <a href="#id-en-purchaseflowparams.builder-setproductname" id="id-en-purchaseflowparams.builder-setproductname"></a>

PurchaseFlowParams.Builder setProductType(String productName)

| **Parameters:**            |                                                                                                          |
| -------------------------- | -------------------------------------------------------------------------------------------------------- |
| productName                | Name of products that will be exposed at the time of purchase (not the name of the registered products). |
| **Returns:**               |                                                                                                          |
| PurchaseFlowParams.Builder | <p><br></p>                                                                                              |

### setDeveloperPayload <a href="#id-en-purchaseflowparams.builder-setdeveloperpayload" id="id-en-purchaseflowparams.builder-setdeveloperpayload"></a>

PurchaseFlowParams.Builder setDeveloperPayload(String developerPayload)

| **Parameters:**            |                     |
| -------------------------- | ------------------- |
| developerPayload           | Developer's payload |
| **Returns:**               |                     |
| PurchaseFlowParams.Builder | <p><br></p>         |

### setGameUserId <a href="#id-en-purchaseflowparams.builder-setgameuserid" id="id-en-purchaseflowparams.builder-setgameuserid"></a>

PurchaseFlowParams.Builder setGameUserId(String gameUserId)

| **Parameters:**            |                                                        |
| -------------------------- | ------------------------------------------------------ |
| gameUserId                 | User's ID that is able to be verified by the developer |
| **Returns:**               |                                                        |
| PurchaseFlowParams.Builder | <p><br></p>                                            |

### setPromotionApplicable <a href="#id-en-purchaseflowparams.builder-setpromotionapplicable" id="id-en-purchaseflowparams.builder-setpromotionapplicable"></a>

PurchaseFlowParams.Builder setPromotionApplicable(boolean promotion)

| **Parameters:**            |                                            |
| -------------------------- | ------------------------------------------ |
| promotion                  | Whether the promotion is applicable or not |
| **Returns:**               |                                            |
| PurchaseFlowParams.Builder | <p><br></p>                                |

### setQuantity <a href="#id-en-purchaseflowparams.builder-setquantity" id="id-en-purchaseflowparams.builder-setquantity"></a>

PurchaseFlowParams.Builder setQuantity(int quantity)

| **Parameters:**            |                      |
| -------------------------- | -------------------- |
| quantity                   | Quantity of products |
| **Returns:**               |                      |
| PurchaseFlowParams.Builder | <p><br></p>          |

### setSubscriptionUpdateParams <a href="#id-en-purchaseflowparams.builder-setsubscriptionupdateparams" id="id-en-purchaseflowparams.builder-setsubscriptionupdateparams"></a>

PurchaseFlowParams.Builder setSubscriptionUpdateParams(SubscriptionUpdateParams params)

| **Parameters:**            |                                                                                                              |
| -------------------------- | ------------------------------------------------------------------------------------------------------------ |
| params                     | <p>Mode for upgrade or downgrade of subscription products<br>PurchaseFlowParams.SubscriptionUpdateParams</p> |
| **Returns:**               |                                                                                                              |
| PurchaseFlowParams.Builder | <p><br></p>                                                                                                  |

### build <a href="#id-en-purchaseflowparams.builder-build" id="id-en-purchaseflowparams.builder-build"></a>

PurchaseFlowParams build()\
Creates a PurchaseFlowParams instance.

| **Returns:**                                                                              |             |
| ----------------------------------------------------------------------------------------- | ----------- |
| [PurchaseFlowParams](/dev/eng/tools/billing/v21/references/classes/purchaseflowparams.md) | <p><br></p> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://onestore-dev.gitbook.io/dev/eng/tools/billing/v21/references/classes/purchaseflowparams.builder.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
