An automated ticketing system should not assume that a completed checkout page means a ticket exists. In a venue application, the browser can finish its journey while the payment provider is still determining the outcome. A confirmation callback may reach the server seconds later, after the visitor has closed the tab, changed devices, or opened an order history screen.
The difficult part is not displaying a receipt. It is preserving a reliable path from an uncertain payment to a uniquely issued, accessible ticket without taking payment twice or creating duplicate entry rights. This guide concentrates on that asynchronous interval: payment confirmation, issuance, delivery, retries, reconciliation, and recovery. Event discovery, seat selection, and the mechanics of ordinary checkout are outside its scope.
Why checkout completion is not ticket completion
A checkout interface and a back-office workflow observe different clocks. The interface knows a visitor submitted payment details or returned from a provider. The server must establish whether the payment actually reached the status required for fulfillment. The ticketing service must then reserve a distinct entitlement, generate its artifact, and make that artifact available to the correct order owner.
Those milestones can occur in separate requests and separate processes. A delayed notification is not necessarily a failure. Conversely, a pleasant success screen is not evidence that an issuer finished its work. Treating either event as final creates a system that appears fast while hiding unresolved orders in support queues.
Build the handoff as a durable workflow rather than a continuation of the original browser request. Persist the order before sending the visitor away, reference it when a payment signal arrives, and process issuance independently. A status page can report what is known without holding a connection open or promising a ticket before the necessary conditions are met.
Define the boundary around issuance
The relevant product begins after the venue, performance, quantity, and price have been fixed for an order. It does not need to rediscover events or recalculate a browsing itinerary. Its responsibility is to translate approved payment evidence into ticket entitlements, recover when that translation is interrupted, and communicate the result accurately.
This boundary matters when teams allocate responsibility. A checkout service might own the purchase attempt; a payment adapter interprets provider information; a ticket issuer owns entitlements; and a delivery service owns messages or downloadable access. None should silently substitute its local success flag for the complete order outcome.
Model payment, issuance, and delivery separately
Use a payment state machine that represents financial knowledge rather than interface progress. Useful application-level states include pending, confirmed, failed, cancelled, and review_required. Refunds and disputes should be recorded as later financial facts, not silently rewritten as if confirmation never happened. Exact provider states may differ; an adapter must map them explicitly.
Ticket issuance has a different sequence: not_requested, queued, issuing, issued, and issuance_exception. A subsequent delivery field can distinguish not_ready, pending, available, notified, and delivery_exception. These labels are a proposed application model, not standardized provider statuses.
Separating them permits truthful combinations. Payment can be confirmed while issuance is queued. An issued ticket can be downloadable while an email notification has failed. A ticket may remain blocked when payment requires review. If entry rights must be revoked after a refund, record a deliberate revocation transition and its reason; do not pretend the earlier issue action never occurred.
Make the permitted transitions explicit
Define which actor can advance each field and what evidence is required. A verified payment outcome can authorize an issuance job; it must not directly mark a ticket delivered. A successful issuer response may establish an entitlement; it must not imply that a recipient opened an attachment. A delivery notification may be retried without authorizing an additional entitlement.
Guard these decisions with stored versions or transactional conditions. If two workers read queued simultaneously, only one should obtain the right to issue. The same principle applies to transition from confirmed to an issuance instruction: one financial confirmation should produce one intended fulfillment operation, even when multiple messages describe it.
| Payment state | Ticket state | Delivery state | Appropriate message or action |
|---|---|---|---|
| Pending | Not requested | Not ready | Payment is being verified; no ticket is promised. |
| Confirmed | Queued | Not ready | Payment confirmed; ticket preparation is underway. |
| Confirmed | Issued | Available | The authenticated owner can access the ticket. |
| Confirmed | Issued | Delivery exception | Retain access; retry notification rather than issuance. |
| Review required | Issuance exception | Not ready | Escalate with payment and issuer evidence before changing rights. |

