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 asHYZL_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.examplefile. - A test, log, or screenshot.
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:
userIdorstripeCustomerId. - The real consent choice in
consent.attested. - A phone number in
phoneNumberbefore Hyzl can contact the person.
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:
firstNameandemailadd known contact details.consent.textrecords the words that the person saw.consent.atrecords the consent time.eventIdmakes a retry safe.occurredAtrecords when the person left the paywall.stagedescribes the point that the person reached.recoveryUrlsupplies a separate link for that person when your link mode needs one.
POST request to this address:
- curl
- Node.js
- Swift server
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.
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:- Use your test account’s durable identity and a phone number that you control.
- Send the real consent state for that account.
- Omit the linked
testfield or set it tofalse. - Use a new linked
eventId. - Make sure that the response is
202with a linkedstatusvalue. - Open the Install page for the same app.
- Select Check installation.
- Make sure that the Installation check says that Hyzl received the event.