Contract 4d1e0ad · updated 2026-11-11
Lissen Ticketing
GuidesNotifications

Connecting Customer.io

Wiring your own sending workspace, the seven buyer messages and their variables, and what delivery guarantees you get

The engine sends nothing by default. It has no sending identity of its own — no from-address, no domain, no template library — and it will never mail one of your buyers on a whim. Every message that ever goes out comes from your Customer.io workspace, using your credentials, against a template you wrote.

An organizer with no provider connection is not "suppressed". It is never considered at all.

That has a consequence worth stating plainly before you build anything: if you connect nothing, buyers get nothing. Ticket delivery is your job until you wire it up here.

What works today. You can connect a provider, store credentials, wire all seven message types, and read it all back — that surface is shipped and stable. What fires. Messages are triggered by activities from orders, waitlists and refunds. A correct connection sends only when one of those activities is recorded; it never sends on a timer or from a configuration change.

In the dashboard, the Notifications page does the same: connect the workspace (the key is write-only, so replacing it means pasting a new one), then turn on and map the messages you want. It is optional. If you send your own email from the webhook feed, leave it empty.

The connection

One connection per organizer, at a singleton endpoint. PATCH creates it the first time and updates it thereafter.

PATCH/v1/notification_provider
curl -X PATCH https://tickets.lissen.com/api/v1/notification_provider \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Idempotency-Key: 9f3a1c07-2b64-4de1-8c05-7a1e4d9b0f21" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "customerio",
    "credentials": {
      "app_api_key": "…your Customer.io App API key…",
      "region": "eu"
    },
    "messages": {
      "order_confirmation": {
        "enabled": true,
        "provider_message_ref": "42"
      }
    }
  }'
{
  "id": "np_0199c4ea-6d22-7b18-8e05-3f9a4c2d1b70",
  "kind": "customerio",
  "credentials_configured": true,
  "messages": {
    "order_confirmation": {
      "enabled": true,
      "provider_message_ref": "42",
      "enabled_at": "2026-11-14T18:11:04Z"
    }
  },
  "metadata": {}
}
FieldNotes
kindcustomerio is the only value today. Optional on the first connect.
credentials.app_api_keyYour Customer.io App API key — the transactional-send credential, for your own workspace.
credentials.regioneu or us. Defaults to eu. Customer.io's two stacks have different hostnames, so this must match your workspace.
messagesThe wiring map. See below.
metadataYours. Stored and echoed back, never interpreted.

A 200 here validates nothing about your Customer.io setup. The engine never calls your workspace at write time: it does not check your API key, it does not check the region, and it does not check that any provider_message_ref names a real template. These checks happen when a message is sent. Send yourself a test transactional message from Customer.io's own tooling to prove the workspace side works.

Credentials are write-only

A credential you send here is never returned by any endpoint. It is encrypted at rest and the read image carries credentials_configured: true instead. There is no field on the response for it to appear in, and none on the activity snapshot either.

A lost key is replaced, not recovered: PATCH a new credentials object and the old one is overwritten. Sending credentials is required on the very first connect, and optional on every update after it.

Reading the connection back:

GET/v1/notification_provider
curl https://tickets.lissen.com/api/v1/notification_provider \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"

Before you have ever connected, this is a 404 not_found. That is the correct answer, not an error to work around.

The wiring map

messages maps each message type to a template in your workspace:

{
  "messages": {
    "order_confirmation": { "enabled": true, "provider_message_ref": "42" },
    "refund_confirmation": { "enabled": true, "provider_message_ref": "51" },
    "waitlist_joined": { "enabled": false, "provider_message_ref": "58" }
  }
}
  • provider_message_ref is your Customer.io transactional message id. It is opaque to the engine — we never validate it, at write time or ever. A typo is stored happily and surfaces only as a failed delivery. Check it yourself.
  • enabled is the switch. false and absent mean exactly the same thing: silent.

Suppression is omission

There is deliberately no suppression flag, no mute list, and no global "sending enabled" switch. A message type is eligible if and only if it is present, enabled, and carries a provider_message_ref. Anything else is silence.

