Create a oneoff transaction
One-off transactions are important for a transaction where the other party receives the money at once upon delivery of product or service.
Specify type attribute to 'oneoff'.
create a oneoff 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": 2987,
"transaction_id": "b8b6620599ea444cad30",
"parties_id": "0dd0a06e9f6143d1bc76",
"milestone_id": "dd8e673ce4884bdcbbb8",
"broker_id": "",
"title": "Oneoff payment",
"type": "oneoff",
"description": "Oneoff payment",
"amount": 2100,
"status": "Draft",
"quantity": 0,
"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": 74556,
"recipients": [
{
"account_id": 3315810948,
"amount": 2000,
"email_address": "",
"phone_number": ""
}
],
"dispute_handler": "vesicash",
"amount_paid": 0,
"escrow_charge": 70,
"escrow_wallet": "yes",
"country": "NG",
"products": null,
"parties": [
{
"party_id": 18616,
"account_id": 7677378337,
"account_name": "Vesicash User",
"email": "user@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": 18617,
"account_id": 3315810948,
"account_name": " ",
"email": "user2@vesicash.com",
"phone_number": "2349210099911",
"role": "seller",
"status": "Created",
"access_level": {
"can_view": true,
"can_receive": true,
"mark_as_done": true,
"approve": false
}
}
],
"files": [
{
"id": 303,
"transaction_id": "b8b6620599ea444cad30",
"account_id": 7677378337,
"file_type": "",
"file_url": "https://vesicash.s3.us-east-2.amazonaws.com/staging/documents/c9eed62bd1534c382a3b89241b24b1ddd17b3793601854f3-6962-4b45-9959-4b376b09d616.pdf",
"created_at": "2023-11-23T09:24:52.374692828Z",
"updated_at": "2023-11-23T09:24:52.374692828Z"
}
],
"milestones": [
{
"index": 1,
"milestone_id": "dd8e673ce4884bdcbbb8",
"title": "Milestone 1",
"amount": 2000,
"status": "Sent - Awaiting Confirmation",
"inspection_period": "2",
"due_date": "",
"recipients": [
{
"account_id": 3315810948,
"account_name": " ",
"email": "user2@vesicash.com",
"phone_number": "2349210099911",
"amount": 2000
}
]
}
],
"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 one-off transaction.
{
"escrow_wallet": "yes",
"title": "Oneoff payment",
"currency": "NGN",
"type": "oneoff",
"amount": 2100,
"files": [
{
"name": "sample.pdf",
"url": "https://vesicash.s3.us-east-2.amazonaws.com/staging/documents/c9eed62bd1534c382a3b89241b24b1ddd17b3793601854f3-6962-4b45-9959-4b376b09d616.pdf"
}
],
"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": 3315810948,
"role": "seller",
"status": "Created",
"access_level": {
"can_view": true,
"can_receive": true,
"mark_as_done": true,
"approve": false
}
}
],
"milestones": [
{
"title": "Milestone 1",
"status": "Sent - Awaiting Confirmation",
"amount": 2000,
"inspection_period": 2,
"due_date": "2023-11-26",
"recipients": [
{
"account_id": 3315810948,
"amount": 2000
}
]
}
]
}
If the one-off transaction requires a file upload such as photos or contracts from other sources, all you need to do is pass the files url as shown below:
See how to upload files to our server and get the file url.
{
...,
"files": [
{
"name": "sample.pdf",
"url": "https://uploaded_escrow_document_url_file.pdf"
}
],
...
}
Last updated