The following endpoint can be used to add or update a payment within the Hyfin application that were already processed.
The following endpoint can be used to add or update a payment. You must replace the {base_url} and {site_id} variable with the site id that was provided when the site was created.
{
"externalId": "65432325",
"gatewayTransactionId": "53912387124235234",
"type": "payment_card",
"subType": "visa",
"displayName": "VISA **** 5123",
"amount": 3515,
"paidOn": "2021-01-01T14:32:18Z",
"status": "captured",
"allocations": [
{
"refType": "Invoice",
"ref": "61f32dc2f62bdc6a48951255",
"amount": 3515
}
]
}
{
"success": true,
"action": "added",
"_id": "60f720d248f143332af022e0",
"updatedAt": "2025-05-30T19:19:44.143Z"
}
{
"success": false,
"errors": [
"invalid field2",
"missing field_name"
]
}