A second mechanism would have to be kept in sync with the first one, and the day they disagreed you would not be able to tell whether a missing email was policy or a bug.

If you send your own order confirmations

If your product sends every order confirmation itself, say so on your organizer, and the engine will never map order_confirmation for it:

PATCH/v1/organizer
curl -X PATCH https://tickets.lissen.com/api/v1/organizer \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Content-Type: application/json" \
  -d '{ "own_order_confirmation": true }'

While own_order_confirmation is true, a wiring that enables order_confirmation is a 400 invalid_request with param messages.order_confirmation, so nobody can wire it by mistake and send your buyers a second email. Every other message type wires as before. It is not a second switch: the wiring map is still the only thing that decides what the engine sends, and the setting only keeps that one message out of it.

Setting it while order_confirmation is enabled in your wiring is a 400 invalid_request with param own_order_confirmation: unwire it first. Setting it back to false lets you map it again. It is false until you set it, and GET /v1/organizer reads it.

Sending messages replaces the whole map. It is not a per-key merge. If you PATCH messages containing only order_confirmation, every other message type is dropped and goes silent. Read the connection, change the key you mean, and send the whole map back. Omitting messages entirely leaves the existing wiring untouched.

Eligible is not the same as sent

Wiring is the first gate, not the only one. A message goes out only when all of these hold:

  1. The message type is present, enabled, and has a provider_message_ref.
  2. The triggering activity happened after that type's enabled_at, after the connection was created, and recently enough to be inside the retry horizon below.
  3. Any extra condition on the trigger passes — payment_failure_followup, for instance, only applies to a position revoked because a payment bounced.
  4. Every field the message cannot do its job without is present, and a recipient address can be resolved.
  5. The deployment is allowed to mail that address (see the environment rule).
  6. The engine wins the send claim, so duplicate workers cannot race the same attempt, and a sender of your own that claimed the message first keeps it (see sending a message yourself). An unacknowledged attempt is never re-sent; acknowledged 408, 429, and 5xx failures may be attempted again.

enabled_at, and why nothing is retro-sent

When you switch a message type on, the engine stamps enabled_at on it. Delivery is floored on that timestamp, so turning a message type on today never mails buyers from yesterday.

enabled_at is engine-computed and never accepted from a caller. If a partner could backdate it, they could mail buyers who were deliberately not being mailed.

Two behaviours follow:

  • Switching a type off and on again re-stamps enabled_at to now. The gap is never filled in afterwards.
  • Changing only the provider_message_ref on a type that is already on keeps the original enabled_at. Fixing a typo does not reset your history.

The seven message types

Each type is triggered by exactly one activity. This is the whole v1 catalog — transactional consequences of a buyer's own action, and nothing else. The engine will not send marketing on your behalf, ever.

Message typeFires onSent toTrigger ships with
order_confirmationAn order is issuedThe order's buyerorders & issuance
payment_failure_followupA position is revoked because a payment bouncedThe buyer on that orderorders & issuance
waitlist_invitationA waitlist entry is promotedThe entry's own addresswaitlist
refund_confirmationA refund completes, unless it refunds a membership paymentThe buyer on that orderrefunds & disputes
waitlist_joinedSomeone joins a waitlistThe entry's own addresswaitlist
waitlist_rejectedAn organizer rejects a waitlist requestThe entry's own addresswaitlist
event_cancelledA cancelled event's policy switched on Notify attendees: one request per order with ticketsThe buyer on that orderevent cancellation

Revocations caused by a refund or a dispute never produce a payment_failure_followup — those are the refund message's business, and the engine filters them out before anything is planned.

Writing the templates

Customer.io exposes the data of an API-triggered transactional message under the trigger namespace. Every variable is therefore {{trigger.order_id}} — a bare {{order_id}} renders blank, silently, which is the kind of failure nobody notices until a buyer receives an empty email.

The one exception is loop variables: inside {% for position in trigger.positions %} the item is plain {{position.description}}.

