Aller au contenu

Rembourser le solde résiduel d'un wallet prepaid (manager-only)

POST
/v1/wallets/{id}/refund
curl --request POST \
--url https://example.com/v1/wallets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/refund \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "businessDate": "2026-07-05", "idempotencyKey": "refund-stay-uuid", "correlationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
id
required
string format: uuid
Media type application/json
object
businessDate
required
string format: date
Example
2026-07-05
idempotencyKey
required
string
<= 200 characters
Example
refund-stay-uuid
correlationId
required
string format: uuid

Remboursement effectué

Media type application/json
object
data
required
object
walletId
required
string format: uuid
refundedCents
required

Montant remboursé en centimes (bigint string)

string
refundRef
string
nullable
Example generated
{
"data": {
"walletId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"refundedCents": "example",
"refundRef": "example"
}
}

Corps invalide

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é

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 (manager-only)

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
}

Wallet introuvable

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
}

Solde nul ou wallet non prepaid

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
}