Cancel Flows

Pause Wall

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.

Currently available for Stripe and Chargebee

Pause wall

Quick start

To implement the Pause Wall:

  1. Ensure the Churnkey script is loaded
  2. Add the check function to your application initialization
  3. Configure the wall behavior
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

OptionTypeDefaultDescription
modestring'live''live' or 'test' environment
softWallbooleanfalseAllow customers to exit the wall
forceCheckbooleanfalseBypass subscription status cache
providerstringrequired'stripe' or 'chargebee'
subscriptionIdstringoptionalSpecific subscription to check

Custom actions

Override default billing actions with custom handlers:

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:

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

Event callbacks

Monitor Pause Wall activity:

EventDescription
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)