Two rules hold across all seven:

  • Required means the message is not sent without it. Its absence is a permanent failure, recorded and abandoned. That is deliberate: an order confirmation with no tickets on it, or a refund confirmation with no amount, is a wrong email rather than a degraded one, and you would rather send nothing.
  • Optional fields are omitted entirely when absent, not sent as null. So {% if trigger.buyer_name %} behaves the way you expect.

The event object, where present, is { id, name, starts_at, timezone, venue_name, venue_address }. Every member is an optional string, passed through as the engine holds it — starts_at is normally an RFC 3339 UTC timestamp and timezone an IANA name such as Europe/London, but neither is validated before the message is built, so guard both in the template.

order_confirmation

Fires on issuance, not settlement. A buyer paying by a slow method holds valid tickets before the money clears, and a zero-total order, including a comp, rides this same message — so the copy should say the tickets are issued, never that the payment succeeded.

VariableTypeRequired
trigger.order_idstring, ord_ + UUIDyes
trigger.currencythree-uppercase-letter currency stringyes
trigger.total_minorinteger, minor unitsyes
trigger.positionsnon-empty array of objectsyes
trigger.positions[].idstring, pos_ + UUIDyes
trigger.positions[].descriptionnon-empty stringyes
trigger.positions[].admission_codenon-empty stringyes
trigger.positions[].qr_image_urlURL of the code as a PNG (see positions)no
trigger.positions[].price_minorinteger, minor unitsno
trigger.buyer_namestringno
trigger.booking_fee_minorinteger, minor unitsno
trigger.eventevent objectno

admission_code is the door's credential and re-renders the same QR every time. This payload is secret-bearing: a rendered copy of this email should not be forwarded casually or logged.

payment_failure_followup

VariableTypeRequired
trigger.position_idstring, pos_ + UUIDyes
trigger.order_idstring, ord_ + UUIDyes
trigger.buyer_namestringno
trigger.descriptionstring — the item name as it was at issuanceno
trigger.item_idoptional stringno
trigger.revoked_atoptional stringno
trigger.eventevent objectno

There is no re-purchase variable: put your own purchase URL in the template.

waitlist_invitation

Capacity is being held for this person, and the hold expires. The deadline is the whole content of the message.

VariableTypeRequired
trigger.waitlist_entry_idstring, wl_ + UUIDyes
trigger.invitation_expires_atRFC 3339 string with offsetyes
trigger.checkout_urlabsolute URL stringyes
trigger.namestringno
trigger.item_idoptional stringno
trigger.eventevent objectno

refund_confirmation

Engine refunds and refunds you take from your own Stripe Dashboard ride the same message: the buyer does not care which console it was pressed in. The one exception is a refund of a membership payment (a refund with membership_charge_id set, from the engine or the Dashboard), which sends no message. A money_only refund does not change admission status, so branch your copy on trigger.revokes_admission rather than telling the buyer their ticket is cancelled. It describes only this refund: an earlier refund may already have revoked the tickets.

A free ticket cancellation sends this message too, with trigger.amount_minor equal to 0 and trigger.revokes_admission equal to true. For a zero-amount cancellation, confirm that the selected tickets are no longer valid without promising money or a bank settlement. Update any template you already have wired to handle this case.

VariableTypeRequired
trigger.refund_idstring, rfd_ + UUIDyes
trigger.order_idstring, ord_ + UUIDyes
trigger.currencythree-uppercase-letter currency stringyes
trigger.amount_minorinteger, minor unitsyes
trigger.buyer_namestringno
trigger.position_idsarray of stringsno
trigger.refund_typerefund_and_revoke or money_onlyyes
trigger.revokes_admissionboolean, false for money_onlyyes

Avoid promising a settlement date in the copy: when the money lands is the bank's business, not ours.

waitlist_joined

VariableTypeRequired
trigger.waitlist_entry_idstring, wl_ + UUIDyes
trigger.namestringno
trigger.item_idoptional stringno
trigger.eventevent objectno
trigger.requires_approvalbooleanno
trigger.quantityintegerno

