Skip to main content
POST
/
v1
/
escrow
/
milestone
/
create
Create milestone escrow
curl --request POST \
  --url https://staging.api.payluk.ng/v1/escrow/milestone/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'customer-id: <customer-id>' \
  --data '
{
  "amount": 1000000,
  "purpose": "Company website build",
  "description": "3-phase delivery",
  "whoPays": "buyer",
  "maxDelivery": 30,
  "deliveryTimeline": "days",
  "totalQuantity": 1,
  "categoryId": "665f1b2c9a1e4d0012ab3c30",
  "milestones": [
    {
      "title": "Design",
      "description": "Figma mockups",
      "amount": 300000,
      "dueDate": "2026-07-15",
      "customerId": "665f1b2c9a1e4d0012ab3c40"
    },
    {
      "title": "Development",
      "description": "Frontend + backend",
      "amount": 500000,
      "dueDate": "2026-08-15"
    },
    {
      "title": "Deployment",
      "description": "Go-live + handover",
      "amount": 200000
    }
  ]
}
'
{
  "status": 201,
  "message": "Milestone escrow created successfully",
  "data": {
    "id": "665f1b2c9a1e4d0012ab3c10",
    "amount": 1000000,
    "purpose": "Company website build",
    "whoPays": "buyer",
    "fee": 25000,
    "paymentToken": "PY_8AB12C9D3045",
    "status": "PENDING",
    "state": "AWAITING_PAYMENT",
    "settlementType": "MILESTONE",
    "milestones": [
      {
        "id": "665f1b2c9a1e4d0012ab3c21",
        "title": "Design",
        "description": "Figma mockups",
        "amount": 300000,
        "dueDate": "2026-07-15",
        "status": "PENDING",
        "releasedAt": null
      },
      {
        "id": "665f1b2c9a1e4d0012ab3c22",
        "title": "Development",
        "description": "Frontend + backend",
        "amount": 500000,
        "dueDate": "2026-08-15",
        "status": "PENDING",
        "releasedAt": null
      },
      {
        "id": "665f1b2c9a1e4d0012ab3c23",
        "title": "Deployment",
        "description": "Go-live + handover",
        "amount": 200000,
        "dueDate": null,
        "status": "PENDING",
        "releasedAt": null
      }
    ],
    "createdAt": "2026-06-22T10:15:00.000Z",
    "updatedAt": "2026-06-22T10:15: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.

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 created.

status
integer
Example:

200

message
string
Example:

"Operation successful"

data
object