# google::play::billing

## Summary

| ### Enumerations ||
|---|---|
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1a8d73b44849839656d98685fe872622bc{ https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bcae69fa9a656f76dd8a4d89f21992b2d3a = 0, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bca3f71ee241384e219f5d6ecd7d22f4a31 = 3, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bcacc19db85fe64edd78e9a6752a14b2b81 = 5, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bcae3587c730cc1aa530fa4ddc9c4204e97 = 6, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bcadcf3488194b55bc5aac6f9b0cbdfda47 = 7, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bca05cac49f0a59fe30e1916f9f35275858 = 8, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bca78c9356dcc284fa230877a98d9f333ca = 4, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bcab27d53d170bc6b3a21f586a562a99578 = 12, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bca2a396b1c1b8ab4c4a9c4215da11c8640 = -1, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bcaec683ccf52d97bad6d791b4aabcebfea = 2, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#dummy_1a8d73b44849839656d98685fe872622bca5607f793e71c9d05f652d6aad7f77804 = 1 }` | enumError codes returned by Google Play Billing. |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1aa636408e88bd16eb484e8881d93649a2{ https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1aa636408e88bd16eb484e8881d93649a2ac144a8f082bd43163366558811b04cc2 = 1, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1aa636408e88bd16eb484e8881d93649a2af0788ffc5b96faa3f771830b3bca6206 = 2 }` | enumThe type of billing program available for the product. |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1a3cad466837344007269a3f1dfa303600{ https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1a3cad466837344007269a3f1dfa303600a938dfe7097e2ccde8340724f256bbce1 = 1 }` | enumThe type of the product. |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1a82f4c6a3fb2062fab1c472cee768ddeb{ https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1a82f4c6a3fb2062fab1c472cee768ddeba2efe4f49476e3b51d5896506880d1b72 = 0, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1a82f4c6a3fb2062fab1c472cee768ddebad10291ae0f8270e86c95057c3094d474 = 1, https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2enums_8h_1a82f4c6a3fb2062fab1c472cee768ddeba83824e923cb73cf6e17dbff87055eb4a = 2 }` | enumThe purchase state of the order. |

| ### Typedefs ||
|---|---|
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a0c9f71b2b18849d39a889f37fbbe9097` | using `std::function< void(https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result)>` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a463e14560fde9820fcff0f9b1935e4c0` | using `https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result< BillingError, https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/acknowledge-purchase-result-value#structgoogle_1_1play_1_1billing_1_1_acknowledge_purchase_result_value >` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a9beab35e8d2cbed3d11fca6037670c61` | using `std::function< void(https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result)>` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1ab2cd2dea0cc1a2ba675dd1adbf6198d3` | using `https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result< BillingError, https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/consume-purchase-result-value#structgoogle_1_1play_1_1billing_1_1_consume_purchase_result_value >` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1ac185e2b2a35f16f66d2f53cc9887f737` | using `std::function< void(https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result)>` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1aeece08bcaff348933ba9fb41b43f4ce2` | using `https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result< BillingError, https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/create-billing-program-reporting-details-result-value#structgoogle_1_1play_1_1billing_1_1_create_billing_program_reporting_details_result_value >` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a4d4ccd9d5d4c4686411b242d3463143c` | using `std::function< void(https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result)>` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a63be3c360ac4655a62a4554dd13479f7` | using `https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result< BillingError, https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/is-billing-program-available-result-value#structgoogle_1_1play_1_1billing_1_1_is_billing_program_available_result_value >` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1adf2e5e1fab29536d9e7c77aa5ff0522d` | using `std::function< void(https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result)>` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a029c97be734c410384c60cd99481241f` | using `https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result< BillingError, https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/launch-purchase-flow-result-value#structgoogle_1_1play_1_1billing_1_1_launch_purchase_flow_result_value >` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1ab5ceb23d5307323d5c55c2d71361726d` | using `std::function< void(https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result)>` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a9947f498e864797c8e3fce0d85f72aab` | using `https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result< BillingError, https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/query-product-details-result-value#structgoogle_1_1play_1_1billing_1_1_query_product_details_result_value >` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a2dcf60b57434c587b4f24dde6cdbb4f2` | using `std::function< void(https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result)>` |
| `https://developer.android.com/games/playgames/native-pc/reference/namespace/google/play/billing#billing_2models_8h_1a6aba43525575042222caacb25dca98e4` | using `https://developer.android.com/games/playgames/native-pc/reference/class/google/play/result#classgoogle_1_1play_1_1_result< BillingError, https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/query-purchases-result-value#structgoogle_1_1play_1_1billing_1_1_query_purchases_result_value >` |

| ### Classes ||
|---|---|
| [google::play::billing::BillingClient](https://developer.android.com/games/playgames/native-pc/reference/class/google/play/billing/billing-client) | Entrypoint for the Google Play Billing API. |

| ### Structs ||
|---|---|
| [google::play::billing::AcknowledgePurchaseParams](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/acknowledge-purchase-params) | Params for acknowledging a purchase. |
| [google::play::billing::AcknowledgePurchaseResultValue](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/acknowledge-purchase-result-value) | Result value for acknowledging a purchase. |
| [google::play::billing::BillingClientParams](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/billing-client-params) | Params for constructing a [BillingClient](https://developer.android.com/games/playgames/native-pc/reference/class/google/play/billing/billing-client#classgoogle_1_1play_1_1billing_1_1_billing_client). |
| [google::play::billing::ConsumePurchaseParams](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/consume-purchase-params) | Params for consuming a purchase. |
| [google::play::billing::ConsumePurchaseResultValue](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/consume-purchase-result-value) | Result value for consuming a purchase. |
| [google::play::billing::CreateBillingProgramReportingDetailsParams](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/create-billing-program-reporting-details-params) | Params for creating billing program reporting details. |
| [google::play::billing::CreateBillingProgramReportingDetailsResultValue](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/create-billing-program-reporting-details-result-value) | Result value for creating billing program reporting details. |
| [google::play::billing::IsBillingProgramAvailableParams](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/is-billing-program-available-params) | Params for checking if a billing program is available. |
| [google::play::billing::IsBillingProgramAvailableResultValue](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/is-billing-program-available-result-value) | Result value that represents a billing program is available. |
| [google::play::billing::LaunchPurchaseFlowParams](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/launch-purchase-flow-params) | Params for launching the purchase flow. |
| [google::play::billing::LaunchPurchaseFlowResultValue](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/launch-purchase-flow-result-value) | Result value for launching the purchase flow. |
| [google::play::billing::ProductDetails](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/product-details) | Details for a product. |
| [google::play::billing::ProductId](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/product-id) | The Google Play Store product identifier. |
| [google::play::billing::ProductOffer](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/product-offer) | Offer details for a product. |
| [google::play::billing::ProductPurchaseDetails](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/product-purchase-details) | Details for a purchased product. |
| [google::play::billing::QueryProductDetailsParams](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/query-product-details-params) | Params for querying product details. |
| [google::play::billing::QueryProductDetailsResultValue](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/query-product-details-result-value) | Result value for querying product details. |
| [google::play::billing::QueryPurchasesResultValue](https://developer.android.com/games/playgames/native-pc/reference/struct/google/play/billing/query-purchases-result-value) | Result value for querying purchases. |

## Enumerations

### BillingError

```
 BillingError
```
Error codes returned by Google Play Billing.

| Properties ||
|---|---|
| `kBillingUnavailable` | A user billing error occurred during processing. |
| `kDeveloperError` | Error resulting from incorrect usage of the API. |
| `kError` | Fatal error during the API action. |
| `kItemAlreadyOwned` | The purchase failed because the item is already owned. |
| `kItemNotOwned` | Requested action on the item failed since it is not owned by the user. |
| `kItemUnavailable` | The requested product is not available for purchase. |
| `kNetworkError` | A network error occurred during the operation. |
| `kOk` | The operation completed successfully. |
| `kServiceDisconnected` | The app is not connected to the Google Play Billing Library. |
| `kServiceUnavailable` | The service is currently unavailable. |
| `kUserCanceled` | Transaction was canceled by the user. This may be the result of the user explicitly aborting the transaction or implicitly cancelling the transaction by timing out. |

### BillingProgram

```
 BillingProgram
```
The type of billing program available for the product.

| Properties ||
|---|---|
| `kBillingProgramAlternativeBillingOnly` | Alternative billing only (without user choice). |
| `kBillingProgramUserChoice` | Alternative billing with user choice. |

### ProductType

```
 ProductType
```
The type of the product.

| Properties ||
|---|---|
| `kTypeInApp` | The type of the product is an in-app item. |

### PurchaseState

```
 PurchaseState
```
The purchase state of the order.

| Properties ||
|---|---|
| `kPurchaseStatePending` | Purchase is pending and not yet completed to be processed by your app. |
| `kPurchaseStatePurchased` | Purchased is completed. |
| `kPurchaseStateUnspecified` | Purchase with unknown state. |

## Typedefs

### AcknowledgePurchaseContinuation

```
std::function< void(AcknowledgePurchaseResult)> AcknowledgePurchaseContinuation
```

### AcknowledgePurchaseResult

```
Result< BillingError, AcknowledgePurchaseResultValue > AcknowledgePurchaseResult
```

### ConsumePurchaseContinuation

```
std::function< void(ConsumePurchaseResult)> ConsumePurchaseContinuation
```

### ConsumePurchaseResult

```
Result< BillingError, ConsumePurchaseResultValue > ConsumePurchaseResult
```

### CreateBillingProgramReportingDetailsContinuation

```
std::function< void(CreateBillingProgramReportingDetailsResult)> CreateBillingProgramReportingDetailsContinuation
```

### CreateBillingProgramReportingDetailsResult

```
Result< BillingError, CreateBillingProgramReportingDetailsResultValue > CreateBillingProgramReportingDetailsResult
```

### IsBillingProgramAvailableContinuation

```
std::function< void(IsBillingProgramAvailableResult)> IsBillingProgramAvailableContinuation
```

### IsBillingProgramAvailableResult

```
Result< BillingError, IsBillingProgramAvailableResultValue > IsBillingProgramAvailableResult
```

### LaunchPurchaseFlowContinuation

```
std::function< void(LaunchPurchaseFlowResult)> LaunchPurchaseFlowContinuation
```

### LaunchPurchaseFlowResult

```
Result< BillingError, LaunchPurchaseFlowResultValue > LaunchPurchaseFlowResult
```

### QueryProductDetailsContinuation

```
std::function< void(QueryProductDetailsResult)> QueryProductDetailsContinuation
```

### QueryProductDetailsResult

```
Result< BillingError, QueryProductDetailsResultValue > QueryProductDetailsResult
```

### QueryPurchasesContinuation

```
std::function< void(QueryPurchasesResult)> QueryPurchasesContinuation
```

### QueryPurchasesResult

```
Result< BillingError, QueryPurchasesResultValue > QueryPurchasesResult
```