Customer Purchase APIs
Base URL: http://localhost:8000/api/v1
Prefix: /customers
Auth: Bearer token
Headers: Content-Type: application/json
1. Reserve a Property
Creates the property purchase reservation and submits the configured reservation bank-transfer payment for verification.
/customers/properties/{property_id}/reserve/Auth: Required
Headers
Authorization: Bearer {{access_token}}Request Body
{
"buyer_message": "I would like to reserve this property.",
"transaction_id": "BFT-20260908-987654",
"payment_proof_url": ""
}Success Example
{
"success": true,
"message": "Reservation payment submitted for verification.",
"data": {
"purchase": {
"id": "4de62c56-10d6-4c98-9684-f70d9a828711",
"status": "requested",
"reservation_amount": "12500.00",
"reservation_percent": 2,
"currency": "USD"
},
"payment": {
"id": "d0eb5f70-8c6b-43eb-a680-e82e3098f96f",
"payment_for": "purchase_reservation",
"method": "bank_transfer",
"status": "submitted",
"transaction_id": "BFT-20260908-987654",
"payment_proof_url": ""
},
"next_action": "Your reservation payment is awaiting admin verification."
}
}Notes
-
buyer_messageis optional. -
transaction_idis required. -
payment_proof_urlis optional; it may contain a receipt image/PDF URL when available. -
The server calculates the reservation amount from the administrator purchase reservation setting: percentage or fixed amount, defaulting to 2% of the property price.
-
The server creates the payment as
submitted; the buyer then sees the pending-verification screen. -
Admin or webhook verification changes payment to
verified, purchase toreserved, and property toreserved.
Common Success Format
{
"success": true,
"message": "Request completed successfully.",
"data": {}
}Common Error Format
{
"success": false,
"message": "Property is no longer available for reservation.",
"data": {}
}Purchase Remaining Payment API
Base URL: http://localhost:8000/api/v1
Prefix: /customers
Auth: Bearer token with customer role
Headers: Content-Type: application/json
1. Submit Purchase Remaining Payment
Submits a full or partial bank-transfer payment against the outstanding balance of a property purchase.
/customers/remaining-payments/purchases/{purchase_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}
Content-Type: application/jsonRequest Body
{
"amount": "250000.00",
"transaction_id": "BFT-20260915-123456",
"payment_proof_url": "https://example.com/payment-proofs/BFT-20260915-123456.jpg"
}Success Example
{
"success": true,
"message": "Remaining purchase payment submitted for verification.",
"data": {
"purchase_id": "9a76cc16-a995-47e5-853e-a59643464ddb",
"payment": {
"id": "3eca5e0f-f22e-46aa-8794-5a703cd3cb73",
"payment_for": "property_purchase",
"amount": "250000.00",
"currency": "USD",
"method": "bank_transfer",
"status": "submitted",
"transaction_id": "BFT-20260915-123456",
"payment_proof_url": "https://example.com/payment-proofs/BFT-20260915-123456.jpg",
"created_at": "2026-09-15T10:30:00Z"
},
"total_amount": "625000.00",
"verified_amount": "12500.00",
"remaining_amount": "612500.00",
"next_action": "This payment is awaiting admin verification."
}
}Notes
-
purchase_idcomes fromdata.purchase.idreturned by the purchase reservation API. -
amountmust be at least1.00. -
amountmay represent either a partial payment or the complete outstanding balance. -
transaction_idis required and may contain up to 120 characters. -
payment_proof_urlis optional but must be a valid URL when supplied. -
The payment method is always
bank_transfer. -
The reservation payment must be verified before a remaining payment can be submitted.
-
Only the buyer associated with the purchase can submit its payment.
-
The purchase must have one of these statuses:
reserved,agreement_pending, orpayment_pending. -
Only one pending or submitted remaining payment is allowed at a time.
-
The submitted amount cannot exceed the outstanding balance.
-
verified_amountincludes verified reservation and purchase payments. -
remaining_amountis the outstanding balance before the newly submitted payment is verified. -
A submitted payment does not reduce the verified outstanding balance until an admin verifies it.
-
The purchase status changes to
payment_pending. -
Admins receive a payment-verification notification.
-
A successful request returns HTTP
201 Created. -
Possible errors include:
-
400 Bad Requestwhen validation fails. -
401 Unauthorizedwhen authentication is missing or invalid. -
403 Forbiddenwhen the authenticated user is not a customer. -
404 Not Foundwhen the purchase does not exist or belongs to another customer.
-
Common Success Format
{
"success": true,
"message": "Operation completed successfully.",
"data": {}
}Common Error Format
{
"success": false,
"message": "Validation failed.",
"errors": {
"field_name": [
"Error description."
]
}
}