Skip to main content
A paywall event tells Hyzl that a person saw your price and left without payment. A server is private software that handles app requests. You can follow this guide or use the AI code assistant setup.

1. Store the Ingest token

The Ingest token permits your server to send paywall events for one app. Create it on that app’s Install page. Copy the token, then pass the clipboard value directly to your server host’s secret command. Store it as HYZL_INGEST_TOKEN. Do not run a clipboard reader by itself if it prints the token. Put the reader inside your host’s secret command. Never put the Ingest token in these places:
  • A browser or mobile app.
  • An AI chat.
  • A code file or .env.example file.
  • A test, log, or screenshot.
Hyzl shows the token once and stores only a one-way copy. That copy cannot reveal the original token. If the token becomes visible, create a new token on the Install page. A new token replaces the old token at once. Update every server environment that sends events for this app. A server with the stale token gets 401 unauthorized and this message:

2. Send the event

Send the event after a signed-in person sees your paywall and leaves without payment. This moment starts recovery. If your app cannot detect the exit, send the event when the paywall appears. Do not send it at signup. Your first complete event needs these facts: A durable identity identifies the same person over time. Email and phone alone cannot prove whether that person paid. For RevenueCat, userId must equal the value passed to Purchases.logIn(). Any other value can make a paid person appear unpaid. For Stripe, send stripeCustomerId when you know it. It must start with cus_. Also set client_reference_id or metadata.userId on the Checkout Session or Payment Link. Use the same userId in the paywall event. Use E.164 format for phoneNumber, such as +13105551212. E.164 is the full number with its country code. Send the person’s real choice in consent.attested. Never set it to true for every person. The examples also use these optional fields:
  • firstName and email add known contact details.
  • consent.text records the words that the person saw.
  • consent.at records the consent time.
  • eventId makes a retry safe.
  • occurredAt records when the person left the paywall.
  • stage describes the point that the person reached.
  • recoveryUrl supplies a separate link for that person when your link mode needs one.
See the paywall event reference for every available field. Use only the identity fields that apply to your payment provider. Replace every sample value before you send a real event. Send a POST request to this address:
Do not make the person wait for Hyzl. Let the app continue while your server sends the event. Use a ten-second timeout. Treat 200 and 202 as success. A 5xx response means that Hyzl had a server error. Retry only after a network problem or a 5xx response. A 4xx response means that the request needs a correction. Read the linked error code and fix the request. If the phone number arrives later, send the facts in two steps. Use the same linked userId in both requests.
The second event starts the wait because it carries the phone number and consent.

3. Confirm that the event arrived

The Installation check proves that your server reached Hyzl with an event for this app. The Test text button alone does not count as a completed Installation check. It sends a text from Hyzl, so it tests your Hyzl number and Flow instead of your server code. A test text can arrive while your server integration still sends nothing. Send one normal event for your own test account:
  1. Use your test account’s durable identity and a phone number that you control.
  2. Send the real consent state for that account.
  3. Omit the linked test field or set it to false.
  4. Use a new linked eventId.
  5. Make sure that the response is 202 with a linked status value.
  6. Open the Install page for the same app.
  7. Select Check installation.
  8. Make sure that the Installation check says that Hyzl received the event.
A normal event does not send contact until the Flow wait ends and the app is Live. Do not use a real person’s account for this check.