Pré-autoriser un hold incidentals au check-in (en-tête Idempotency-Key obligatoire, NON-BLOQUANT)
POST
/v1/incidentals
const url = 'https://example.com/v1/incidentals';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', 'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json' }, body: '{"stayId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","folioId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","establishmentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","amount":{"amountCents":"15000","currency":"EUR"},"readerRef":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/incidentals \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "stayId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "folioId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "establishmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "amount": { "amountCents": "15000", "currency": "EUR" }, "readerRef": "example" }'Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Header Parameters
Section intitulée « Header Parameters » Idempotency-Key
required
string
Clé d’idempotence OBLIGATOIRE (8–200 car.) — anti-double-hold PSP.
Request Body required
Section intitulée « Request Body required »Pré-autorisation card-present. readerRef = réf OPAQUE du reader appairé (jamais une donnée carte).
Media type application/json
object
stayId
required
string format: uuid
folioId
required
string format: uuid
establishmentId
required
string format: uuid
amount
required
object
amountCents
required
string
Example
15000 currency
required
string
readerRef
required
Réf opaque du reader appairé
string
Responses
Section intitulée « Responses »Hold créé (pending, NOMINAL — résolution asynchrone par webhook)
Media type application/json
object
data
required
object
holdId
required
string format: uuid
Example generated
{ "data": { "holdId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }}Corps invalide ou montant hors plafond
Media type application/json
object
code
required
Code machine de l’erreur
string
message
required
Message lisible
string
origin
Origine domaine de l’erreur (optionnel)
object
boundedContext
string
module
string
status
required
integer
traceId
required
Identifiant de corrélation pour le support
string
Example
{ "code": "RESERVATION_NOT_FOUND", "message": "Réservation introuvable", "status": 404}Non authentifié (Idempotency-Key manquante → 400)
Media type application/json
object
code
required
Code machine de l’erreur
string
message
required
Message lisible
string
origin
Origine domaine de l’erreur (optionnel)
object
boundedContext
string
module
string
status
required
integer
traceId
required
Identifiant de corrélation pour le support
string
Example
{ "code": "RESERVATION_NOT_FOUND", "message": "Réservation introuvable", "status": 404}Permission refusée ou IDOR
Media type application/json
object
code
required
Code machine de l’erreur
string
message
required
Message lisible
string
origin
Origine domaine de l’erreur (optionnel)
object
boundedContext
string
module
string
status
required
integer
traceId
required
Identifiant de corrélation pour le support
string
Example
{ "code": "RESERVATION_NOT_FOUND", "message": "Réservation introuvable", "status": 404}