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
Requis
Description
external_id
String
The unique payment id from the source system/database. If we detect a record with the same `external_id`, it will be updated, otherwise it will be added.
gateway_transaction_id
String
L'identifiant unique qui a été attribué à l'enregistrement de paiement par la passerelle lorsque le paiement a été traité.
display_name
String
The secure friendly display name of the payment method. Example: `VISA **** 3421`.
last_4
String
--
Les 4 derniers chiffres de la méthode de paiement.
total
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
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
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`
transaction_type
String
--
Le type de transaction.
active
Boolean
--
Ce drapeau représente si l'enregistrement de paiement est actif.
Default = `true`
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.
Sample Response
			
				{
  "_id": "61f32dc2f62bdc6a48945067",
  "external_id": "65432325",
  "payment_type": "payment_card",
  "payment_sub_type": "amex",
  "display_name": "AMEX ****** 3422",
  "last_4": "3422",
  "total": 30,
  "paid_on": "2021-03-15T16:32:11Z",
  "status": "captured",
  "transaction_type": "capture",
  "active": true,
  "created_at": "2025-05-30T19:19:44.143Z",
  "updated_at": "2025-05-30T19:19:44.143Z"
}