Skip to main content

Release Funds to Seller

Overview​

After the buyer has made a payment, the funds are held in escrow until the seller completes the work or service. Once the work is completed, the buyer can approve the work and release the funds to the seller. If there are any issues, the buyer can raise a dispute through the WePay dashboard.

Release Funds

POST apps/api/contracts/release

Headers:

  • Authorization: Bearer {access_token} — Replace {access_token} with the token obtained from Step 1.
  • Content-Type: application/json
{
"contractId" : "CNT-2601-00100003",
"milestoneId" : 223
}

Field Descriptions​

Field NameTypeDescriptionRequired / Notes / Example
contractIdstringContract IDRequired
milestoneIdintegerMilestone IDRequired if contract has milestones

Example Request (cURL)​

curl --location 'https://api.wepay.com.sa/apps/api/contracts/release' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"contractId" : "CNT-2601-00100003",
"milestoneId" : 223
}'

Example Response​

{
"data": {
"transactionId": 2894,
"amount": 1575.5,
"contractId": "CNT-2601-00100003",

},
"message": "ExternalContractReleasedSuccessfully",
"status": 200,
"validationErrors": []
}