Get Payment


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


Punto Final

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}
Solicitud
Ningún cuerpo es necesario para esta llamada de API
Respuesta
Campo
Tipo
Descripción
external_id
String
El identificador de pago único del sistema/base de datos fuente. Si detectamos un registro con el mismo external_id, se actualizará; de lo contrario, se agregará.
_id
String
The id of the payment, assigned by the system.
display_name
String
El nombre de visualización seguro y amigable del método de pago. Ejemplo: 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
El monto que se pagó. Format = 0.00
paid_on
Date
La fecha y hora en que se realizó el pago. Format = YYYY-MM-DDTHH:mm:ssZ
gateway_transaction_id
String
El identificador único que se asignó al registro de pago desde la pasarela cuando se procesó el pago.
tip
Number
La cantidad de propina que se agregó. Format = 0.00
tax
Number
El monto de impuestos que se agregó. Format = 0.00
fee
Number
La cantidad de la tarifa que se agregó. Format = 0.00
invoice
A reference to the orden de compra record. On a write this is how the payment is applied to an orden de compra; it is echoed back on a read, alongside the fuller allocations list.
payment_type
String
El tipo de método de pago utilizado para realizar el pago.
One of payment_card, ach, cash, check
payment_sub_type
String
El subtipo del método de pago utilizado para realizar el pago.
One of checking, savings, visa, mastercard, discover, amex, cash, other
status
String
El estado actual del pago.
Default = captured | One of declined, authorized, captured, voided, settled, returned, refundFailed, refunded, refundSettled
created_at
Date
La fecha en que se creó el pago.
updated_at
Date
La fecha en que se actualizó el pago por última vez.
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 orden de compras has one entry per orden de compra.
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"
}