Create a milestone transaction
Milestone transactions are important for a transaction where the other party receives a certain amount of the money after completion of specified milestones.
Specify multiple milestones and set type attribute to 'milestone'.
create a milestone transaction
POST
https://api.vesicash.com/v2/escrow-create
Headers
Name | Type | Description |
---|---|---|
Accept* | string | application/json |
V-PRIVATE-KEY* | string | your vesicash private key |
V-PUBLIC-KEY* | String | your vesicash public key |
{
"status": "success",
"code": 201,
"message": "Created",
"data": {
"id": 2988,
"transaction_id": "328a29deb5e146c8af25",
"parties_id": "f4de747fefb34d6586b2",
"milestone_id": "3a33b16504c347ca936f",
"broker_id": "",
"title": "Milestone payment",
"type": "milestone",
"description": "Milestone payment",
"amount": 7350,
"status": "Draft",
"quantity": 1,
"inspection_period": "0",
"due_date": "",
"shipping_fee": 0,
"currency": "NGN",
"deleted_at": "0001-01-01T00:00:00Z",
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z",
"is_paylinked": false,
"source": "api",
"trans_ussd_code": 24705,
"recipients": [
{
"account_id": 7031112514,
"amount": 1000,
"email_address": "",
"phone_number": ""
},
{
"account_id": 1104949388,
"amount": 2000,
"email_address": "",
"phone_number": ""
}
],
"dispute_handler": "vesicash",
"amount_paid": 0,
"escrow_charge": 245.00000000000003,
"escrow_wallet": "yes",
"country": "NG",
"products": null,
"parties": [
{
"party_id": 18618,
"account_id": 7677378337,
"account_name": "Vesicash Buyer",
"email": "buyer@vesicash.com",
"phone_number": "09213300090",
"role": "buyer",
"status": "Accepted",
"access_level": {
"can_view": true,
"can_receive": false,
"mark_as_done": false,
"approve": true
}
},
{
"party_id": 18619,
"account_id": 7031112514,
"account_name": "Vesicash Seller",
"email": "seller@vesicash.com",
"phone_number": "09212211101",
"role": "seller",
"status": "Created",
"access_level": {
"can_view": true,
"can_receive": true,
"mark_as_done": true,
"approve": false
}
},
{
"party_id": 18620,
"account_id": 1104949388,
"account_name": "Vesicash Broker",
"email": "broker@vesicash.com",
"phone_number": "2349212200011",
"role": "broker",
"status": "Created",
"access_level": {
"can_view": true,
"can_receive": true,
"mark_as_done": false,
"approve": false
}
}
],
"files": [],
"milestones": [
{
"index": 1,
"milestone_id": "3a33b16504c347ca936f",
"title": "First Quarter",
"amount": 3000,
"status": "Sent - Awaiting Confirmation",
"inspection_period": "2",
"due_date": "",
"recipients": [
{
"account_id": 7031112514,
"account_name": "Vesicash Seller"
"email": "seller@vesicash.com"
"phone_number": "09212211101",
"amount": 1000
},
{
"account_id": 1104949388,
"account_name": "Vesicash Broker",
"email": "broker@vesicash.com",
"phone_number": "2349212200011",
"amount": 2000
}
]
},
{
"index": 2,
"milestone_id": "9b608f54c5b347a890e5",
"title": "Second Quarter",
"amount": 4000,
"status": "Sent - Awaiting Confirmation",
"inspection_period": "2",
"due_date": "",
"recipients": [
{
"account_id": 7031112514,
"account_name": "Vesicash Seller"
"email": "seller@vesicash.com"
"phone_number": "09212211101",
"amount": 1500
},
{
"account_id": 1104949388,
"account_name": "Vesicash Broker",
"email": "broker@vesicash.com",
"phone_number": "2349212200011",
"amount": 2500
}
]
}
],
"broker": {
"id": 0,
"transaction_broker_id": "",
"transaction_id": "",
"broker_charge": "",
"broker_charge_bearer": "",
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z",
"broker_charge_type": "",
"is_seller_accepted": false,
"is_buyer_accepted": false
}
}
}
For example, you can make a post request to the endpoint above and pass in the raw json data below to create a milestone transaction.
{
"escrow_wallet": "yes",
"title": "Milestone payment",
"currency": "NGN",
"type": "milestone",
"amount": 7350,
"files": [],
"dispute_handler": "vesicash",
"source": "api",
"parties": [
{
"account_id": 7677378337,
"role": "buyer",
"status": "Accepted",
"access_level": {
"can_view": true,
"can_receive": false,
"mark_as_done": false,
"approve": true
}
},
{
"account_id": 7031112514,
"role": "seller",
"status": "Created",
"access_level": {
"can_view": true,
"can_receive": true,
"mark_as_done": true,
"approve": false
}
},
{
"account_id": 1104949388,
"role": "broker",
"status": "Created",
"access_level": {
"can_view": true,
"can_receive": true,
"mark_as_done": false,
"approve": false
}
}
],
"milestones": [
{
"title": "First Quarter",
"status": "Sent - Awaiting Confirmation",
"amount": 3000,
"inspection_period": 2,
"due_date": "2023-11-26",
"recipients": [
{
"account_id": 7031112514,
"amount": 1000
},
{
"account_id": 1104949388,
"amount": 2000
}
]
},
{
"title": "Second Quarter",
"status": "Sent - Awaiting Confirmation",
"amount": 4000,
"inspection_period": 2,
"due_date": "2023-11-29",
"recipients": [
{
"account_id": 7031112514,
"amount": 1500
},
{
"account_id": 1104949388,
"amount": 2500
}
]
}
]
}
Last updated