Overview
Every payment in tikento goes through a specific sequence of statuses. Transitions between statuses happen automatically based on webhook notifications from the payment gateway. The organizer can see the current status in the Attendees section and in the registration details.
Payment Statuses
| Status | Description |
|---|---|
pending | Payment created, attendee redirected to the gateway payment page |
paid | Money received, gateway confirmed payment via webhook |
failed | Payment did not go through (insufficient funds, blocked card, 3D Secure error) |
expired | Attendee did not complete the payment within the allotted time (30 minutes) |
refunded | Full refund completed |
partially_refunded | Partial refund completed |
Transition Diagram
payment creation
|
v
+--------+
|pending |
+---+----+
|
+-------+-------+
v v v
+------+ +----+ +-------+
|failed| |paid| |expired|
+------+ +-+--+ +-------+
|
+------+------+
v v
+----------+ +------------------+
|refunded | |partially_refunded|
+----------+ +------------------+
Transitions are irreversible: paid cannot return to pending, and refunded cannot return to paid.
Reservation
Before creating a payment, tikento creates a reservation — a temporary hold on a ticket to prevent it from being taken by another attendee while the first one is paying.
How Reservation Works
- The attendee clicks "Pay" — tikento creates a reservation with a
TTL of 15 minutes. - The reserved spot is subtracted from the available ticket quantity.
- The attendee is redirected to the gateway payment page.
- If payment succeeds — the reservation becomes a confirmed registration.
- If the TTL expires — the reservation is automatically released, and the ticket becomes available again.
Reservation prevents the situation where two attendees pay for the last ticket simultaneously.
Webhook Processing
tikento learns about payment results through webhooks — HTTP requests from the payment gateway to tikento's servers.
Sequence
- The gateway (YooKassa, Tochka, Telegram) sends a POST request to tikento's webhook URL.
- tikento verifies the request signature (each gateway uses its own signing mechanism).
- The payment status is updated in the database.
- If the status is
paid— the attendee's registration is confirmed, and an email with the ticket is sent. - If the status is
failedorexpired— the reservation is released.
Retry Deliveries
If tikento could not process the webhook (e.g., returned a 5xx), the gateway retries the request:
- YooKassa: up to 10 attempts with exponential backoff
- Tochka: up to 5 attempts at 5-minute intervals
Thanks to idempotency keys, reprocessing the same webhook is safe and does not create duplicates.
Idempotency Protection
Every payment operation in tikento is protected by an idempotency key — a unique identifier that guarantees the operation is executed exactly once.
Why This Is Needed
- The attendee accidentally clicked "Pay" twice — only one payment is created
- A webhook arrived again due to a timeout — the status is updated only once
- A network failure interrupted the request, the client sent a retry — money is not charged twice
How It Works
- When creating a payment, tikento generates an
Idempotency-Key(UUIDv7). - The key is sent in the request header to the gateway.
- If the gateway receives a repeated request with the same key, it returns the result of the first operation.
- tikento caches the key in Redis with a TTL of 24 hours.
Relationship Between Payment and Registration Statuses
The payment status directly affects the attendee's registration status:
| Payment Status | Registration Status | What the Attendee Sees |
|---|---|---|
pending | payment_pending | "Awaiting payment" |
paid | registered | "Registered", receives ticket via email |
failed | payment_failed | "Payment failed", offered to retry |
expired | expired | "Payment time expired", offered to start over |
refunded | refunded | "Refund processed" |
When moderation is enabled, there may be an intermediate review step by the organizer between payment and the final registered status.
Viewing Payment History
All payments and their statuses are available in the Attendees section of your event. For each record, the following is displayed:
- Current payment status
- Payment method (card, SBP, Stars)
- Amount and currency
- Creation / payment / refund date and time
- Idempotency key (for diagnostics)
- Status transition history
For exporting payment data — Payment Export and Reports.