Skip to main content
PUT
/
v1
/
escrow
/
milestone
/
convert
/
{paymentToken}
Convert standard escrow to milestone
curl --request PUT \
  --url https://staging.api.payluk.ng/v1/escrow/milestone/convert/{paymentToken} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'customer-id: <customer-id>' \
  --data '
{
  "amount": 200000,
  "milestones": [
    {
      "title": "Design",
      "description": "Figma mockups",
      "amount": 60000,
      "dueDate": "2026-07-15",
      "customerId": "665f1b2c9a1e4d0012ab3c40"
    },
    {
      "title": "Development",
      "description": "Frontend + backend",
      "amount": 140000
    }
  ]
}
'
{
  "status": 200,
  "message": "Escrow converted to milestone successfully",
  "data": {
    "id": "665f1b2c9a1e4d0012ab3c10",
    "amount": 200000,
    "purpose": "MacBook Pro 14\"",
    "whoPays": "buyer",
    "fee": 5000,
    "paymentToken": "PY_8AB12C9D3045",
    "status": "PENDING",
    "state": "AWAITING_PAYMENT",
    "settlementType": "MILESTONE",
    "milestones": [
      {
        "id": "665f1b2c9a1e4d0012ab3c27",
        "title": "Design",
        "description": "Figma mockups",
        "amount": 60000,
        "dueDate": "2026-07-15",
        "status": "PENDING",
        "releasedAt": null
      },
      {
        "id": "665f1b2c9a1e4d0012ab3c28",
        "title": "Development",
        "description": "Frontend + backend",
        "amount": 140000,
        "dueDate": null,
        "status": "PENDING",
        "releasedAt": null
      }
    ],
    "updatedAt": "2026-06-24T11:00: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

Splits a standard escrow's amount into milestones. amount is optional: supply it to set a new escrow amount, or omit it to keep the escrow's current amount. Either way the milestone amounts must sum to the target amount.

milestones
object[]
required

At least 2 milestones whose amounts sum to the target amount (the new amount if supplied, otherwise the escrow's existing amount).

Minimum array length: 2
amount
integer

Optional new escrow amount. When omitted, the escrow keeps its current amount.

Example:

200000

Response

Escrow converted to a milestone escrow.

status
integer
Example:

200

message
string
Example:

"Operation successful"

data
object