PUT
/
wp-json
/
latepoint-api
/
v1
/
payments
/
{id}
{
  "success": false,
  "error": "Payment not found"
}

Path Parameters

id
integer
required
The unique identifier of the payment to update

Request Body

amount
number
The payment amount
processor
string
Payment processor (stripe, paypal, square, etc.)
payment_method
string
Payment method (credit_card, paypal, cash, etc.)
payment_portion
string
Payment portion (full, partial, etc.)
kind
string
Transaction kind (capture, refund, etc.)
status
string
Payment status (succeeded, processing, failed)
token
string
Payment transaction token from processor
notes
string
Additional notes about the payment
receipt_number
string
Receipt number for the payment

Example Request

PUT /wp-json/latepoint-api/v1/payments/3
X-API-Key: YOUR_API_KEY
Content-Type: application/json

{
  "amount": 75.00,
  "status": "succeeded",
  "notes": "Updated payment amount",
  "payment_portion": "full",
  "kind": "capture"
}

Example Response

{
  "success": true,
  "message": "Payment updated successfully",
  "data": {
    "id": "3",
    "booking_id": null,
    "customer_id": "0",
    "processor": "stripe",
    "payment_method": "credit_card",
    "payment_portion": "full",
    "kind": "capture",
    "amount": "75",
    "status": "succeeded",
    "token": null,
    "notes": "Updated payment amount",
    "order_id": "37",
    "created_at": "2025-01-21 15:30:00",
    "updated_at": "2025-01-21 15:45:00"
  }
}

Error Responses

{
  "success": false,
  "error": "Payment not found"
}
{
  "success": false,
  "error": "Invalid payment status provided"
}
{
  "success": false,
  "error": "Failed to update payment"
}