Skip to main content

Payment History

Retrieve the payment transaction history for the organization, including successful payments, failed payments, and pending charges.

Request​

GET /billing/payments

Authentication​

Requires an Admin Bearer JWT token.

Authorization: Bearer <access_token>

Query Parameters​

None.

Response​

Returns an array of payment transaction objects sorted by creation date (most recent first).

Success Response​

Status Code: 200 OK

Response Body:

[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"planName": "Paid",
"amountCents": 4900,
"currency": "EUR",
"status": "COMPLETED",
"cardNumberMasked": "**** **** **** 4242",
"failureReason": null,
"createdAt": "2026-02-01T00:00:00Z"
}
]

Response Fields​

FieldTypeDescription
idUUIDUnique identifier for the payment transaction
planNamestringHuman-readable name of the plan
amountCentsintegerPayment amount in cents
currencystringCurrency code (e.g., EUR, USD)
statusstringPayment status: COMPLETED, FAILED, or PENDING
cardNumberMaskedstringMasked card number used for payment
failureReasonstringReason for failure if status is FAILED (null otherwise)
createdAtstringISO timestamp when the payment was initiated

Payment Status Values​

StatusDescription
COMPLETEDPayment was successfully processed
FAILEDPayment failed (see failureReason for details)
PENDINGPayment is being processed

Common Failure Reasons​

  • Insufficient funds
  • Card expired
  • Card declined
  • Invalid card number
  • Payment provider error

Errors​

Status CodeError CodeDescription
401UNAUTHORIZEDMissing or invalid JWT token
403FORBIDDENUser does not have admin privileges

Example​

Request​

curl -X GET https://app.entryguard.io/api/v1/billing/payments \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Response​

[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"planName": "Paid",
"amountCents": 4900,
"currency": "EUR",
"status": "COMPLETED",
"cardNumberMasked": "**** **** **** 4242",
"failureReason": null,
"createdAt": "2026-02-01T00:00:00Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"planName": "Paid",
"amountCents": 4900,
"currency": "EUR",
"status": "COMPLETED",
"cardNumberMasked": "**** **** **** 4242",
"failureReason": null,
"createdAt": "2026-01-01T00:00:00Z"
},
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"planName": "Paid",
"amountCents": 1900,
"currency": "EUR",
"status": "FAILED",
"cardNumberMasked": "**** **** **** 5555",
"failureReason": "Insufficient funds",
"createdAt": "2025-12-15T00:00:00Z"
}
]

Notes​

  • Payment history is retained indefinitely for compliance and auditing purposes.
  • Failed payments trigger email notifications to the billing contact.
  • After a failed payment, the account enters a grace period before being suspended.
  • All payment transactions are logged in the audit trail.