There is deliberately no queue position: the engine does not publish one. trigger.requires_approval is true when the item is approval-gated: the buyer asked for a place and the organizer decides, so word it as a request sent rather than a place in a queue. waitlist_invitation carries the same two fields; on an approval-gated item it is the approval of a request with something to pay.

waitlist_rejected

VariableTypeRequired
trigger.waitlist_entry_idstring, wl_ + UUIDyes
trigger.namestringno
trigger.item_idoptional stringno
trigger.requires_approvalbooleanno
trigger.quantityintegerno
trigger.eventevent objectno

The engine records no reason for a rejection, so the message has none to give. Keep it short, and do not promise another chance.

event_cancelled

VariableTypeRequired
trigger.cancellation_idstring, ecn_ + UUIDyes
trigger.order_idstring, ord_ + UUIDyes
trigger.buyer_namestringno
trigger.eventevent object (name is required)yes
trigger.refunds_ticketsbooleanno (false when absent)
trigger.refund_amount_minorinteger, minor units refunded to this order so farno
trigger.currencyISO 4217 codeno
trigger.admission_disabledbooleanno (false when absent)
trigger.cancelled_atISO timestampno

The message says what the cancelled event's policy does and no more. When refunds_tickets is true the money is on its way back to the original payment (the amount appears once the refund exists); when admission_disabled is true the tickets will not be accepted at the door, and when it is false they still are. The organizer's cancellation reason is an internal note and is never in the payload.

A minimal template

Subject: Your tickets{% if trigger.event.name %} for {{trigger.event.name}}{% endif %}

Hi{% if trigger.buyer_name %} {{trigger.buyer_name}}{% endif %},

Your tickets are issued. Order reference: {{trigger.order_id}}

{% for position in trigger.positions %}
- {{position.description}}
  {% if position.qr_image_url %}<img src="{{position.qr_image_url}}" width="132" height="132" alt="Admission QR code">{% endif %}
  Admission code: {{position.admission_code}}
{% endfor %}

Order total: £{{trigger.total_minor | divided_by: 100.0}}

That divided_by: 100.0 is only correct for two-decimal currencies. It is written for a GBP-only workspace. Minor units do not always divide by 100 — JPY has no minor unit at all and KWD has three decimal places, so the same filter would show a ¥5,000 order as ¥50.00. If you sell in more than one currency, branch on {{trigger.currency}} or use your provider's own currency formatting rather than dividing inline.

Delivery semantics

What you are promised, and what you are not:

  • Retries run for about six hours, then stop. The horizon is measured from the activity, not from the first attempt, so a burst of fast failures cannot quietly redefine it. Past the deadline the message is abandoned. Human messages cannot arrive days late — a waitlist invitation that turns up after its window has closed is hostile, not helpful.
  • A failure your provider actually answered is retried when it is worth retrying. A 408 or 429 is retried, and so is any 5xx. Every other 4xx is a rejection we stop on. 425 Too Early counts as a rejection, because replaying a send your provider may already have processed is exactly the duplicate we refuse to risk.
  • A no-answer provider call is not sent again. Transport failures trigger worker backoff, but the send claim remains held. A retry within the claim window steps aside instead of calling the provider again. Once that window expires, the stale-claim pass records the outcome as ambiguous and stops. The engine cannot tell whether the first call delivered the message; the activity remains available for deliberate follow-up.
  • A message missing a required field is never half-sent. It is recorded as a permanent failure naming the field that was missing.
  • Delivery records are kept for about thirty days. They are operational records, not an audit trail; the activity is the durable one.

The outcomes, in one table:

What happenedWhat we do
Provider accepted itDone. One send, never repeated.
Provider answered 408, 429 or 5xxRetry, until the six-hour horizon.
Provider answered any other 4xx (including 425)Stop. Treated as a rejection.
No answer at all — connection failed mid-callWorker backoff retains the claim; no provider resend. Terminalized as ambiguous after the claim window.
A required field was missingStop, recorded as a permanent failure.
Six hours elapsed with no successStop, recorded as given up.
The deployment may not mail this addressStop, recorded as suppressed.

