Cloud API · Devoluciones
Iniciar una devolución
Abre en el terminal la pantalla para devolver un pago ya completado.
POST
Ver la guía/terminals/:terminalId/payments/:paymentId/init-refundEsta llamada abre en el terminal correspondiente la pantalla para devolver un pago ya completado.
Cabeceras
Todas son obligatorias.
| Nombre | Valor |
|---|---|
Content-Type |
application/json |
Authorization |
Bearer <clientSecret> |
venue-api-key |
El identificador del restaurante |
Cuerpo
| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
amount |
number | Sí | Importe que se devuelve |
Respuesta
JSON
{
"refundId": "67e565ca4116f4401ccbf789",
"refundStatusUrl": "{base}/v1/terminals/{terminalId}/payments/{paymentId}/refunds/{refundId}/status",
"refundAbortUrl": "{base}/v1/terminals/{terminalId}/payments/{paymentId}/refunds/{refundId}/abort"
}refundStatusUrl siempre llega completo. refundAbortUrl solo llega si el terminal permite cancelar.
JSON
{
"status": 400,
"message": "Bad Request",
"reason": "Invalid type for amount: expected number, but got undefined"
}JSON
{
"status": 403,
"message": "Not authorized"
}Se devuelve si alguna cabecera no es válida.