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.
{
"action": "payment",
"data": {
"id": "6385807aa90735097a811cf6",
"site": {
"external_id": "65523213",
"merchant_id": "123123123123"
},
"invoice": {
"external_id": "39772634"
},
"customer": {
"external_id": "42312312"
},
"gateway_transaction_id": "32483237915423321",
"payment_type": "payment_card",
"payment_sub_type": "visa",
"display_name": "VISA **** 5123",
"amount": 35.15,
"tax": 2.98,
"tip": 3.5,
"fee": "fee_value",
"paid_on": "2021-01-01T14:32:18Z",
"status": "paid",
"transaction_type": "capture"
}
}
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" | "paid" | "refunded" | "voided"
type TransactionType = "capture" | "void" | "refund"