> For the complete documentation index, see [llms.txt](https://docs.namiml.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.namiml.com/sdk-reference/namipaywallmanager/namipaywallaction.md).

# NamiPaywallAction

{% tabs %}
{% tab title="Swift" %}

```swift
@objc public enum NamiPaywallAction : Int {
    case close_paywall = 0
    case restore_purchases = 1
    case sign_in = 2
    case buy_sku = 3
    case select_sku = 4
    case purchase_selected_sku = 5
    case purchase_success = 6
    case purchase_deferred = 7
    case purchase_failed = 8
    case purchase_cancelled = 9
    case purchase_unknown = 10
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
enum class NamiPaywallAction {
    NAMI_CLOSE_PAYWALL,
    NAMI_RESTORE_PURCHASES,
    NAMI_SIGN_IN,
    NAMI_BUY_SKU,
    NAMI_SELECT_SKU,
    NAMI_PURCHASE_SELECTED_SKU,
    NAMI_PURCHASE_SUCCESS,
    NAMI_PURCHASE_CANCELLED,
    NAMI_PURCHASE_FAILED,
    NAMI_PURCHASE_PENDING,
    NAMI_PURCHASE_UNKNOWN
}
```

{% endtab %}

{% tab title="Flutter" %}

```c
// coming soon
```

{% endtab %}

{% tab title="React Native" %}

```javascript
export enum NamiPaywallAction {
  BUY_SKU = "BUY_SKU",
  SELECT_SKU = "SELECT_SKU",
  RESTORE_PURCHASES = "RESTORE_PURCHASES",
  SIGN_IN = "SIGN_IN",
  CLOSE_PAYWALL = "CLOSE_PAYWALL",
  SHOW_PAYWALL = "SHOW_PAYWALL",
  PURCHASE_SELECTED_SKU = "PURCHASE_SELECTED_SKU",
  PURCHASE_SUCCESS = "PURCHASE_SUCCESS",
  PURCHASE_FAILED = "PURCHASE_FAILED",
  PURCHASE_CANCELLED = "PURCHASE_CANCELLED",
  PURCHASE_PENDING = "PURCHASE_PENDING",
  PURCHASE_UNKNOWN = "PURCHASE_UNKNOWN",
  PURCHASE_DEFERRED = "PURCHASE_DEFERRED",
  SHOW_PAYWALL = "SHOW_PAYWALL",
}
```

{% endtab %}

{% tab title="Unity" %}

```c
public enum NamiPaywallAction
{
    ClosePaywall,
    RestorePurchases,
    SignIn,
    BuySku,
    SelectSku,
#if UNITY_IOS
    PurchaseSelectedSku,
    PurchaseSuccess,
    PurchaseDeferred,
    PurchaseFailed,
    PurchaseCancelled,
    PurchaseUnknown
#endif
}
```

{% endtab %}
{% endtabs %}

**Show Paywall** - the paywall is shown to the user

**Close Paywall**- the paywall is closed through the close control (if available), or by using the operating system to dismiss the view. For instance, through a hardware back button on Android or swiping the modal view away on iOS

**Restore Purchases** - the users invokes the paywall's restore purchases control

**Sign In** - the users invokes the paywall's sign in control for handling by the app developer

**Buy Sku** - the users starts the purchase flow by choosing a sku. For paywalls where product sku is a button that initiates the purchase flow.

**Select Sku** - the users selects a sku. For paywalls where the product skus are decoupled from the call to action button that initiates the purchase flow.

**Purchase Selected Sku** - the users starts the purchase flow from the selected sku. For paywalls where the product skus are decoupled from the call to action button that initiates the purchase flow.

**Purchase Success** - the purchase was successful. The paywall will be automatically closed. See `purchases` included on `paywallActionHandler` from `NamiCampaignManager.launch`

**Purchase Failed** - the purchase failed. See `purchaseError` included on `paywallActionHandler` from `NamiCampaignManager.launch`

**Purchase Cancelled** - the purchase flow was cancelled by the end user.

**Purchase Unknown** - an unknown purchase flow event was encountered

**Purchase Deferred** (Apple only) - the purchase was deferred.

**Purchase Pending** (Android only) - the purchase is pending.


---

# 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://docs.namiml.com/sdk-reference/namipaywallmanager/namipaywallaction.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.
