Skip to main content

Payment Events

Payment events are triggered when a payment is created or its status is updated during the lifecycle. Each status indicates the current state of the payment.

Payment Status Overview

Payment statuses can be found in the webhook payload at resource.status. The following statuses indicate the current state of the payment:

StatusDescription
createdPayment was created
processingPayment is being processed
postedPayment was posted
paidPayment was successfully completed
failedPayment was declined

Event: Payment Status — Created

This event is triggered when a new payment is first created in the system.

{
"object": "event",
"id": "edezf1rd3qu0nqvqdn0fwvuz",
"resource": {
"object": "payment",
"id": "0c2h0zkajp8ipfipmzca0qt6",
"amount": "289.82",
"currency": "USD",
"settlementAmount": "289.82",
"settlementCurrency": "USD",
"sourceId": "r81a3m1u0753k713xx5zklnl",
"sourceType": "Card",
"status": "created",
"ownerId": "belg86nbs3ahqbq6a7sbn2ez",
"created": "2025-07-11T21:34:51.000Z",
"lastUpdated": "2025-07-11T21:34:56.000Z",
"payerId": "yl7d5pupdmqkhvbm337tzun1",
"payer": {
"object": "payer",
"id": "yl7d5pupdmqkhvbm337tzun1",
"name": "Mercury Rising Technologies",
"email": "uluna+psx@paystand.com",
"externalId": "CUST-42974F02",
"ownerId": "belg86nbs3ahqbq6a7sbn2ez",
"status": "active",
"created": "2025-05-15T21:42:58.000Z",
"lastUpdated": "2025-05-20T23:55:31.000Z"
},
"source": {
"object": "card",
"id": "r81a3m1u0753k713xx5zklnl",
"nameOnCard": "Juan",
"brand": "visa",
"last4": "4242",
"expirationMonth": "11",
"expirationYear": "2028",
"fingerprint": "lur9wjmv96twiyhux30yfx0i",
"payerId": "yl7d5pupdmqkhvbm337tzun1",
"status": "active",
"funding": "credit"
},
"fees": [],
"holds": [],
"refunds": [],
"disputes": [],
"customValues": [],
"accountKey": "default",
"accountId": "r5zz9p9xto0vokmyp543i7h9"
},
"diff": {
"previous": {},
"changes": {
// Full payment object as it was created
}
},
"sourceId": "0c2h0zkajp8ipfipmzca0qt6",
"sourceType": "Payment",
"status": "active",
"created": "2025-07-11T21:34:56.000Z",
"lastUpdated": "2025-07-11T21:34:57.000Z"
}

Event: Payment Status — Processing

This event is triggered when a payment moves to processing status.

{
"object": "event",
"id": "ueawhx6648o5oqysj3ft2ab7",
"resource": {
"object": "payment",
"id": "0c2h0zkajp8ipfipmzca0qt6",
"amount": "289.82",
"currency": "USD",
"settlementAmount": "289.82",
"settlementCurrency": "USD",
"sourceId": "r81a3m1u0753k713xx5zklnl",
"sourceType": "Card",
"status": "processing",
"ownerId": "belg86nbs3ahqbq6a7sbn2ez",
"created": "2025-07-11T21:34:51.000Z",
"lastUpdated": "2025-07-11T21:34:57.000Z",
"payerId": "yl7d5pupdmqkhvbm337tzun1"
},
"diff": {
"previous": {
"status": "created",
"lastUpdated": "2025-07-11T21:34:56.000Z"
},
"changes": {
"status": "processing",
"lastUpdated": "2025-07-11T21:34:57.000Z"
}
},
"sourceId": "0c2h0zkajp8ipfipmzca0qt6",
"sourceType": "Payment",
"status": "active",
"created": "2025-07-11T21:34:57.000Z",
"lastUpdated": "2025-07-11T21:34:57.000Z"
}

Event: Payment Status — Posted

This event is triggered when a payment is posted by the payment processor.

