Skip to Content
HomeLink Hub
Escrow

Complete an escrow on Pandascrow (raw passthrough)

POST
/api/v1/escrow/complete

Access: Bearer token required.

Thin proxy to Pandascrow's POST /escrow/complete: forwards userId as Pandascrow's uuid, escrowId as escrow_id and the otp, then returns Pandascrow's status, message and data.

This handler does not touch HomeLink Hub state: the local EscrowTransaction status is not changed, the property is not marked rented/sold, no payout is disbursed and no notification or socket event is sent by this call (the local record only moves to completed later if Pandascrow's escrow.completed webhook arrives). It also does not check that the caller is a party to the escrow; any authenticated user can call it with any ids. The first-party web and mobile apps do not use it; they call PATCH /escrow/{id}/request-completion, which is the supported way to release funds.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Request Body

application/json
  1. body
userId*string

Sent to Pandascrow as uuid (the Pandascrow user confirming completion). Taken from the body, not from the access token.

escrowId*number

Pandascrow escrow id (the numeric pandascrowEscrowId, not the local ObjectId).

otp*string

Release OTP issued by Pandascrow.

Response Body

Pandascrow answered 2xx. success, message and data are Pandascrow's own status, message and data; the shape of data is not defined in this codebase.

application/json
  1. response
status*integer
success*boolean
message*string
data*unknown
Example Request
curl -X POST 'http://localhost:4000/api/v1/escrow/complete' \  -H 'Content-Type: application/json' \  -d '{  "userId": "8d2f6c1e-4b7a-4e0c-9a35-1f6b2c7d9e10",  "escrowId": 48213,  "otp": "482913"}'
Example Response
{  "status": 200,  "success": true,  "message": "(message returned by Pandascrow)",  "data": null}