---
title: Pause Wall
description: Block access to your application during subscription pauses
---

The Pause Wall helps you manage access to your application by automatically blocking access when a customer's subscription is paused. It displays a streamlined UI that allows customers to resume or cancel their subscription immediately.

::alert{type="warning"}
Currently available for Stripe and Chargebee
::

![Pause Wall](/img/pausewall.png)

## Quick start

To implement the Pause Wall:

1. Ensure the [Churnkey script is loaded](/cancel-flows/quick-start-guide#step-1-add-the-script)
2. Add the check function to your application initialization
3. Configure the wall behavior

```javascript
window.churnkey.check('pause', {
  // Required - Authentication & identification
  customerId: 'CUSTOMER_ID',
  authHash: 'HMAC_HASH',
  appId: 'YOUR_APP_ID',
  provider: 'stripe',        // or 'chargebee'
  
  // Optional - Wall behavior
  mode: 'live',             // Use 'test' for development
  softWall: false,          // Allow users to exit the wall
  forceCheck: false         // Skip caching (not recommended)
})
```

## How it works

The Pause Wall activates automatically when:
- A customer's subscription status is `paused`
- The subscription is in its paused period

When activated, it:
1. Blocks access to your application
2. Displays options to:
   - Resume the subscription immediately
   - Cancel the subscription at term end
   - Exit the wall (if softWall is enabled)
3. Processes the customer's choice
4. Restores access when appropriate

## Configuration

### Core options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `mode` | string | `'live'` | `'live'`, `'test'`, or `'sandbox'` (Stripe only) |
| `softWall` | boolean | `false` | Allow customers to exit the wall |
| `forceCheck` | boolean | `false` | Bypass subscription status cache |
| `provider` | string | required | `'stripe'` or `'chargebee'` |
| `subscriptionId` | string | optional | Specific subscription to check |

### Custom actions

Override default billing actions with custom handlers:

```javascript
window.churnkey.check('pause', {
  // ... other options
  handleResume(customer) {
    // Custom resume logic
    return Promise.resolve()
  },
  handleCancel(customer) {
    // Custom cancellation logic
    return Promise.resolve()
  }
})
```

### Optional UI elements

Add extra buttons to the wall:

```javascript
window.churnkey.check('pause', {
  // ... other options
  handleLogout() { }  // Add logout button
})
```

### Event callbacks

Monitor Pause Wall activity:

| Event | Description |
|-------|-------------|
| `onPauseWallActivated()` | Wall is displayed |
| `onResume(customer)` | Subscription resumed successfully |
| `onCancel(customer)` | Subscription cancelled |
| `onPauseWallClose()` | Wall is dismissed (soft wall only) |
| `onError(error, type)` | Error occurred |

Error types:
- `PAUSE_WALL_INITIALIZATION_ERROR`
- `PAUSE_WALL_CANCEL_ERROR`
- `PAUSE_WALL_RESUME_ERROR`

## Testing

If you would like to test the implementation in your test environment:

1. Create a test customer
2. Create a subscription for the customer
3. Pause the subscription through your billing provider
4. Verify the Pause Wall appears
5. Test each action:
   - Resume subscription
   - Cancel subscription
   - Exit wall (if `softWall` is enabled)
