Skip to main content

Receivable Transaction Events

Receivable transaction events are triggered when a Payment or Refund is created and linked to a Receivable (invoice). These events help you track when invoices are paid or refunded.

IMPORTANT: If a payer uses a multi-statement checkout link and selects more than one invoice, a separate event will be triggered for each receivable that receives a payment.

Resource Types

The resource.resourceType field indicates the type of transaction related to the receivable event.

ParameterDescription
PaymentA payment has been applied to a receivable
RefundA refund has been issued for a payment that was previously applied to a receivable

Key Parameters

ParameterDescriptionExample Value
resource.receivableIdPaystand internal ID of the receivablewbju4wb2hb36n3k2ehtxqev1
resource.paymentIdPaystand internal ID of the payment applied0c2h0zkajp8ipfipmzca0qt6
resource.amountAppliedAmount applied to the receivable289.82
resource.payment.currencyCurrency of the paymentUSD
resource.receivable.extIdExternal invoice ID from ERPREC-C4F6D4CE
resource.receivable.extCustomerIdExternal customer ID from ERPCUST-42974F02

Event: Receivable Transaction — Payment Applied

This event is triggered when a payment is applied to a receivable (invoice).

{
"object": "event",
"id": "efgyp64u33j9l4sjjhsk0epv",
"resource": {
"object": "receivableTransaction",
"id": "8ikxuvbnh0o5m92hyon8mimw",
"receivableId": "wbju4wb2hb36n3k2ehtxqev1",
"paymentId": "0c2h0zkajp8ipfipmzca0qt6",
"resourceId": "0c2h0zkajp8ipfipmzca0qt6",
"resourceType": "Payment",
"paymentOrigin": "reminder",
"amountApplied": "289.82",
"status": "active",
"created": "2025-07-11T21:35:00.000Z",
"lastUpdated": "2025-07-11T21:35:00.000Z",
"receivable": {
"object": "receivable",
"id": "wbju4wb2hb36n3k2ehtxqev1",
"amount": "289.82",
"currency": "USD",
"payerEmail": "uluna+psx@paystand.com",
"dateDue": "2025-05-13T00:00:00.000Z",
"datePaid": "2025-07-11T21:35:00.000Z",
"amountPaid": "289.82",
"ownerId": "belg86nbs3ahqbq6a7sbn2ez",
"status": "paid",
"created": "2025-05-15T23:01:31.000Z",
"lastUpdated": "2025-07-11T21:35:00.000Z",
"extId": "REC-C4F6D4CE",
"extCustomerId": "CUST-42974F02"
},
"payment": {
"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",
"accountKey": "default",
"accountId": "r5zz9p9xto0vokmyp543i7h9",
"balanceChangeId": "x908jv7p2pa5nmksww00owdl"
}
},
"diff": {
"previous": {},
"changes": {
"object": "receivableTransaction",
"id": "8ikxuvbnh0o5m92hyon8mimw",
"receivableId": "wbju4wb2hb36n3k2ehtxqev1",
"paymentId": "0c2h0zkajp8ipfipmzca0qt6",
"resourceId": "0c2h0zkajp8ipfipmzca0qt6",
"resourceType": "Payment",
"paymentOrigin": "reminder",
"amountApplied": "289.82",
"status": "active",
"created": "2025-07-11T21:35:00.000Z",
"lastUpdated": "2025-07-11T21:35:00.000Z"
}
},
"sourceId": "8ikxuvbnh0o5m92hyon8mimw",
"sourceType": "ReceivableTransactions",
"status": "active",
"created": "2025-07-11T21:35:00.000Z",
"lastUpdated": "2025-07-11T21:35:00.000Z"
}

Event: Receivable Transaction — Refund Applied

This event is triggered when a refund is applied to a receivable.

{
"object": "event",
"id": "menjvzo9c3i4ouy2007jll51",
"resource": {
"object": "receivableTransaction",
"id": "fzx5p6oknfn7iwdx749lsdxz",
"receivableId": "wbju4wb2hb36n3k2ehtxqev1",
"paymentId": "0c2h0zkajp8ipfipmzca0qt6",
"resourceId": "m4t1vcuytk1dibsr6ygu4dkn",
"resourceType": "Refund",
"amountApplied": "289.82",
"status": "active",
"created": "2025-07-14T22:42:10.000Z",
"lastUpdated": "2025-07-14T22:42:10.000Z",
"receivable": {
"object": "receivable",
"id": "wbju4wb2hb36n3k2ehtxqev1",
"amount": "289.82",
"currency": "USD",
"payerEmail": "uluna+psx@paystand.com",
"dateDue": "2025-05-13T00:00:00.000Z",
"datePaid": "2025-07-11T21:35:00.000Z",
"amountPaid": "289.82",
"ownerId": "belg86nbs3ahqbq6a7sbn2ez",
"status": "paid",
"created": "2025-05-15T23:01:31.000Z",
"lastUpdated": "2025-07-11T21:35:00.000Z",
"extId": "REC-C4F6D4CE",
"extCustomerId": "CUST-42974F02"
},
"payment": {
"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-14T22:42:08.000Z",
"payerId": "yl7d5pupdmqkhvbm337tzun1",
"refundedAmount": 289.82,
"accountKey": "default",
"accountId": "r5zz9p9xto0vokmyp543i7h9",
"balanceChangeId": "x908jv7p2pa5nmksww00owdl",
"feesRefunded": false
}
},
"diff": {
"previous": {},
"changes": {
"object": "receivableTransaction",
"id": "fzx5p6oknfn7iwdx749lsdxz",
"receivableId": "wbju4wb2hb36n3k2ehtxqev1",
"paymentId": "0c2h0zkajp8ipfipmzca0qt6",
"resourceId": "m4t1vcuytk1dibsr6ygu4dkn",
"resourceType": "Refund",
"amountApplied": "289.82",
"status": "active",
"created": "2025-07-14T22:42:10.000Z",
"lastUpdated": "2025-07-14T22:42:10.000Z"
}
},
"sourceId": "fzx5p6oknfn7iwdx749lsdxz",
"sourceType": "ReceivableTransactions",
"status": "active",
"created": "2025-07-14T22:42:10.000Z",
"lastUpdated": "2025-07-14T22:42:10.000Z"
}

Handling Receivable Transaction Events

Best Practices

  1. Use receivable transaction ID for idempotency: Track processed events using resource.id
  2. Cross-reference with ERP: Use resource.receivable.extId to match with your invoice system
  3. Handle partial payments: Check amountApplied vs receivable.amount for partial payments
  4. Monitor receivable status: Use receivable.status to determine if invoice is fully paid
  5. Track payment origin: Use paymentOrigin to understand how payment was made

Common Use Cases

  • ERP Synchronization: Update invoice status in your accounting system
  • Customer Notifications: Send payment confirmations for specific invoices
  • Reporting: Generate payment reports by invoice
  • Reconciliation: Match payments to specific invoices for accounting
  • Refund Processing: Handle refund applications to invoices

Multi-Invoice Payments

When a customer pays multiple invoices in a single transaction:

  • You'll receive separate events for each receivable
  • Each event will have the same paymentId but different receivableId
  • The amountApplied field shows how much was applied to each invoice
  • Sum all amountApplied amounts to get the total payment amount