# IapResult

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

\
An object that includes the In-app Purchase API response code and message.

\
Summary <a href="#id-en-iapresult-summary" id="id-en-iapresult-summary"></a>
----------------------------------------------------------------------------

***

| **Nested classes** |                                                                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| class              | <p><a href="/pages/lpmRqknMZyEhaHpo8sYS">IapResult.Builder<br></a>A builder that helps create a lapResult's instance easily.</p> |

## Public methods <a href="#id-en-iapresult-publicmethods" id="id-en-iapresult-publicmethods"></a>

***

### getResponseCode <a href="#id-en-iapresult-getresponsecode" id="id-en-iapresult-getresponsecode"></a>

int getResponseCode()\
It restores the In-app Purchase API Response Code.

| **Returns:** |                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| int          | The result value that corresponds to [PurchaseClient.ResponseCode.](/dev/eng/tools/billing/v21/references/classes/purchaseclient.md) |

### getMessage <a href="#id-en-iapresult-getmessage" id="id-en-iapresult-getmessage"></a>

String getMessage()\
Restores the In-app Purchase API Response Message.

| **Returns:** |             |
| ------------ | ----------- |
| String       | <p><br></p> |

### isSuccess <a href="#id-en-iapresult-issuccess" id="id-en-iapresult-issuccess"></a>

boolean isSuccess()\
Indicates whether In-app Purchase API Response Code is successful (PurchaseClient.ResponseCode.RESULT\_OK).

| **Returns:** |             |
| ------------ | ----------- |
| boolean      | <p><br></p> |

### isFailure <a href="#id-en-iapresult-isfailure" id="id-en-iapresult-isfailure"></a>

boolean isFailure()\
Indicates whether In-app Purchase API ResponseCode has failed.

| **Returns:** |             |
| ------------ | ----------- |
| boolean      | <p><br></p> |

### newBuilder <a href="#id-en-iapresult-newbuilder" id="id-en-iapresult-newbuilder"></a>

IapResult.Builder newBuilder()\
Generates the builder to create a lapResult instance.

| **Returns:**                                                                            |             |
| --------------------------------------------------------------------------------------- | ----------- |
| [IapResult.Builder](/dev/eng/tools/billing/v21/references/classes/iapresult.builder.md) | <p><br></p> |


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
