Get booking payments

Bookings

get/api/v2/bookings/{pcode}/payments/{bookingId}x-api-key

Retrieve every payment registered against a booking, whoever took it: cash and card at reception, bank transfer, and online payments through the gateways the property has connected. When the booking is part of a group, the payments of every booking in the group come back — including those of bookings in other properties, when the group spans several: each payment carries its own bookingId and pcode, so filter on them to keep the ones of a single booking. type says how it was paid, as the property named it, and providerType which gateway handled it; it is absent when the payment was taken by hand. A refunded payment stays in the list and is marked as such, so the list is the history, not the balance — add the amounts to get what has actually been collected. Amounts are in the property's currency. Money held as a guarantee rather than collected is not here: see /deposits.

Console

Runs against the API from your browser, with the same request your server will send.

Environment

Production

https://uni-api.hotelgest.com

Calls hit live data with your own API key. A POST, PUT, PATCH or DELETE here changes a real property.

Credentials

The API key, sent on every request. A property admin creates it in the PMS under Settings → API keys; a partner receives one per property when the property activates its integration. It works only for the property it was issued for, and only on the endpoints granted to it.

This endpoint needs a credential. Without it you will get a 401.

Stored in this browser only. Never sent anywhere but the API host above.

Path parameters

gethttps://uni-api.hotelgest.com/api/v2/bookings/123456/payments/789

Send the request to see the real response here.

Nothing is mocked. What comes back is what the API returned.

Requests go straight from your browser to the API host above — nothing is proxied through this site.

Path parameters

pcode
number

Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for.

bookingId
number

Booking ID. Obtained from the search endpoints (GET /api/v2/bookings/{pcode}/search) or returned by the booking creation endpoint.

Responses

Ok. If your API key answers encrypted — every key issued now does, and every partner credential — this body arrives as the encryption envelope ({ crypto, protected, wrappedKey, iv, payload, tag }, a compact JWE), and the schema below is what its payload decrypts to. See https://public-api.hotelgest.com/public/guides/encryption

id
number

Unique ID of the payment

invoiceId
number

ID of the invoice this payment is linked to. Absent while it is on no invoice

reference
string

Reference of the payment as it was recorded: free text typed at reception, or the identifier of the gateway or channel that took it (for example the Paycomet order or the channel payment ID). Empty string when there is none. It is not generated by Hotelgest and is not unique

amountAuth
number

Amount authorized by the payment provider (may differ from the captured amount for card payments). 0 when there was no authorization

amount
number

Actual amount captured/received

date
string

Date the payment was made (YYYY-MM-DD)

paymentType
stringDeprecated

Same value as type. Kept for older integrations: read type instead

type
string

Payment method, as the property named it. It is free text, not a closed list: besides the usual Cash, Credit Card, Credit Card2, Bank Transfer, Virtual POS, bizum, PayPal, Paycomet, Monei, Stripe, Amex, Paycheck, CashDro and others, a property can record its own names (for example "TPV BBVA", "Booking.com", "VISA", "Bank Transfer booking"), and Hotelgest itself writes "Preauthorization" for a captured card pre-authorisation and "credit" for a payment recorded against a company account

providerType
enum

Online payment gateway that took the payment: paycomet, monei or stripe. Absent when it was recorded by hand or came through any other way

One of:paycometmoneistripe

notes
string

Free-text notes about the payment. Empty string when there are none

userId
number

ID of the user who registered this payment. 0 when it was not registered by a person (a gateway, a channel or an integration)

bookingId
number

ID of the booking this payment belongs to

pcode
number

Property code of the booking the payment belongs to. In a group that spans several properties it can be another property than the one in the path

createdAt
string

When the payment was recorded, as an ISO 8601 date-time. The value is Spain local time (Europe/Madrid) written with a Z suffix: read the digits as Madrid wall-clock time, not as UTC

prePay
boolean

Whether this is a pre-payment (advance payment before check-in, typically from OTA or booking engine)

prePayChannel
number

A 0/1 flag, not a channel ID: 1 on a payment the sales channel (OTA) collected and on a captured card pre-authorisation, 0 otherwise

transactionType
string

Kind of transaction, as the numeric code the legacy stores, in text: "0" for an ordinary payment (almost all of them), "1" and "2" for card operations handled by a gateway. Absent when the row has no code

isRefunded
boolean

Whether this payment has been refunded

isAdvancePayment
boolean

Whether this payment already is an advance payment ("pago a cuenta"), so it cannot be converted again

locator
string

The booking code on the channel the reservation of this payment came from. Absent when it has none

authCode
string

Authorization code the card gateway returned for the payment. Absent on payments that did not go through a gateway

Example response
1[
2 {
3 "id": 101,
4 "invoiceId": 450,
5 "reference": "1023-pay-1736935320",
6 "amountAuth": 120.5,
7 "amount": 120.5,
8 "date": "2025-01-15",
9 "paymentType": "Cash",
10 "type": "Cash",
11 "providerType": "paycomet",
12 "notes": "Paid via virtual POS",
13 "userId": 12,
14 "bookingId": 999,
15 "pcode": 123456,
16 "createdAt": "2025-01-15T10:22:00.000Z",
17 "prePay": false,
18 "prePayChannel": 0,
19 "transactionType": "0",
20 "isRefunded": false,
21 "isAdvancePayment": false,
22 "locator": "4417230981",
23 "authCode": "123456"
24 }
25]

What is a pcode?

The property code. Every endpoint is scoped to one property, and your API key only works for the property it was issued for.

Rate limits

100 requests per minute per source IP, 120 per API key and 300 per property, each counted across every endpoint together — not per endpoint. Over any of them you get a 429 with the seconds to wait in Retry-After-<limit> (apikey-ip, apikey or apikey-pcode): stop and wait it out. Repeat offences on a key or a property are blocked for longer each time, up to 7 days.