Non-production deployments cannot mail a real buyer

Outside production, the engine will only deliver to a small internal allowlist of Lissen staff addresses. Every other recipient is recorded as suppressed and stopped there — never retried, and never delivered.

This is a property of the deployment, not of your organizer. A test organizer in production mails normally; any organizer in a preview or local deployment does not. If you are wondering why a message did not arrive, the first question is which environment produced it.

Where an activity's messages stand

To see whether the engine sends the messages an activity triggers, and how far each send got, read the activity's notifications:

GET/v1/activities/{id}/notifications
curl https://tickets.lissen.com/api/v1/activities/act_0199c4f1-2a3b-7c4d-8e5f-6a7b8c9d0e1f/notifications \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"
{
  "data": [
    {
      "message_type": "refund_confirmation",
      "eligible": true,
      "state": "settled",
      "outcome": "sent",
      "sender": "engine"
    }
  ]
}

There is one entry per message type the activity's type triggers (see the seven message types); an activity that triggers none answers an empty list, and another organizer's activity is a 404 not_found.

FieldNotes
eligibleWhether the engine sends this message for this activity: the type is wired, and the activity was created at or after both the connection and the type's enabled_at. The retry horizon and the trigger's own condition are checked when the engine sends, not here. Once false for an activity it stays false, since switching the type on again stamps a later enabled_at.
statenone: not tried yet, or the provider refused the last try and it may be tried again. An eligible message reads none until the engine plans it, within about a minute. in_flight: a send holds its claim, from just before the provider call until its outcome is recorded. settled: finished, never tried again.
outcomeOnce settled: sent, permanent_failure, gave_up, ambiguous or suppressed_nonprod (the outcomes in the table above). Otherwise null. More values may be added.
senderWho holds the claim while in_flight, or recorded the outcome once settled: engine, or organizer for a sender of your own (below). null while none. More values may be added.

The answer never includes a recipient, a payload or the provider's error text. Send records are kept for about thirty days, so an older activity reads none. To see whether an email reached the inbox, use Customer.io's own delivery logs, and the activity stream for the fact that triggered it.

Sending a message yourself

A sender of your own can take a message over from the engine, or hand it back, without dropping or doubling one: it claims each send in the same attempt log the engine claims in, before it calls its provider. Whichever claims first sends; the engine steps aside for a message you have claimed, and you must not send one the engine holds or has settled.

First read the activity's notifications. The message is yours to send when eligible is false and state is none. While it is eligible, or in_flight with sender engine, look again later: the engine is sending it.

Then claim it, before you call your provider:

POST/v1/activities/{id}/notifications/claim
curl -X POST https://tickets.lissen.com/api/v1/activities/act_0199c4f1-2a3b-7c4d-8e5f-6a7b8c9d0e1f/notifications/claim \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Content-Type: application/json" \
  -d '{ "message_type": "refund_confirmation" }'
{
  "message_type": "refund_confirmation",
  "status": "claimed",
  "claim_id": "4182",
  "sender": "organizer",
  "outcome": null
}

Send it only when status is claimed. in_flight means a claim is held, by sender: the engine's (wait for it, as above) or your own from an earlier try (that try may have sent it: check your provider's delivery log). settled means it is finished with outcome. Claiming does not consult the wiring: the read decides whether the message should be yours.

Then call your provider, and settle the claim with what happened. The answer is the message's state afterwards, as in the read above.

POST/v1/activities/{id}/notifications/settle
curl -X POST https://tickets.lissen.com/api/v1/activities/act_0199c4f1-2a3b-7c4d-8e5f-6a7b8c9d0e1f/notifications/settle \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Content-Type: application/json" \
  -d '{ "message_type": "refund_confirmation", "claim_id": "4182", "result": "sent", "provider_message_id": "dlv_7Hq2" }'
