Webhooks > Payment

When a customer makes a payment using the Hyfin application, the webhook will be called and the following data format will be POSTED to the provided webhook URL.

Sample Webhook Payload - Successful Payment
			
{
  "action": "payment",
  "data": {
    "id": "6385807aa90735097a811cf6",
    "site": "6201825a0cf5e23261a08646",
    "customer": "649dc5bb468bd5b5d863c7d1",
    "type": "payment_card",
    "subType": "visa",
    "displayName": "VISA **** 5123",
    "amount": 4964,
    "totals": {
      "subtotal": 3000,
      "taxes": 300,
      "total": 3300,
      "extraFees": 1164,
      "tips": 500
    },
    "paidOn": "2026-05-13T19:29:28Z",
    "status": "captured",
    "allocations": [
      {
        "refType": "Invoice",
        "ref": "649dc5bb468bd5b5d863c7d2",
        "amount": 3300
      }
    ],
    "paymentTransactionEvents": [
      {
        "type": "sale",
        "amount": 4964,
        "successful": true,
        "createdAt": "2026-05-13T19:29:28Z",
        "transactionId": "32483237915423321"
      }
    ]
  }
}


		
Data Types
			
type PaymentType = "payment_card" | "ach" | "apple_pay" | "google_pay" | "cash" | "external"

type PaymentSubType = "checking" | "savings" | "visa" | "mastercard" | "discover" | "amex" | "cash" | "other" | "external"

type PaymentStatus = "failed" | "declined" | "created" | "expired" | "cancelled" | "authorized" | "captured" | "voided" | "settled" | "returned" | "refundFailed" | "refunded" | "refundSettled" | "chargebacked" | "refundRequested"