Siren

TransactionCreated

Fires after a transaction has been successfully persisted to the database. A read-only notification event.

WordPress plugin

Last updated: April 8, 2026

Once a transaction and its details have been written to the database, Siren fires TransactionCreated to notify the rest of the system. This is a read-only event. By the time it fires, the transaction record is committed and its details are final.

The event is identified as transaction_created and lives in Siren\Transactions\Core\Events\TransactionCreated.

What does this event carry?

The event carries the created Transaction model, accessible through getTransaction(). The model contains the transaction’s ID, status, and all associated details as they were persisted.

use Siren\Transactions\Core\Events\TransactionCreated;

public function handle(Event $event): void
{
    $transaction = $event->getTransaction();
    $id = $transaction->getId();
    $status = $transaction->getStatus();
}

When would you use it?

Listeners subscribe to this event for side effects that depend on a committed transaction. Logging, syncing to external systems, and triggering analytics updates are common use cases. Because the transaction is already persisted, there is no risk of acting on data that might still change.

If you need to modify the transaction before it is saved, subscribe to TransactionCreateRequested instead.

See the Payment Events overview for how this event fits into the full payment pipeline.

Your privacy choices

Account, checkout and chat you request work without optional tracking. Choose whether to allow these other uses on this website.

You can change or withdraw your choices at any time using “Privacy choices.” We remember your choice for 180 days. Read our privacy policy.