Get Payment


The following endpoint can be used to retrieve the details of a payment within the Hyfin application.


Point de terminaison

The following endpoint can be used to retrieve a payment. You must replace the {base_url} , {external_id} and {site_id} variables with the appropriate values.

GET
{base_url}/api/v3.1/site/{site_id}/payment/{external_id}
Demande
Aucun corps n'est requis pour cet appel API
Réponse
Champ
Type
Description
external_id
String
Le paiement unique id du système/source de données. Si nous détectons un enregistrement avec le même external_id, il sera mis à jour, sinon il sera ajouté.
_id
String
The id of the payment, assigned by the system.
display_name
String
Le nom convivial sécurisé de la méthode de paiement. Exemple : VISA **** 3421.
last_4
String
The last 4 digits of the payment method. Only returned for payments taken through a stored payment method; a payment recorded through this API has none, so it is omitted.
amount
Number
Le montant qui a été payé. Format = 0.00
paid_on
Date
La date et l'heure à laquelle le paiement a été effectué. Format = YYYY-MM-DDTHH:mm:ssZ
gateway_transaction_id
String
L'identifiant unique qui a été attribué à l'enregistrement de paiement par la passerelle lorsque le paiement a été traité.
tip
Number
Le montant du pourboire qui a été ajouté. Format = 0.00
tax
Number
Le montant de taxe qui a été ajouté. Format = 0.00
fee
Number
Le montant des frais qui a été ajouté. Format = 0.00
invoice
A reference to the Facture record. On a write this is how the payment is applied to an Facture; it is echoed back on a read, alongside the fuller allocations list.
payment_type
String
Le type de méthode de paiement utilisé pour effectuer le paiement.
One of payment_card, ach, cash, check
payment_sub_type
String
Le sous-type de la méthode de paiement utilisée pour effectuer le paiement.
One of checking, savings, visa, mastercard, discover, amex, cash, other
status
String
L'état actuel du paiement.
Default = captured | One of declined, authorized, captured, voided, settled, returned, refundFailed, refunded, refundSettled
created_at
Date
La date à laquelle le paiement a été créé.
updated_at
Date
La date à laquelle le paiement a été dernièrement mis à jour.
reference_number
String
The unique reference number assigned to the payment by the system, displayed to the merchant.
early_pay_discounts_and_late_fees
Number
The net of any early payment discount and late fee applied to the payment. Format = 0.00
is_refund
Boolean
Whether the payment is a refund of another payment.
custom_fields
Object
The custom fields recorded on the payment, as name/value pairs. {} when there are none.
allocations
How the payment was applied. A payment split across several Factures has one entry per Facture.
Sample Response
			
{
  "_id": "61f32dc2f62bdc6a48945067",
  "external_id": "65432325",
  "reference_number": "N7E6N7T75WM9-PGEM",
  "gateway_transaction_id": "53912387124235234",
  "payment_type": "payment_card",
  "payment_sub_type": "amex",
  "display_name": "AMEX ****** 3422",
  "amount": 30,
  "tip": 0,
  "tax": 0,
  "fee": 0,
  "early_pay_discounts_and_late_fees": 0,
  "paid_on": "2021-03-15T16:32:11Z",
  "status": "captured",
  "is_refund": false,
  "custom_fields": {},
  "allocations": [
    {
      "ref_type": "Invoice",
      "ref": {
        "_id": "61f32dc2f62bdc6a48951255",
        "external_id": "65432661",
        "reference_number": "N7E6NICAC2FE"
      },
      "amount": 30
    }
  ],
  "created_at": "2025-05-30T19:19:44.143Z",
  "updated_at": "2025-05-30T19:19:44.143Z"
}