Skip to main content
POST
/
api
/
v1
/
ticket-payments
/
:id
/
reverse
Reverse Payment
curl --request POST \
  --url https://api.example.com/api/v1/ticket-payments/:id/reverse
{
  "id": "<string>",
  "isReversed": true,
  "reversedAt": "<string>",
  "reversedById": "<string>",
  "amountPaid": 123
}

Overview

Reverses a previously registered ticket payment. Creates a reversal record and updates the ticket status back to EVALUATED.

Authentication

Requires JWT authentication with appropriate RBAC permissions:
  • ADMIN: Can reverse any payment
  • VENTANA: Can reverse payments from their window
  • VENDEDOR: Can reverse their own payments

Path Parameters

id
string
required
UUID of the payment to reverse

Request Body

No request body required.

Response

id
string
Payment ID
isReversed
boolean
Always true after reversal
reversedAt
string
ISO 8601 timestamp of reversal
reversedById
string
User ID who reversed the payment
amountPaid
number
Original amount that was paid

Status Codes

  • 200: Payment reversed successfully
  • 400: Payment already reversed
  • 403: RBAC violation
  • 404: Payment not found

Example Response

{
  "success": true,
  "data": {
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "ticketId": "550e8400-e29b-41d4-a716-446655440000",
    "amountPaid": 50000,
    "method": "cash",
    "isFinal": true,
    "isReversed": true,
    "reversedAt": "2024-03-15T11:00:00.000Z",
    "reversedById": "123e4567-e89b-12d3-a456-426614174000",
    "createdAt": "2024-03-15T10:30:00.000Z"
  }
}

Activity Logging

Logs action TICKET_PAYMENT_REVERSE with details:
  • reversed: true

Build docs developers (and LLMs) love