{
"object": "event",
"id": "p5qkm085kvdrq1m66pbupt9k",
"resource": {
"object": "payment",
"id": "0c2h0zkajp8ipfipmzca0qt6",
"amount": "289.82",
"currency": "USD",
"settlementAmount": "289.82",
"settlementCurrency": "USD",
"sourceId": "r81a3m1u0753k713xx5zklnl",
"sourceType": "Card",
"datePosted": "2025-07-11T21:34:59.000Z",
"status": "posted",
"ownerId": "belg86nbs3ahqbq6a7sbn2ez",
"created": "2025-07-11T21:34:51.000Z",
"lastUpdated": "2025-07-11T21:34:59.000Z",
"payerId": "yl7d5pupdmqkhvbm337tzun1"
},
"diff": {
"previous": {
"status": "processing",
"lastUpdated": "2025-07-11T21:34:57.000Z"
},
"changes": {
"datePosted": "2025-07-11T21:34:59.000Z",
"status": "posted",
"lastUpdated": "2025-07-11T21:34:59.000Z"
}
},
"sourceId": "0c2h0zkajp8ipfipmzca0qt6",
"sourceType": "Payment",
"status": "active",
"created": "2025-07-11T21:34:59.000Z",
"lastUpdated": "2025-07-11T21:34:59.000Z"
}

Event: Payment Status — Paid

This event is triggered when a payment is successfully completed.

{
"object": "event",
"id": "ld28tnfq32zvjn89myarv1bs",
"resource": {
"object": "payment",
"id": "0c2h0zkajp8ipfipmzca0qt6",
"amount": "289.82",
"currency": "USD",
"settlementAmount": "289.82",
"settlementCurrency": "USD",
"sourceId": "r81a3m1u0753k713xx5zklnl",
"sourceType": "Card",
"datePosted": "2025-07-11T21:34:59.000Z",
"datePaid": "2025-07-11T21:35:13.000Z",
"status": "paid",
"ownerId": "belg86nbs3ahqbq6a7sbn2ez",
"created": "2025-07-11T21:34:51.000Z",
"lastUpdated": "2025-07-11T21:35:13.000Z",
"payerId": "yl7d5pupdmqkhvbm337tzun1"
},
"diff": {
"previous": {
"datePosted": "2025-07-11T21:34:59.000Z",
"status": "posted",
"lastUpdated": "2025-07-11T21:34:59.000Z"
},
"changes": {
"datePaid": "2025-07-11T21:35:13.000Z",
"status": "paid",
"lastUpdated": "2025-07-11T21:35:13.000Z"
}
},
"sourceId": "0c2h0zkajp8ipfipmzca0qt6",
"sourceType": "Payment",
"status": "active",
"created": "2025-07-11T21:35:13.000Z",
"lastUpdated": "2025-07-11T21:35:13.000Z"
}

Key Payment Event Fields

FieldDescription
resource.idUnique payment identifier
resource.amountPayment amount in the specified currency
resource.currencyCurrency code (USD, EUR, etc.)
resource.statusCurrent payment status
resource.sourceTypePayment method type (Card, Bank, etc.)
resource.payerIdCustomer who made the payment
resource.ownerIdMerchant receiving the payment
resource.datePostedWhen payment was posted (if applicable)
resource.datePaidWhen payment was completed (if applicable)
diff.changesWhat changed in this event
sourceTypeAlways "Payment" for payment events

Handling Payment Events

Best Practices

  1. Use payment ID for idempotency: Track processed events using resource.id
  2. Check status progression: Validate status transitions make sense
  3. Handle all statuses: Some payments may skip certain statuses
  4. Store timestamps: Use datePosted and datePaid for reconciliation
  5. Monitor amounts: Verify amount matches expected values

Common Use Cases

  • Order fulfillment: Trigger when status becomes "paid"
  • Accounting sync: Update records when payment is posted
  • Customer notifications: Send confirmations on successful payments
  • Fraud monitoring: Track payments that remain in "processing"