Give every order one accountable owner
Ownership has two meanings that should not be confused. The customer-facing order owner is the account or verified guest identity entitled to retrieve tickets. The operational owner is the service accountable for bringing an order to resolution. Both must be explicit even when payment arrives after the browser session disappears.
Store an immutable internal order identifier, a tenant or venue boundary where relevant, and the authenticated customer or verified guest claim. Associate each payment attempt with that order, its expected amount and currency, and the provider's payment object identifier. Associate every ticket entitlement with the same order and a stable line-item or attendee key.
A callback should find the existing order through a trusted correlation established when the payment attempt was created. Do not choose an owner from a customer-entered email appearing in the callback, a mutable browser cookie, or whichever visitor last opened the checkout screen. A wrong association can expose entry credentials even if the charge itself is genuine.
Design identifiers for retries and audits
Use distinct identifiers for the order, payment attempt, provider event, issuance command, entitlement, and delivery attempt. They answer different questions: what was bought, how payment was attempted, which notification was observed, which operation was requested, what right exists, and which message was sent.
Keep the identifiers and state transitions in a durable database. A useful audit record includes source, timestamp, prior state, resulting state, correlation key, processing outcome, and an operator or service actor. Avoid storing unnecessary payment credentials or exposing raw identifiers in public URLs. Access to the order page should be authorized independently of possession of its reference number.
Operational ownership also needs an escalation rule. An order unresolved beyond its expected processing window should belong to a named support queue or service role, with a next action. Without that assignment, a technically recorded failure can still become an abandoned customer problem.
Recover when the callback arrives after checkout
Assume the browser's final page is temporary and optional. On return from payment, the application should query its own order record and show the latest supported status. If confirmation is still pending, say so and provide a stable link to order status. Do not require the visitor to keep the page open to complete issuance.
When a valid callback arrives later, the webhook receiver identifies the payment object, writes an inbox record, and schedules a state evaluation. The evaluator joins that object to the existing order, confirms that amount, currency, and purchase identity match, and decides whether issuance is allowed. If the order has already reached the desired state, the callback becomes an observed duplicate rather than a new purchase.
Make the callback handoff durable
Receiving a notification is not the same as completing the business action. A robust receiver verifies authenticity, records enough information to recover the event, commits that record, and hands work to a queue or database-backed job. If that durable commit fails, responding as though receipt succeeded risks losing the only prompt for fulfillment.
Use a transactional outbox or equivalent reliable scheduling pattern if the inbox and job queue are separate stores. This prevents the narrow failure in which a database reports an accepted event but the process crashes before enqueueing its work. A sweeper can find accepted inbox records without completed evaluations and safely reschedule them.
After processing, the order's status endpoint can reveal payment confirmation, issuance progress, ticket access, or a review state. Notification delivery is helpful, but it is not the only way to finish recovery. The account or verified guest retrieval flow should still work if email is delayed, filtered, or unavailable.
Process repeated and out-of-order notifications safely
Webhook deliveries are messages about changes, not an ordered script for the application to execute. Stripe's webhook documentation explicitly describes possible duplicate event deliveries and states that event delivery order is not guaranteed. It recommends tracking event IDs, accounting for some duplicates represented by distinct events for the same object and event type, and processing events asynchronously.
Keep an inbox uniqueness constraint for the provider event identifier so a repeated delivery does not create repeated work. Also enforce a business-level uniqueness rule for the intended entitlement, because event IDs alone cannot prevent distinct notifications from requesting the same ticket. These controls solve different problems and belong at different layers.
Evaluate current truth, not arrival order
Do not interpret the last callback received as the latest financial truth. One notification may describe an earlier moment but arrive after a later one. Under an appropriate provider API contract, retrieve the current payment object when the event lacks enough trustworthy information to decide. Reconcile it with locally recorded transitions before advancing a state.
Stripe also cautions against using its snapshot event created timestamp as an ordering or deduplication mechanism. Different events can share a timestamp, while delivery can be reordered. Treat event metadata as evidence about what was emitted, not a globally reliable sequence number for all business decisions.
If a repeated callback arrives after tickets are issued, acknowledge that the event is already accounted for and leave the entitlements intact. If a contradictory financial update appears, move the order into an explicit exception or later-state workflow. Do not erase ticket history, silently reverse a delivery marker, or let an old pending event downgrade a confirmed outcome.
Concurrency matters beyond provider retries. A status-page refresh, a reconciliation worker, and a webhook worker may notice the same confirmed payment at once. All of them should converge on a single issuance command through conditional updates and unique constraints. The queue can deliver jobs more than once; the fulfillment operation must remain safe when it does.
Keep retry records separate from retry decisions
A retry is an attempt to complete a known operation, not permission to repeat all earlier operations. For each issuance command, record an attempt number, start and completion times, worker identity, outcome, failure category, and next eligible time. Also record the external issuer request identifier when available, so an interrupted call can be investigated before another call is made.
Different failures call for different responses. Temporary network errors may justify bounded backoff. Invalid order data needs correction. A provider response that is ambiguous about ticket creation needs status verification, not an immediate blind repeat. A ticket created successfully with failed email delivery needs only a delivery retry.
Use backoff, limits, and operator review
A retry policy should specify maximum attempts, spacing, jitter where useful, and a deadline after which the order becomes visible for review. Do not promise automatic recovery forever. Record each failed step rather than overwriting an error string; the sequence tells support whether the same fault persisted or the system made progress.
Make issuer calls idempotent where the issuing interface supports stable operation keys. When it does not, prevent concurrent local calls and query issuer records before repeating an uncertain request. The application cannot guarantee external exactly-once behavior solely by marking a local job complete. It needs an evidence-backed strategy for the interval between a successful remote action and a lost local response.
Reconciliation complements retries. On a schedule, find orders with confirmed payments but no issued entitlements, issued entitlements with incomplete delivery, and old pending payments beyond their normal decision window. Compare the relevant provider records with internal states, then schedule only the missing action. Log what was compared and whether the mismatch was resolved automatically or handed to an operator.
Payment-provider redelivery and internal ticket retries are distinct mechanisms. Stripe documents automatic webhook redelivery attempts under certain failures, but those attempts do not guarantee that an application has issued a ticket. Its documentation also notes that a manual resend does not cancel automatic retries. Your own durable records must therefore remain the source of recovery progress.
A worked hypothetical: confirmation reaches an abandoned session
Consider a fictional venue application called HallPass Demo. Every name, identifier, time, and outcome in this scenario is illustrative, not a claim about a real venue or payment account. A guest named Morgan purchases two general-admission tickets for a performance. The application has already created order ORD-481, assigned the guest a verified retrieval method, and stored two intended entitlement keys.
At 14:00:00, the payment attempt is recorded as pending. The browser returns to the application's status page at 14:00:03, but no authoritative confirmation has yet been processed. Instead of showing two downloadable tickets, the page says payment is being verified and provides an order-status link. Morgan closes the tab at 14:00:08.
At 14:00:25, a signed payment-success event reaches the server. The receiver verifies it, stores the provider event ID against the existing payment attempt, and commits an evaluation task. The worker checks the financial details against the order, records payment as confirmed, and creates one issuance command covering the two entitlement keys. The status endpoint can now report payment confirmed and tickets being prepared.
At 14:00:29, the issuer creates both entitlements, but its response to the worker is interrupted. The worker records an uncertain outcome instead of generating two replacements. A recovery check at 14:01:10 queries the issuer using the original operation reference and finds both entitlements already present. The application records their identifiers and marks issuance complete without repeating the creation request.
At 14:01:14, the tickets become available to the authenticated guest retrieval flow. An attempted email notification fails transiently, leaving delivery marked as an exception while ticket availability remains true. A separate notification retry succeeds at 14:03:00. The system retains both delivery attempts and does not create new entry codes. Morgan can retrieve the original tickets when returning later.
Suppose the payment event is then delivered again at 14:04:00. The event inbox recognizes the previously processed ID, logs the additional delivery, and performs no new issuance. The order still has one successful payment attempt, two intended entitlements, and a recorded notification history. The example shows why browser completion, provider confirmation, ticket creation, and communication must be tracked independently.
Use HTTP responses to describe the actual stage
HTTP status codes describe a request's result at the interface receiving it; they do not establish the status of every downstream business operation. RFC 9110, HTTP Semantics, defines 202 Accepted for a request accepted for processing without that processing being complete. Its guidance also contemplates a response pointing to a status monitor. That makes 202 useful for an application request that has durably scheduled fulfillment.
A 200 OK response can describe the current order resource when a client reads status. A 201 Created response belongs where a resource really has been created. A 409 Conflict can indicate that an attempted customer or administrative action conflicts with the current resource state. These choices should reflect the actual API contract, not serve as decorative success signals.
Distinguish webhook acknowledgement from customer status
For a Stripe webhook endpoint, the documented integration guidance is to verify the signed payload and return a successful 2xx quickly, before complex processing. The signature verification uses the raw request body, Stripe-Signature header, and endpoint signing secret. The application should acknowledge successful durable receipt, not wait for ticket generation or email delivery inside the webhook request.
If the server cannot securely verify or durably accept an event, it must not claim that the event was safely handled. If it can accept the event but the ticket worker later fails, that is an internal recovery problem, not a reason to confuse an already acknowledged delivery with a completed ticket. HTTP does not automatically send a later status change to the former caller; a status resource or subsequent notification carries that information.
Do not treat redirect responses as a webhook delivery strategy. Stripe documents that redirects are considered failed deliveries. Expose the configured endpoint directly over HTTPS, verify requests, restrict processing to relevant event types, and keep the receiver's response path short. These are transport responsibilities; financial reconciliation and ticket issuance remain application responsibilities.
Require evidence before reissuing a ticket
Reissue is a controlled replacement of an entitlement, not a generic retry button. Before authorizing it, establish whether an original ticket exists, whether it remains valid, who controls it, and why replacement is justified. A missing email, for instance, does not show that the original entry right is missing. Resending access may be sufficient.
Preserve the chain of custody
An evidence record for reissue can include the order and entitlement IDs, original issuance reference, observed provider or issuer status, reason code, requester identity, approving actor, replacement reference, and the action taken against the original right. Keep timestamps and links to supporting system events. Restrict sensitive details to authorized staff and avoid unnecessary personal data in the audit trail.
If a ticket must be replaced, determine whether the original code can be revoked or otherwise made unusable. Record that result before treating the replacement as final. If the venue cannot invalidate the original, the workflow needs an explicit policy for potential overlapping entry rights rather than silently generating another credential.
Support screens should present evidence in chronological order while separating facts from assumptions. An issuer timeout means its outcome is unknown; it does not prove creation failed. A delivered notification means a delivery service accepted or completed its defined step; it does not prove the ticket was used. Clear labels make a human decision defensible and future audits intelligible.
Test the gaps before they reach customers
Test asynchronous boundaries deliberately. Interrupt a worker after remote issuance but before the local write. Deliver the same signed event twice. Deliver a later provider event before an earlier one. Close the browser before confirmation. Fail notification after successful ticket creation. Run reconciliation concurrently with webhook processing and ensure only one issuance command wins.
Acceptance criteria should focus on invariants: no ticket before approved payment evidence; one intended entitlement for each purchased ticket; no duplicated rights from repeated messages; owner-only access; recoverable pending orders; and auditable attempts for issuance, notification, and replacement. Verify that the customer-facing language matches the recorded state at every point.
Monitor unresolved confirmed payments, age of queued issuance, ambiguous issuer outcomes, delivery exceptions, reconciliation discrepancies, and manual reissues. Counts alone are insufficient; include time in state and the percentage of orders resolved within an explicitly chosen operating target. Track customer impact without turning uncertain cases into false successes.
The value of an automated ticketing system is not that it produces a ticket instantly in every circumstance. It is that a delayed payment callback cannot strand a valid order, and a retry cannot casually duplicate an entry right. Distinct states, accountable ownership, durable messages, disciplined reconciliation, and evidence-led reissue make the path from payment to access both recoverable and explainable.