resultWhenThen
sentYour provider accepted the message. Send its delivery id as provider_message_id.Settled sent. Nobody sends it again.
releasedIt definitely did not: your provider refused it, or the connection never opened.The claim is given back, so a later claim, yours or the engine's, may send it.
ambiguousYou cannot tell: a timeout, a 5xx, an answer without a delivery id.Settled ambiguous. Nobody sends it again; check your provider's delivery log.

A claim not settled within about ten minutes is recorded ambiguous, as the engine's own are, and never sent again. Settling a claim that is no longer yours (already settled or given back, recorded ambiguous, or the engine's) is a 409 notification_claim_not_held and changes nothing: read the message's state instead. If the answer to a claim is lost, retrying it reads your own claim in_flight; do not send then, since you cannot know whether the lost claim went on to call your provider.

Handing a message type over is then one PATCH of the wiring: unmap it, and every message the engine has not claimed by then is yours; map it again, and messages from that moment are the engine's, while older ones stay yours.

What emits on the activity stream

  • notification_provider.created — the first time you connect.
  • notification_provider.updated — every successful PATCH after that, whether or not the values actually changed.

The snapshot on both carries the connection's kind, credentials_configured, the wiring map and your metadata. It has no field for credentials at all, so there is nothing to redact and nothing that can be forgotten.

Individual sends do not emit activities. The activity that triggered the message is the record of what happened.

Stable error codes

CodeStatusTypeWhat it meansWhat to do
invalid_request400invalid_request_errorThe request body or query failed validation. `param` names the field.Fix the named field and send the request again.
not_found404invalid_request_errorNo such object under this organizer. An object belonging to another tenant reads as absent, never as forbidden.Check the id and the organizer header.
notification_claim_not_held409invalid_request_errorThe `claim_id` you settled is not a claim your own sender holds on that activity's message: it was already settled or given back, it was recorded `ambiguous` after the claim window, or it is the engine's. Nothing changed.Read `GET /v1/activities/{id}/notifications` for where the message stands, and never send it again on that claim. A retried settlement whose first answer was lost lands here too: the state shows what it recorded.
idempotency_key_reused409idempotency_errorThis key was already used with a different request body. Fingerprints cover method, path, sorted query pairs and the exact request bytes.Use a fresh key for a genuinely different request, or resend the original bytes to replay the original response.
idempotency_key_in_flight409idempotency_errorAn identical request under the same key is still executing. This is the only concurrency case that 409s.Wait and retry; the first attempt will finish or release the key.
internal_error500api_errorSomething failed on our side.Retry. If it persists, send us the `request_id` from the response — it identifies the exact request in our logs.

You will meet invalid_request for: connecting with no credentials; changing kind without supplying new credentials; a credential bundle that does not match the declared kind; a messages key that is not one of the seven message types; enabling order_confirmation on an organizer that sends its own; claiming a message the activity's type does not trigger; and a provider_message_id settled with a result other than sent. param names the offender.

A mistyped message type is a 400 rather than being quietly stripped: silently dropping it would be indistinguishable from the silence you actually asked for. Reads are more forgiving in the other direction — a wiring key written by a newer version of the engine is dropped from the response rather than turning your GET into a 500.

internal_error here includes the deliberate refusal to store a credential when it cannot be stored securely. We fail closed rather than keep your secret in the clear.

Gotchas

  • PATCH messages replaces the map. The single most common way to accidentally turn off four message types is to send one.
  • Send an Idempotency-Key. It is optional on this endpoint, but without one a retried PATCH runs again and emits a second notification_provider.updated — noise on your feed for a call you only meant to make once.
  • Nothing about your Customer.io workspace is checked at write time. A wrong key, a wrong region or a wrong message ref all store cleanly.
  • region must match your workspace. An eu key against the us stack authenticates against nothing.
  • Enabling a type does not backfill. If you connect a week after going live, the first week's buyers are not mailed.
  • Wiring all seven does not backfill old activities. A message is sent only for an eligible activity recorded after that message type was enabled. Check the provider delivery logs when a current trigger does not arrive.

On this page