Skip to main content
PUT
/
v1
/
escrow
/
milestone
/
edit
/
{paymentToken}
Edit milestone escrow
curl --request PUT \
  --url https://staging.api.payluk.ng/v1/escrow/milestone/edit/{paymentToken} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'customer-id: <customer-id>' \
  --data '
{
  "amount": 1200000,
  "purpose": "Company website build (revised scope)",
  "description": "3-phase delivery — updated budget",
  "whoPays": "buyer",
  "maxDelivery": 45,
  "deliveryTimeline": "days",
  "totalQuantity": 1,
  "categoryId": "665f1b2c9a1e4d0012ab3c30",
  "milestones": [
    {
      "title": "Design",
      "description": "Figma mockups",
      "amount": 400000,
      "dueDate": "2026-07-20",
      "customerId": "665f1b2c9a1e4d0012ab3c40"
    },
    {
      "title": "Development",
      "description": "Frontend + backend",
      "amount": 600000,
      "dueDate": "2026-08-20"
    },
    {
      "title": "Deployment",
      "description": "Go-live + handover",
      "amount": 200000
    }
  ]
}
'
{ "status": 200, "message": "Milestone escrow updated successfully", "data": { "id": "665f1b2c9a1e4d0012ab3c10", "amount": 1200000, "purpose": "Company website build (revised scope)", "whoPays": "buyer", "fee": 30000, "paymentToken": "PY_8AB12C9D3045", "status": "PENDING", "state": "AWAITING_PAYMENT", "settlementType": "MILESTONE", "milestones": [ { "id": "665f1b2c9a1e4d0012ab3c24", "title": "Design", "description": "Figma mockups", "amount": 400000, "dueDate": "2026-07-20", "status": "PENDING", "releasedAt": null }, { "id": "665f1b2c9a1e4d0012ab3c25", "title": "Development", "description": "Frontend + backend", "amount": 600000, "dueDate": "2026-08-20", "status": "PENDING", "releasedAt": null }, { "id": "665f1b2c9a1e4d0012ab3c26", "title": "Deployment", "description": "Go-live + handover", "amount": 200000, "dueDate": null, "status": "PENDING", "releasedAt": null } ], "updatedAt": "2026-06-23T09:30:00.000Z" } }

Authorizations

Authorization
string
header
required

Your secret key as a Bearer token. The key prefix selects the environment: sk_test_... (test) or sk_live_... (live).

Headers

customer-id
string
required

The merchant customer this request acts on behalf of.

Path Parameters

paymentToken
string
required

The escrow's payment token (e.g. PY_8AB12C9D3045).

Body

application/json
amount
integer
required
Example:

1000000

purpose
string
required
Example:

"Company website build"

whoPays
enum<string>
required

For milestone escrows the buyer always pays the Payluk fee; buyer is the only accepted value.

Available options:
buyer
Example:

"buyer"

milestones
object[]
required

At least 2 milestones whose amounts sum to amount.

Minimum array length: 2
description
string
Example:

"3-phase delivery"

maxDelivery
integer
Example:

30

deliveryTimeline
enum<string>
Available options:
minutes,
hours,
days
Example:

"days"

totalQuantity
integer
Example:

1

categoryId
string
Example:

"665f1b2c9a1e4d0012ab3c30"

Response

Milestone escrow updated.

status
integer
Example:

200

message
string
Example:

"Operation successful"

data
object