Transaction Webhooks
Transaction webhooks tell you when a transaction is recorded and each time its status changes. Every transaction event has the same payload, so one handler can cover them all. For the envelope, signature, duplicates and retries, see the Webhooks Overview.
Transaction Lifecycle
A successful transaction moves along this path. You get transaction.entered when it’s recorded, then transaction.batched, transaction.captured and transaction.processed as its status changes. trans_status_id is where the transaction is now, which is why most settled transactions show 5.
Off this path, Declined (4) and Rejected (22) end the transaction, and you get transaction.decline or transaction.reject. A transaction can also be Voided (7), or later Refunded (6) or Partially Refunded (63).
Events
One transaction can send several events. A transaction declined when it’s entered sends transaction.entered and then transaction.decline. event_table_pk is the same on every event for the same transaction, so use it to match them up.
Sources
Every transaction payload carries the source the transaction came from, as source and transact_source_id. Each source also has its own event, transaction.entered.<source>, sent alongside transaction.entered. Subscribe to a per-source event if you only want transactions from one source.
Both fields are null when the source isn’t known. New sources may be added.
Examples
transaction.entered
This card was saved, so tokenized_card holds its stored-card token. In most transactions it is null.
transaction.decline
transaction.reject
transaction.refund
transaction.partialrefund
refunded_amount is the total refunded so far, not the amount of the latest refund.
Payload Fields
Status IDs
Act on event_type, not trans_status_id. The status ID is there for reference. There is no “approved” status: an approved payment is one that reaches Authorized and moves on. The transaction.decline and transaction.reject events tell you when it didn’t.
These are the statuses that send an event:
trans_status_id can hold a value not listed here, for example on transaction.entered. Don’t fail on one you don’t recognize.