Create a product transaction

Consider a simple transaction between myself and a seller, where I am buying an Iphone for NGN300,000 and earpod for NGN50,000.

You need to set type attribute to 'product'

post
Create a product transaction

https://api.vesicash.com/v1/transactions/create
Request
Response
Request
Headers
Accept
required
string
application/json
V-PRIVATE-KEY
required
string
vesicash private key
Response
200: OK
{
"status": "ok",
"code": 200,
"message": "Transaction created"
"data": {
"transaction": {
"transaction_id": "F2SUkXINIJ6ALjDmt3cT",
"parties_id": "c8oeStpi6zfVZ84XeZf8",
"title": "iPhone X Sale",
"type": "product",
"description": "A new asle",
"status": "Draft",
"inspection_period": 1582542740,
"due_date": 1581465600,
"shipping_fee": null,
"currency": "NGN",
"updated_at": "2019-09-23 15:06:03",
"created_at": "2019-09-23 15:06:03",
"id": 36,
"products": [
{
"transaction_id": "F2SUkXINIJ6ALjDmt3cT",
"product_transaction_id": "YFGf7PEFaPvY80dj8lzc",
"title": "iphone x 64gb",
"photo": "",
"amount": 5000,
"quantity": 2,
"updated_at": "2019-09-23 15:06:03",
"created_at": "2019-09-23 15:06:03",
"id": 3
},
{
"transaction_id": "F2SUkXINIJ6ALjDmt3cT",
"product_transaction_id": "YFGf7PEFaPvY80dj8lzc",
"title": "iphone x 256gb",
"photo": "",
"amount": 10000,
"quantity": 2,
"updated_at": "2019-09-23 15:06:03",
"created_at": "2019-09-23 15:06:03",
"id": 4
}
],
"parties": [
{
"transaction_id": "F2SUkXINIJ6ALjDmt3cT",
"transaction_parties_id": "c8oeStpi6zfVZ84XeZf8",
"account_id": 5841206525,
"role": "buyer",
"created_at": "2019-09-23T15:06:03.230203Z",
"updated_at": "2019-09-23T15:06:03.230246Z"
},
{
"transaction_id": "F2SUkXINIJ6ALjDmt3cT",
"transaction_parties_id": "fPsweXLyWItmSSU6YYlN",
"account_id": 9432695230,
"role": "seller",
"created_at": "2019-09-23T15:06:03.230286Z",
"updated_at": "2019-09-23T15:06:03.230295Z"
},
{
"transaction_id": "F2SUkXINIJ6ALjDmt3cT",
"transaction_parties_id": "5PXh2TWpFd6nq5uXjuS6",
"account_id": 5841206525,
"role": "charge_bearer",
"created_at": "2019-09-23T15:06:03.230311Z",
"updated_at": "2019-09-23T15:06:03.230320Z"
}
],
"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 product transaction.

{
"title" : "Purchase of Iphone and Earpod",
"type" : "product",
"products": [{
"title": "iphone",
"quantity": 1,
"amount": 300000
},{
"title": "earpod",
"quantity": 1,
"amount": 50000
}],
"description": "Description of the purchase of Iphone and Earpod",
"parties": {
"sender" : 5841206525,
"recipient": 9432695230,
"buyer" : 5841206525,
"seller": 9432695230,
"charge_bearer": 5841206525,
"shipping_charge_bearer": 4865544336,
"shipping_charge_recipient": 4865544336
},
"shipping_fee": 500,
"inspection_period": 1,
"due_date": "2/12/2020",
"currency": "NGN"
}