Request Body
The order ID associated with this payment
The customer ID (default: 0)
Payment processor (default: ‘manual’)
Payment method (default: ‘other’)
Payment portion (default: ‘full’)
Transaction kind (default: ‘capture’)
Payment status (succeeded, processing, failed)
Payment transaction token from processor
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"
}