Address
Protect the ingest token
The ingest token is the secret that permits your server to send paywall events. On the Install page, this appears as Server key.- Generate the ingest token on the Install page.
- Copy the key to your clipboard.
- Store it as
HYZL_INGEST_TOKENin your server environment. - Use your platform’s secret command to read the clipboard.
$(pbpaste). On Windows, use Get-Clipboard -Raw.
On Linux, use xclip -selection clipboard -o.
Do not put this key in a chat, code file, test, log, or screenshot.
Anyone with the key can send events for your app and use your Hyzl number.
If the key becomes visible, generate a new key on the Install page.
A new key replaces the old key at once.
Choose the right moment
Send the event after a signed-in person sees your price and leaves without payment. This moment starts recovery.
If you collect the phone number later, send another event with the same
userId.
The event with the phone number and consent starts the wait.
Fields
Hyzl ignores fields that do not appear in this table.
Match each person to a payment
For RevenueCat,userId must equal the value that your app gives to Purchases.logIn().
The wrong value can make a person appear unpaid after a purchase.
For Stripe, send stripeCustomerId when you know it.
Also set client_reference_id or metadata.userId on the Checkout Session or Payment Link.
Use the same userId in the paywall event.
Hyzl checks each available Stripe identifier before contact.
If a Stripe check fails, Hyzl waits instead of treating the person as unpaid.
Give Hazel a link for each offer
UseofferLinks if your checkout has a different secure link for each allowed discount.
Each key is a whole discount percent from 0 through 90.
The 0 key means the regular price.
recoveryUrl.
Consent
Consent is a person’s recorded permission for contact by text or call. Send the real state of your current consent choice. If you do not ask for consent, add an unchecked box beside your optional phone field. Edit this example for your business and legal requirements. Example wording:I agree that {Your company} and its service providers may contact me by phone call and text message at the number provided, including with automated or AI-assisted technology, about my account and related offers. An AI may answer calls, and calls may be recorded and transcribed. Consent is not a condition of purchase. Message frequency varies. Message and data rates may apply. Reply STOP to opt out. Reply HELP for help. {Terms link} · {Privacy link}Replace the placeholders with links to your Terms and Privacy Policy. Send the real consent state as
consent.attested, either true or false.
Never set it to true for every person.
Keep the box clear by default. Keep the phone field optional.
Hyzl stores a person without consent, but Hyzl does not contact that person.
Examples
curl
Node
Swift
Send in two steps
Responses
Treat 200 and 202 as success.
A 202 response also includes these fields:
person_id: the Hyzl record for the person.status: the person’s current recovery state.contactable: whether Hyzl has a phone number.consent_attested: the consent state that Hyzl stored.next_action_at: the next planned action time, ornull.
Send from your server
Do not send this event from a browser or mobile app. A public app can expose the ingest token to other people. The futuresdk-event endpoint returns 501 sdk_not_available and is not deployed.
Send all paywall events to paywall-event from your server.
What happens after the event
- Hyzl stores the event.
- Hyzl waits for the first step in your Flow.
- Hyzl checks the payment provider before each step.
- Hyzl stops recovery if the person paid or sent
STOP. - Hyzl sends the step if the person remains eligible.