POST
/
wp-json
/
latepoint-api
/
v1
/
payments
{
  "success": false,
  "error": "Missing required fields: booking_id, amount"
}

Request Body

order_id
integer
required
The order ID associated with this payment
amount
number
required
The payment amount
customer_id
integer
The customer ID (default: 0)
processor
string
Payment processor (default: ‘manual’)
payment_method
string
Payment method (default: ‘other’)
payment_portion
string
Payment portion (default: ‘full’)
kind
string
Transaction kind (default: ‘capture’)
status
string
Payment status (succeeded, processing, failed)
token
string
Payment transaction token from processor
notes
string
Additional notes about the payment

Example Request

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

{
  "order_id": 37,
  "amount": 50.00,
  "processor": "stripe",
  "payment_method": "credit_card",
  "payment_portion": "full",
  "kind": "capture",
  "status": "succeeded",
  "token": "pi_1234567890abcdef"
}

Example Response

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

Error Responses

{
  "success": false,
  "error": "Missing required fields: booking_id, amount"
}
{
  "success": false,
  "error": "Invalid booking ID provided"
}