GUIDES

In-app banner and wall

What your app shows a customer after a failed payment or during a pause, with GET /v1/inapp/state, and how to resume a paused plan.

After a failed payment, NoChurn can tell the customer inside your app, not only by email: first a banner with a link to pay, then, once the grace period is over, a wall that blocks the app until the invoice is paid. A paused plan can show a banner or a wall too, with a Resume now button.

The wall is a convenience, not a lock: a script blocker gets around it. If access must stop, also check it on your server with GET /v1/customers/{id}/access.

Settings

  • Failed payment: Recovery flow › In-app in the dashboard (inapp in the recovery flow’s draft). wall.enabled, wall.after_days (0 to 60, 0 = as soon as the payment fails), annual_grace_days (0 to 90, for annual plans), banner.dismiss_hours (1 to 168), and the texts per language.
  • Pause: Cancel flow › Offers › Pause: pause.inapp is none (default), banner or wall. A customer counts as paused when all their live subscriptions are paused.

The banner and the wall use the design of the published cancel flow, and texts in English, French, German, Italian and Portuguese that you can override.

Read the state: GET /v1/inapp/state

From the browser: the publishable key (pk_test_…), the signed customer token in X-NoChurn-Customer-Token (same token as the cancel flow) and an allowed origin. From a server: a secret key and ?customer=. Optional ?locale=.

The answer says what to show, and nothing is cached: call it again after a payment and it answers access: "full".

Field
access, access_reason full or restricted; payment_failed or paused
banner Whether to show it, its kind, its texts, restricts_at and days_left before the wall (when the wall is on), details
wall Whether to show it, its kind, its texts and link, details
texts, theme, locale The texts in the customer’s language and the cancel flow’s design; null when nothing is shown

details for a failed payment: the amount due, its currency, the invoice due date, the brand, last 4 digits and expiry of the card, and a simple decline category (expired, insufficient_funds, authentication_required or declined), never the processor’s message. For a pause: paused_at, resumes_at, the regular amount and resume_allowed.

The wall always carries a way to cancel (cancel, with a fallback link): cancelling is never blocked.

Actions from the customer

  • POST /v1/inapp/dismiss hides the banner for dismiss_hours. The wall cannot be dismissed.
  • POST /v1/inapp/resume resumes the paused subscription at the billing provider and returns the new state (access full at once). The token’s subscription claim names the subscription when there are several; without it and with several paused, the answer is 422 subscription_required. Nothing paused (a second click included) answers 409 nothing_to_resume. With billing by API, resuming is up to your app (capability_missing).

Both are rate limited per key and customer, and per IP (rate_limited).

Rendering it

NoChurn’s browser script (js.nochurn.sh/v1) shows the banner and the wall from this state. You can also draw them yourself, on the web or in a native app, from the same fields.