Create a milestone transaction

Milestone transactions are necessary for buying and selling of services where the seller get the money after completion of specified milestones.

Specify multiple milestones and set type attribute to 'milestone'.

post
create a milestone transaction

https://api.vesicash.com/v1/transactions/create
Request
Response
Request
Headers
Accept
required
string
application/json
V-PRIVATE-KEY
required
string
your vesicash private key
Response
200: OK
Sample reponse when a milestone transaction is created.
{
"status": "ok",
"code": 200,
"message": "Transaction created"
"data": {
"transaction": {
"transaction_id": "FOYA2KPsCU8HZykCDdzw",
"parties_id": "S1SdCuz5eytOh9FUcOd6",
"milestone_id": "NphttUTXlP",
"title": "Build landing page",
"type": "milestone",
"description": "A new asle",
"amount": 0,
"status": "Draft",
"currency": "NGN",
"inspection_period": 1582542740,
"due_date": 1581465600,
"updated_at": "2019-09-23 13:27:41",
"created_at": "2019-09-23 13:27:41",
"id": 27,
"milestones": [
{
"transaction_id": "aTWsWzKeMX",
"milestone_id": "NphttUTXlP",
"title": "milestone 1",
"description": "Desc",
"amount": 250000,
"status": "Draft",
"quantity": 1,
"inspection_period": 1,
"due_date": "12/12/2020",
"currency": "NGN",
"updated_at": "2019-09-23 13:27:41",
"created_at": "2019-09-23 13:27:41",
"id": 28
},
{
"transaction_id": "POpJDCJRYH",
"parties_id": "S1SdCuz5eytOh9FUcOd6",
"milestone_id": "NphttUTXlP",
"title": "milestone 2",
"description": "Desc",
"amount": 1000000,
"status": "Draft",
"quantity": 1,
"inspection_period": 1,
"due_date": "12/24/2020",
"currency": "NGN",
"updated_at": "2019-09-23 13:27:41",
"created_at": "2019-09-23 13:27:41",
"id": 29
}
],
"parties": [
{
"transaction_id": "FOYA2KPsCU8HZykCDdzw",
"transaction_parties_id": "S1SdCuz5eytOh9FUcOd6",
"account_id": 5841206525,
"role": "buyer",
"created_at": "2019-09-23T13:27:40.791582Z",
"updated_at": "2019-09-23T13:27:40.791612Z"
},
{
"transaction_id": "FOYA2KPsCU8HZykCDdzw",
"transaction_parties_id": "8Tqv3CkH66lpMTRz2CtY",
"account_id": 9432695230,
"role": "seller",
"created_at": "2019-09-23T13:27:40.791645Z",
"updated_at": "2019-09-23T13:27:40.791653Z"
},
{
"transaction_id": "FOYA2KPsCU8HZykCDdzw",
"transaction_parties_id": "M1zQ2M2w32jXeshK2qfZ",
"account_id": 5841206525,
"role": "charge_bearer",
"created_at": "2019-09-23T13:27:40.791668Z",
"updated_at": "2019-09-23T13:27:40.791676Z"
}
],
"inspection_period_formatted": "2020-02-24 11:12:20",
"due_date_formatted": "2020-02-12 00:00:00"
}
}
}

As an example, you can a make a post request to the endpoint above and pass in the raw json data below to create a milestone transaction.

{
"title" : "Build an ecommerce app",
"type" : "milestone",
"description": "A new app",
"parties": {
"buyer" : 5841206525,
"seller": 9432695230,
"charge_bearer": 5841206525,
"sender":9432695230,
"recipient":5841206525
},
"milestones": [{
"title": "Build contact form",
"description": "Desc",
"amount": 250000,
"quantity": 1,
"inspection_period": 1,
"due_date": "12/12/2020"
},{
"title": "Build mobile app",
"description": "Desc",
"amount": 1000000,
"quantity": 1,
"inspection_period": 2,
"due_date": "12/24/2020"
}],
"inspection_period": 1,
"due_date": "2/12/2020",
"currency": "NGN"
}