POST
/
api
/
v1
/
payments
/
{payment_id}
/
reverse
Reverse payment
curl --request POST \
  --url http://127.0.0.1:8080/api/v1/payments/{payment_id}/reverse \
  --header 'Content-Type: application/json' \
  --data '
{
  "note": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "payment_date": "2023-12-25",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "renter_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "room_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "note": "<string>",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Path Parameters

payment_id
string<uuid>
required

Payment ID

Body

application/json
note
string | null

Response

200 - application/json

Reversed payment

id
string<uuid>
required
organization_id
string<uuid>
required
amount
number<double>
required
method
enum<string>
required
Available options:
cash,
bank_transfer,
other
payment_date
string<date>
required
status
enum<string>
required
Available options:
COMPLETED,
REVERSED
created_at
string<date-time>
required
updated_at
string<date-time>
required
invoice_id
string<uuid> | null
renter_id
string<uuid> | null
room_id
string<uuid> | null
note
string | null
created_by
string<uuid> | null