Transactions

This page contains the logic that governs the creation and retrieval of transactions - sale or purchase.

Create Bi-Anonymous Transaction

POST {{url}}/transactions/anonymous/bi

Create a transaction where both parties are anonymous to the Vahlid system and generate a checkout link.

Headers

Request Body

{
    "status": true,
    "code": 201,
    "message": "Bi-anonymous transaction created successfully.",
    "data": {
        "transaction": {
            "trans_id": "TEST-47489085",
            "delivery_addr": "Ikorodu, Lagos State",
            "pay_deadline": "2023-06-12T17:45:55.000Z",
            "deadline_action": "delete",
            "seller": {
                "_id": "644bb008c3c5e79ac2857cef",
                "firstname": null,
                "lastname": null,
                "phone": null,
                "username": "Vicolas",
                "vahlid_id": "68151491",
                "email": "vicolas@email.com",
                "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0"
            },
            "buyer": {
                "_id": "64525e2c9c29739758c8dadd",
                "firstname": null,
                "lastname": null,
                "phone": null,
                "username": "toyabilo",
                "vahlid_id": "68162524",
                "email": "toyabilp2@gmail.com",
                "notificationToken": null
            },
            "products": [
                {
                    "name": "Television",
                    "prod_desc": "LG 32' Television",
                    "prod_image": "https://ng.jumia.is/unsafe/fit-in/300x300/filters:fill(white)/product/78/713234/1.jpg?6751",
                    "prod_price": 370000,
                    "_id": "6485bec9540f6f6433deed03"
                }
            ],
            "products_price": 370000,
            "is_deposit_made": false,
            "is_delivery_made": false,
            "is_delivery_confirmed": false,
            "is_payment_reminded": false,
            "status": "pending",
            "is_service": false,
            "test": false,
            "fee": 7500,
            "vendorFee": 2000,
            "source": "developer",
            "source_api_key": "VHL-8w6kzuewtr5x48rtkr1s4nc83dz8vzgr44auiw1q",
            "dev_mode": "live",
            "promoPointsAwarded": false,
            "anonymous": "both",
            "currency": "NGN",
            "disburse": {
                "amount": 370000,
                "exchangeRate": 1,
                "currency": "NGN",
                "_id": "6485bec9540f6f6433deed04"
            },
            "_id": "6485bec9540f6f6433deed02",
            "created_at": "2023-06-11T12:32:09.105Z",
            "updated_at": "2023-06-11T12:32:09.105Z",
            "hash": "2fq5mp6e3ouo4sh14m6nawzf4grbdnp5ov85v3nb5f72uemnwp"
        },
        "checkoutLink": "https://vahlid-checkout-test.onrender.com/transaction/2fq5mp6e3ouo4sh14m6nawzf4grbdnp5ov85v3nb5f72uemnwp/track?target=J6NKZtsWl9xMl3JkjqwePnHqnUIpKe5pnJxMl3JkqGd7WRAwvzP0oEgdHOYBGnN9VR7Por21LdrmaciX"
    }
}

Get Transactions

GET {{url}}/transactions

Return users transactions data

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Transactions retrieved successfully.",
    "data": {
        "transactions": {
            "count": 13,
            "results": [
                {
                    "_id": "6485bec9540f6f6433deed02",
                    "trans_id": "TEST-47489085",
                    "delivery_addr": "Ikorodu, Lagos State",
                    "pay_deadline": "2023-06-12T17:45:55.000Z",
                    "deadline_action": "delete",
                    "seller": {
                        "_id": "644bb008c3c5e79ac2857cef",
                        "firstname": null,
                        "lastname": null,
                        "phone": null,
                        "photo": null,
                        "username": "Vicolas",
                        "vahlid_id": "68151491",
                        "email": "akohvictor1@gmail.com",
                        "referralCode": "VAHL-68151491",
                        "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
                        "terms_conditions": {
                            "accepted": true,
                            "meta": {
                                "transaction": "6473d45cc667f96a3eb3d9f1",
                                "accepted_date": "2023-06-08T19:29:54.963Z",
                                "_id": "64822c32c8548d4c3cff91bb"
                            },
                            "_id": "64822c32c8548d4c3cff91ba"
                        }
                    },
                    "buyer": {
                        "_id": "64525e2c9c29739758c8dadd",
                        "firstname": null,
                        "lastname": null,
                        "phone": null,
                        "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
                        "username": "toyabilo3@gmail.com",
                        "vahlid_id": "68162524",
                        "email": "toyabilo3@gmail.com",
                        "notificationToken": null
                    },
                    "products": [
                        {
                            "name": "Television",
                            "prod_desc": "LG 32' Television",
                            "prod_image": "https://ng.jumia.is/unsafe/fit-in/300x300/filters:fill(white)/product/78/713234/1.jpg?6751",
                            "prod_price": 370000,
                            "_id": "6485bec9540f6f6433deed03"
                        }
                    ],
                    "products_price": 370000,
                    "is_deposit_made": false,
                    "is_delivery_made": false,
                    "is_delivery_confirmed": false,
                    "is_payment_reminded": false,
                    "status": "pending",
                    "is_service": false,
                    "test": false,
                    "fee": 7500,
                    "vendorFee": 2000,
                    "source": "developer",
                    "source_api_key": "VHL-8w6kzuewtr5x48rtkr1s4nc83dz8vzgr44auiw1q",
                    "dev_mode": "live",
                    "promoPointsAwarded": false,
                    "anonymous": "both",
                    "currency": "NGN",
                    "disburse": {
                        "amount": 370000,
                        "exchangeRate": 1,
                        "currency": "NGN",
                        "_id": "6485bec9540f6f6433deed04"
                    },
                    "created_at": "2023-06-11T12:32:09.105Z",
                    "updated_at": "2023-06-11T12:32:09.105Z",
                    "hash": "2fq5mp6e3ouo4sh14m6nawzf4grbdnp5ov85v3nb5f72uemnwp"
                }
            ]
        }
    }
}

Verify Transaction

GET {{url}}/v1/transaction/verify/:transactionHash

Returns a verified transaction or an error if no such transaction exists.

Path Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Transaction retrieved successfully.",
    "data": {
        "_id": "64775cf6be2fa624e6c2ca85",
        "trans_id": "423914151",
        "delivery_addr": "Jos, Plateau State",
        "pay_deadline": "2023-06-03T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "andrew21@email.com",
            "referralCode": "VAHL-68151678",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-01T20:41:04.144Z",
                    "_id": "6479026027720b593b7ee0e0"
                },
                "_id": "6479026027720b593b7ee0df"
            }
        },
        "buyer": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151531",
            "email": "james23@email.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-01T20:41:04.144Z",
                    "_id": "6479026027720b593b7ee0e0"
                },
                "_id": "6479026027720b593b7ee0df"
            }
        },
        "products": [
            {
                "name": "Cassava Flour",
                "prod_desc": "Perishable food",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 5500,
                "_id": "64775cf6be2fa624e6c2ca86"
            }
        ],
        "products_price": 5500,
        "is_deposit_made": false,
        "is_delivery_made": true,
        "is_delivery_confirmed": true,
        "is_payment_reminded": false,
        "status": "completed",
        "is_service": false,
        "test": false,
        "fee": 237,
        "vendorFee": 77,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": true,
        "anonymous": "nil",
        "currency": "NGN",
        "created_at": "2023-05-31T14:43:02.288Z",
        "updated_at": "2023-05-31T14:43:02.288Z",
        "hash": "kz5isnw55xpd4fzobd81uvk254n39j4ptszo76rm2ap4xv2vz1",
        "checkoutFee": 70
    }
S

Confirm Delivered Transaction

PATCH {{url}}/v1/transaction/confirm

Returns a transaction with delivery confirmed set to true.

Request Body

{
    "status": true,
    "code": 200,
    "message": "Delivery for this transaction has been confirmed.",
    "data": {
        "_id": "64775cf6be2fa624e6c2ca85",
        "trans_id": "423914151",
        "delivery_addr": "Jos, Plateau State",
        "pay_deadline": "2023-06-03T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "akohvictor1@gmail.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-01T20:41:04.144Z",
                    "_id": "6479026027720b593b7ee0e0"
                },
                "_id": "6479026027720b593b7ee0df"
            }
        },
        "buyer": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "akohvictor1@gmail.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-01T20:41:04.144Z",
                    "_id": "6479026027720b593b7ee0e0"
                },
                "_id": "6479026027720b593b7ee0df"
            }
        },
        "products": [
            {
                "name": "Cassava Flour",
                "prod_desc": "Perishable food",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 5500,
                "_id": "64775cf6be2fa624e6c2ca86"
            }
        ],
        "products_price": 5500,
        "is_deposit_made": false,
        "is_delivery_made": true,
        "is_delivery_confirmed": true,
        "is_payment_reminded": false,
        "status": "completed",
        "is_service": false,
        "test": false,
        "fee": 237,
        "vendorFee": 77,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": true,
        "anonymous": "nil",
        "currency": "NGN",
        "created_at": "2023-05-31T14:43:02.288Z",
        "updated_at": "2023-05-31T14:43:02.288Z",
        "hash": "kz5isnw55xpd4fzobd81uvk254n39j4ptszo76rm2ap4xv2vz1"
    }
}JSON

Make Payment by Card Method Anonymously

POST {{url}}/v1/transaction/:transactionID/pay/card

Make payment for a transaction specified by the path variable transactionID using debit card as an anonymous user

Path Parameters

Request Body

{
    "status": "fail",
    "error": {
        "statusCode": 400,
        "status": "fail",
        "isOperational": true
    },
    "message": "Payment has been made for this transaction."
}

Make Payment by Account Method Anonymously

POST {{url}}/v1/transaction/:transactionID/pay/account

Make payment for a transaction specified by the path variable transactionID using a bank account as an anonymous user

Path Parameters

Request Body

{
    "status": true,
    "code": 200,
    "message": "Payment initiated successfully.",
    "data": {
        "transaction": {
            "dev_mode": "live",
            "_id": "61af2507b143dfcb8396c382",
            "trans_id": "480075038",
            "delivery_addr": "Obalende",
            "pay_deadline": "2021-12-17T00:00:00.000Z",
            "deadline_action": "nothing",
            "seller": {
                "_id": "61a0d3eb780f50d2d3c0b8a1",
                "firstname": null,
                "lastname": null,
                "phone": null,
                "photo": null,
                "username": "Qoyyum",
                "vahlid_id": "68590835",
                "email": "nurudeen96qoyyum@gmail.com",
                "referralCode": "VAHL-68590835",
                "notificationToken": null
            },
            "buyer": {
                "_id": "618559827c7b9bcfbcb8b073",
                "firstname": "Nurudeen",
                "lastname": "Qoyyum",
                "phone": null,
                "photo": "https://res.cloudinary.com/vahlid/image/upload/v1649158065/vahlid_mern/avatar/xxurbh0oyoxojxkqnydy.jpg",
                "username": "CloudNQT",
                "vahlid_id": "68985022",
                "email": "cloudnqt@gmail.com",
                "referralCode": "VAHL-68985022",
                "notificationToken": "fqwvH28_QWCv2bKcwECcoZ:APA91bGKSeS2gyBpwHortzTNp6O2ux2l51zbdtT0dZbc4K5idZY_fJbxfpln2ZhVwDj3o0TDBp57gLpcMNcCrNEr7Qv9wWgdbmKwziyPc52OqXX3zNQ2kHguefyTn1MpGeZzfVC6Z7wd"
            },
            "products": [
                {
                    "name": "Ewa",
                    "prod_desc": "Cool",
                    "prod_price": 200,
                    "_id": "61af2507b143dfcb8396c383"
                }
            ],
            "products_price": 200,
            "is_deposit_made": false,
            "is_delivery_made": false,
            "is_delivery_confirmed": false,
            "is_payment_reminded": false,
            "status": "pending",
            "is_service": true,
            "test": false,
            "fee": 5,
            "vendorFee": 2.8,
            "source": "api",
            "promoPointsAwarded": false,
            "anonymous": "nil",
            "created_at": "2021-12-07T09:10:31.696Z",
            "updated_at": "2021-12-07T09:10:31.696Z",
            "hash": "b7ep9vroh3nrn9r4whkfd2rut663vgad38voquxm7wduvy3dro",
            "currency": "NGN"
        }
    }
}s

Get Single Transaction Anonymously

GET {{url}}/v1/transaction/retrieve/:id

Returns a single transaction specified in the path variable id by an anonymous user

Path Parameters

{
    "status": "success",
    "code": 200,
    "message": "Data retrieved successfully",
    "data": {
        "_id": "61af2507b143dfcb8396c382",
        "trans_id": "480075038",
        "delivery_addr": "Obalende",
        "pay_deadline": "2021-12-17T00:00:00.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "61a0d3eb780f50d2d3c0b8a1",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Qoyyum",
            "vahlid_id": "68590835",
            "email": "nurudeen96qoyyum@gmail.com",
            "referralCode": "VAHL-68590835",
            "notificationToken": null
        },
        "buyer": {
            "_id": "618559827c7b9bcfbcb8b073",
            "firstname": "Nurudeen",
            "lastname": "Qoyyum",
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1649158065/vahlid_mern/avatar/xxurbh0oyoxojxkqnydy.jpg",
            "username": "CloudNQT",
            "vahlid_id": "68985022",
            "email": "cloudnqt@gmail.com",
            "referralCode": "VAHL-68985022",
            "notificationToken": "fqwvH28_QWCv2bKcwECcoZ:APA91bGKSeS2gyBpwHortzTNp6O2ux2l51zbdtT0dZbc4K5idZY_fJbxfpln2ZhVwDj3o0TDBp57gLpcMNcCrNEr7Qv9wWgdbmKwziyPc52OqXX3zNQ2kHguefyTn1MpGeZzfVC6Z7wd"
        },
        "products": [
            {
                "name": "Ewa",
                "prod_desc": "Cool",
                "prod_price": 200,
                "_id": "61af2507b143dfcb8396c383"
            }
        ],
        "products_price": 200,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": true,
        "test": false,
        "fee": 5,
        "vendorFee": 2.8,
        "source": "api",
        "promoPointsAwarded": false,
        "anonymous": "nil",
        "created_at": "2021-12-07T09:10:31.696Z",
        "updated_at": "2021-12-07T09:10:31.696Z",
        "hash": "b7ep9vroh3nrn9r4whkfd2rut663vgad38voquxm7wduvy3dro",
        "__v": 0,
        "currency": "NGN"
    }
}

Store Anonymous Seller Account Information

PUT {{url}}/v1/transaction/:transactionID/account

Stores the bank information of an anonymous user whose a seller gotten from the transaction specified in the path variable transactionID

Path Parameters

Request Body

{
    "status": true,
    "code": 200,
    "message": "Anonymous seller account details updated successfully.",
    "data": {
        "_id": "6478fbb78bd80d2c5ddcd401",
        "currency": "NGN",
        "user": "64525e2c9c29739758c1dadd",
        "__v": 0,
        "bank_code": "044",
        "bank_name": "Abbas Tobi",
        "created_at": "2023-06-01T20:12:39.121Z",
        "dev_mode": "test",
        "name": "Bale Gary",
        "number": "0690000033",
        "source": "developer",
        "updated_at": "2023-06-08T17:51:40.398Z"
    }
}

Get Anonymous Seller Account Information

GET {{url}}/v1/transaction/:transactionID/account?currency=NGN

Get the bank account information of an anonymous user (seller)

Path Parameters

Query Parameters

{
    "status": true,
    "code": 200,
    "message": "Anonymous seller account details retrieved successfully.",
    "data": {
        "_id": "6478fbb78bd86d2c5ddcb201",
        "currency": "NGN",
        "type": "PanAfrican",
        "user": "64525e2c9c29739758c8dadd",
        "__v": 0,
        "bank_code": "044",
        "bank_name": "Abbas Tobi",
        "created_at": "2023-06-01T20:12:39.121Z",
        "dev_mode": "test",
        "name": "Bale Gary",
        "number": "0690000033",
        "source": "developer",
        "updated_at": "2023-06-08T17:51:40.398Z"
    }
}

Accept Terms and Condition by Anonymous User

PATCH {{url}}/v1/transaction/:transactionID/tc?target=buyer

Accept terms and conditions of a transaction specified in the path variable transactionID base on the query variable target which could be either buyer or seller

Path Parameters

Query Parameters

{
    "status": false,
    "code": 404,
    "message": "Transaction not found",
    "errors": []
}

Get List of Recent Transactions

GET {{url}}/v1/transaction/recent/:limit/:filter

Returns list of most recent transactions

Path Parameters

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Transaction retrieved successfully.",
    "data": [
        {
            "_id": "64792b9dc792f00da9c747f4",
            "trans_id": "TEST-517480270",
            "delivery_addr": "Ikorudu, Lagos State",
            "pay_deadline": "2023-06-04T15:46:13.000Z",
            "deadline_action": "nothing",
            "seller": {
                "_id": "64525e2c9c29739758c8dadd",
                "firstname": null,
                "lastname": null,
                "phone": null,
                "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
                "username": "toyabilo3@gmail.com",
                "vahlid_id": "68162524",
                "email": "toyabilo3@gmail.com",
                "notificationToken": null
            },
            "buyer": {
                "_id": "644bb008c3c5e79ac2857cef",
                "firstname": null,
                "lastname": null,
                "phone": null,
                "photo": null,
                "username": "Vicolas",
                "vahlid_id": "68151491",
                "email": "akohvictor1@gmail.com",
                "referralCode": "VAHL-68151491",
                "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
                "terms_conditions": {
                    "accepted": true,
                    "meta": {
                        "transaction": "6473d45cc667f96a3eb3d9f1",
                        "accepted_date": "2023-06-08T19:29:54.963Z",
                        "_id": "64822c32c8548d4c3cff91bb"
                    },
                    "_id": "64822c32c8548d4c3cff91ba"
                }
            },
            "products": [
                {
                    "name": "House Cleaning",
                    "prod_desc": "Cleaning services",
                    "prod_image": "https://www.cleansweepofamerica.com/wp-content/uploads/2020/10/office-cleaning-service.jpeg",
                    "prod_price": 15000,
                    "_id": "64792b9dc792f00da9c747f5"
                }
            ],
            "products_price": 15000,
            "is_deposit_made": false,
            "is_delivery_made": false,
            "is_delivery_confirmed": false,
            "is_payment_reminded": false,
            "status": "pending",
            "is_service": true,
            "test": false,
            "fee": 475,
            "vendorFee": 210,
            "source": "api",
            "dev_mode": "live",
            "promoPointsAwarded": false,
            "anonymous": "buyer",
            "currency": "NGN",
            "disburse": {
                "amount": 15000,
                "exchangeRate": 1,
                "currency": "NGN",
                "_id": "64792b9dc792f00da9c747f6"
            },
            "created_at": "2023-06-01T23:37:01.619Z",
            "updated_at": "2023-06-01T23:37:01.619Z",
            "hash": "gehkukwp7mt3piw4bd3bq7jqzagnxtdja7a73axvrtzi1ov5u3"
        },
    ]
}

Calculate Vahlid Transaction Charge

GET {{url}}/v1/transaction/charge

Calculate Vahlid transaction charges based on the query value passed in the variable amount

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Charges for transaction retrieved successfully.",
    "data": {
        "charge": 225,
        "amount": "5000"
    }
}

Cancel Transaction

GET {{url}}/v1/transaction/cancel/:trans_id

Cancel the Transaction specified in the path variable trans_id by setting the status to cancelled.

Path Parameters

Headers

{
    "status": false,
    "code": 404,
    "message": "Transaction record not found",
    "errors": []
}

Get Total Transaction Sales

GET {{url}}/v1/transaction/sales/total

Return the total amount of completed transaction sales of a user (seller) based on the currency provided in the query value currency.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Total sales retrieved.",
    "data": {
        "totalSales": 5500
    }
}

Get Total Transaction Purchases

GET {{url}}/v1/transaction/purchases/total

Return the total amount of completed transaction purchases of a user (buyer) based on the currency provided in the query value currency.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Total sales retrieved.",
    "data": {
        "totalPurchases": 8000
    }
}

Get Transactions Count

GET {{url}}/v1/transaction/count

Return the number of transactions done by a user.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Transaction count retrieved successfully.",
    "data": {
        "count": 11
    }
}

Search Users' Transactions

GET {{url}}/v1/transaction/search

Return a list of a matched user's transactions based on the value specified in the query variablesearchQuery.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "count": 1,
    "message": "Records searched successfully.",
    "data": [
        {
            "_id": "64775cf6be2fa624e6c2ca85",
            "trans_id": "423914151",
            "delivery_addr": "Jos, Plateau State",
            "pay_deadline": "2023-06-03T13:47:13.000Z",
            "deadline_action": "nothing",
            "products": [
                {
                    "name": "Cassava Flour",
                    "prod_desc": "Perishable food",
                    "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                    "prod_price": 5500,
                    "_id": "64775cf6be2fa624e6c2ca86"
                }
            ],
            "products_price": 5500,
            "is_deposit_made": false,
            "is_delivery_made": true,
            "is_delivery_confirmed": true,
            "is_payment_reminded": false,
            "status": "completed",
            "is_service": false,
            "test": false,
            "fee": 237,
            "vendorFee": 77,
            "source": "developer",
            "dev_mode": "test",
            "promoPointsAwarded": true,
            "anonymous": "nil",
            "currency": "NGN",
            "created_at": "2023-05-31T14:43:02.288Z",
            "updated_at": "2023-05-31T14:43:02.288Z",
            "hash": "kz5isnw55xpd4fzobd81uvk254n39j4ptszo76rm2ap4xv2vz1",
            "__v": 0,
            "seller": [],
            "buyer": []
        }
    ]
}

Get Single Transaction

GET {{url}}/v1/transaction/:trans_id

Returns a single transaction specified in the path variable trans_id

Path Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Transaction retrieved successfully.",
    "data": {
        "_id": "6473d080a0fb841e56bb9aee",
        "trans_id": "TEST-11944705",
        "delivery_addr": "Ikeja, Lagos State",
        "pay_deadline": "2023-06-01T16:45:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabilo3@gmail.com",
            "vahlid_id": "68162524",
            "email": "toyabilo3@gmail.com",
            "notificationToken": null
        },
        "buyer": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "akohvictor1@gmail.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "products": [
            {
                "name": "Jersey",
                "prod_desc": "Basket Jersey",
                "prod_image": "https://res.cloudinary.com/vahlid/image/upload/v1684514773/vahlid_mern/transactions/fod8e23yuxmxo9puxsdd.jpg",
                "prod_price": 9200,
                "_id": "6473d080a0fb841e56bb9aef"
            }
        ],
        "products_price": 9200,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "cancelled",
        "is_service": false,
        "test": false,
        "fee": 330,
        "vendorFee": 128.8,
        "source": "developer",
        "dev_mode": "live",
        "promoPointsAwarded": false,
        "anonymous": "buyer",
        "currency": "NGN",
        "disburse": {
            "amount": 9200,
            "exchangeRate": 1,
            "currency": "NGN",
            "_id": "6473d080a0fb841e56bb9af0"
        },
        "created_at": "2023-05-28T22:06:56.634Z",
        "updated_at": "2023-05-28T22:06:56.634Z",
        "hash": "fzi6u5eit2sxbugva12ejcnnmygrugt32aiwqhkkt5ycb8oj9p"
    }
}K

Get All Transactions for A Single User

GET {{url}}/v1/transaction

Return a list of all the transactions done by a user.

Query Parameters

Headers

{
    "status": "success",
    "code": 200,
    "count": 144,
    "message": "Data retrieved successfully",
    "data": [
        {
            "_id": "647f1a51981d967082432dc8",
            "trans_id": "TEST-988317736",
            "delivery_addr": "Jos, Plateau State",
            "pay_deadline": "2023-06-07T13:47:13.000Z",
            "deadline_action": "nothing",
            "seller": {
                "_id": "64525e2c9c29739758c8dadd",
                "firstname": null,
                "lastname": null,
                "phone": null,
                "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
                "username": "toyabilo3@gmail.com",
                "vahlid_id": "68162524",
                "email": "toyabilo3@gmail.com",
                "notificationToken": null
            },
            "buyer": {
                "_id": "644bb008c3c5e79ac2857cef",
                "firstname": null,
                "lastname": null,
                "phone": null,
                "photo": null,
                "username": "Vicolas",
                "vahlid_id": "68151491",
                "email": "akohvictor1@gmail.com",
                "referralCode": "VAHL-68151491",
                "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
                "terms_conditions": {
                    "accepted": true,
                    "meta": {
                        "transaction": "6473d45cc667f96a3eb3d9f1",
                        "accepted_date": "2023-06-08T19:29:54.963Z",
                        "_id": "64822c32c8548d4c3cff91bb"
                    },
                    "_id": "64822c32c8548d4c3cff91ba"
                }
            },
            "products": [
                {
                    "name": "Irish Potatoes",
                    "prod_desc": "Perishable food",
                    "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                    "prod_price": 5000,
                    "_id": "647f1a51981d967082432dc9"
                }
            ],
            "products_price": 5000,
            "is_deposit_made": false,
            "is_delivery_made": false,
            "is_delivery_confirmed": false,
            "is_payment_reminded": false,
            "status": "pending",
            "is_service": false,
            "test": false,
            "fee": 225,
            "vendorFee": 70,
            "source": "developer",
            "dev_mode": "live",
            "promoPointsAwarded": false,
            "anonymous": "seller",
            "currency": "NGN",
            "created_at": "2023-06-06T11:36:49.033Z",
            "updated_at": "2023-06-06T11:36:49.033Z",
            "hash": "77e831qwt6gwpm8cauv1jkeesbaxbnf5buo7gqfxdfm1f358sk"
        }
    ]
}

Get Transaction Monthly Summary

GET {{url}}/v1/transaction/month-summary

Returns the summary of all completed transactions of a user

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "successful",
    "data": {
        "Jan": 0,
        "Feb": 0,
        "Mar": 0,
        "Apr": 0,
        "May": 5600,
        "Jun": 67800,
        "Jul": 0,
        "Aug": 0,
        "Sep": 0,
        "Oct": 0,
        "Nov": 0,
        "Dec": 0
    }
}

Product Purchase Transaction

POST {{url}}/v1/transaction/product/purchase

Make a purchase for a product. Return a new transaction data populated with buyer and seller data.

Headers

Request Body

{
    "status": true,
    "code": 200,
    "message": "Product purchase transaction created successfully.",
    "data": {
        "trans_id": "TEST-816264995",
        "delivery_addr": "Jos, Plateau State",
        "pay_deadline": "2023-06-10T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabipo6",
            "vahlid_id": "68162524",
            "email": "toyabipo9@gmail.com",
            "notificationToken": null
        },
        "buyer": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151991",
            "email": "vicolas@email.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "products": [
            {
                "name": "Irish Potatoes",
                "prod_desc": "Perishable food",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 5000,
                "_id": "64832fb99cffa2266474564b"
            }
        ],
        "products_price": 5000,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": false,
        "test": true,
        "fee": 225,
        "vendorFee": 70,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": false,
        "anonymous": "seller",
        "currency": "NGN",
        "_id": "64832fb99cffa2266474564a",
        "created_at": "2023-06-09T13:57:13.435Z",
        "updated_at": "2023-06-09T13:57:13.435Z",
        "hash": "5821mcxoi4vcwnkgm59owi6pk91dzxsvmpui7tjhzhorIRy597"
    }
}

Service Purchase Transaction

POST {{url}}/v1/transaction/service/purchase

Make a purchase for service(s). Return a new transaction data populated with buyer and seller data.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Service purchase transaction successfully created.",
    "data": {
        "trans_id": "TEST-677252295",
        "delivery_addr": "Kwali, Abuja",
        "pay_deadline": "2023-06-10T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "618559827c7b9bcfbcb8b073",
            "firstname": "Nurudeen",
            "lastname": "Qoyyum",
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1649158065/vahlid_mern/avatar/xxurbh0oyoxojxkqnydy.jpg",
            "username": "CloudNQT",
            "vahlid_id": "68985022",
            "email": "cloudnqt@gmail.com",
            "referralCode": "VAHL-68985022",
            "notificationToken": "fqwvH28_QWCv2bKcwECcoZ:APA91bGKSeS2gyBpwHortzTNp6O2ux2l51zbdtT0dZbc4K5idZY_fJbxfpln2ZhVwDj3o0TDBp57gLpcMNcCrNEr7Qv9wWgdbmKwziyPc52OqXX3zNQ2kHguefyTn1MpGeZzfVC6Z7wd"
        },
        "buyer": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "akohvictor1@gmail.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "products": [
            {
                "name": "Lesson",
                "prod_desc": "Home lesson for kids",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 113000,
                "_id": "64833aa99cffa22664745676"
            }
        ],
        "products_price": 113000,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": true,
        "test": true,
        "fee": 2925,
        "vendorFee": 1582,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": false,
        "anonymous": "nil",
        "currency": "NGN",
        "_id": "64833aa99cffa22664745675",
        "created_at": "2023-06-09T14:43:53.092Z",
        "updated_at": "2023-06-09T14:43:53.092Z",
        "hash": "jmd123a8nz2dobtrqrjnasne2p6b7ifh73jsoxc9rg9dxi3mov"
    }
}

Product Sale Transaction

POST {{url}}/v1/transaction/product/sale

Make sales for a product(s). Return a new transaction data populated with buyer and seller data.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Product sale transaction has been successfully created.",
    "data": {
        "trans_id": "TEST-503028339",
        "delivery_addr": "Jos, Plateau State",
        "pay_deadline": "2023-06-10T15:27:16.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "vicola2gmail.com",
            "referralCode": "VAHL-68152491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "buyer": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabipo1",
            "vahlid_id": "68160524",
            "email": "toyabilp23@gmail.com",
            "notificationToken": null
        },
        "products": [
            {
                "name": "Toy",
                "prod_desc": "Perishable toy",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 2500,
                "_id": "64833f209cffa2266474568d"
            }
        ],
        "products_price": 2500,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": false,
        "test": false,
        "fee": 62,
        "vendorFee": 35,
        "source": "developer",
        "dev_mode": "live",
        "promoPointsAwarded": false,
        "anonymous": "buyer",
        "currency": "NGN",
        "_id": "64833f209cffa2266474568c",
        "created_at": "2023-06-09T15:02:56.807Z",
        "updated_at": "2023-06-09T15:02:56.807Z",
        "hash": "jogc42w45ey2k3bpw2q578sojsmngynrk6b44hxr6y3xdt9fvj"
    }
}

Service Sale Transaction

POST {{url}}/v1/transaction/service/sale

Make sales for service(s). Return a new transaction data populated with buyer and seller data.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Service sale transaction successfully created.",
    "data": {
        "trans_id": "TEST-520549503",
        "delivery_addr": "Otukpo, Benue State",
        "pay_deadline": "2023-06-11T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "akohvictor1@gmail.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "buyer": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabilo3@gmail.com",
            "vahlid_id": "68162524",
            "email": "toyabilo3@gmail.com",
            "notificationToken": null
        },
        "products": [
            {
                "name": "Cleaning",
                "prod_desc": "House cleaning",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 5000,
                "_id": "648340c99cffa226647456a1"
            }
        ],
        "products_price": 5000,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": true,
        "test": true,
        "fee": 225,
        "vendorFee": 70,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": false,
        "anonymous": "buyer",
        "currency": "NGN",
        "_id": "648340c99cffa226647456a0",
        "created_at": "2023-06-09T15:10:01.220Z",
        "updated_at": "2023-06-09T15:10:01.220Z",
        "hash": "p3913ps22vt4d5chvizhdjgnqeevfcfkt3gyreayjzybh15p8s"
    }
}

Confirm Transaction Delivery Made

POST {{url}}/v1/transaction/ive-delivered

Return transaction data specified in the request body with is_delivery_made field set to true.

Headers

Request Body

{
    "status": false,
    "code": 400,
    "message": "Delivery has been made already.",
    "errors": []
}

Make Payment and Confirm Transaction Delivery

POST {{url}}/v1/transaction/confirm-delivery

Initiate the payment to the seller of the transaction specified by the trans_id provided in the request body, and proceed to confirm the payment and mark the transaction as complete. Return transaction data specified in the request body with is_delivery_confirmed field set to true and status set to complete.

Headers

Request Body

{
    "status": false,
    "code": 400,
    "message": "Transaction record not foundjs.",
    "errors": []
}

Initialize Transaction

POST {{url}}/v1/transaction/initialize

Generates direct payment link with Flutterwave.

Headers

Request Body

{
    "status": false,
    "code": 404,
    "message": "Transaction not found.",
    "errors": []
}

Initialize Transaction Anonymously

POST {{url}}/v1/transaction/sales

Initializes a purchase transaction. Returns a Vahlid Link - in the format - https://checkout.vahlid.com/transaction/{{HASH}}/track. This link can be used by the customer to track the status of the transaction in realtime.

Headers

Request Body

{
    "status": true,
    "code": 200,
    "message": "Product sale transaction has been successfully created.",
    "data": {
        "link": "https://vahlid-checkout-test.onrender.com/transaction/133qrp9n84bcixd2yq7749fm821xfd319eikdq94pv2ewfjc2n/track",
        "transaction_hash": "133qrp9n84bcixd2yq7749fm821xfd319eikdq94pv2ewfjc2n"
    }
}

Make Payment to Seller and Confirm Transactions

POST {{url}}/v2/transactions/confirm

Initiate the payment to the seller of the transaction specified by the trans_id provided in the request body, and proceed to confirm the payment and mark the transaction as complete. Return transaction data specified in the request body with is_delivery_confirmed field set to true and status set to complete.

Headers

Request Body

{
    "status": true,
    "code": 200,
    "message": "success",
    "data": {
        "_id": "64775c8ebe2fa624e6c2ca77",
        "trans_id": "933283739",
        "delivery_addr": "Jos, Plateau State",
        "pay_deadline": "2023-06-02T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "akohvictor1@gmail.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "buyer": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabilo3@gmail.com",
            "vahlid_id": "68162524",
            "email": "toyabilo3@gmail.com",
            "notificationToken": null
        },
        "products": [
            {
                "name": "Yam Flour",
                "prod_desc": "Perishable food",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 2500,
                "_id": "64775c8ebe2fa624e6c2ca78"
            }
        ],
        "products_price": 2500,
        "is_deposit_made": true,
        "is_delivery_made": true,
        "is_delivery_confirmed": true,
        "is_payment_reminded": false,
        "status": "completed",
        "is_service": false,
        "test": false,
        "fee": 62,
        "vendorFee": 35,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": false,
        "anonymous": "buyer",
        "currency": "NGN",
        "created_at": "2023-05-31T14:41:18.733Z",
        "updated_at": "2023-05-31T14:41:18.733Z",
        "hash": "j5mphvppbqastsiwa615f5nmxdj8acah1x8qmm9u121inwx5cz"
    }
}

Confirm Transaction Delivery Made

POST {{url}}/v2/transactions/ive-delivered

Return transaction data specified in trans_id in the request body with is_delivery_made field set to true.

Headers

Request Body

{
    "status": true,
    "code": 200,
    "message": "success",
    "data": {
        "_id": "64775c8ebe2fa624e6c2ca77",
        "trans_id": "933283739",
        "delivery_addr": "Jos, Plateau State",
        "pay_deadline": "2023-06-02T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "vicolas@gmail.com",
            "referralCode": "VAHL-68151401",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "buyer": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabilo",
            "vahlid_id": "68162524",
            "email": "toyabilp9@email.com",
            "notificationToken": null
        },
        "products": [
            {
                "name": "Yam Flour",
                "prod_desc": "Perishable food",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 2500,
                "_id": "64775c8ebe2fa624e6c2ca78"
            }
        ],
        "products_price": 2500,
        "is_deposit_made": true,
        "is_delivery_made": true,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": false,
        "test": false,
        "fee": 62,
        "vendorFee": 35,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": false,
        "anonymous": "buyer",
        "currency": "NGN",
        "created_at": "2023-05-31T14:41:18.733Z",
        "updated_at": "2023-05-31T14:41:18.733Z",
        "hash": "j5mphvppbqastsiwa615f5nmxdj8acah1x8qmm9u121inwx5cz"
    }
}

Cancel Transaction

GET {{url}}/v2/transactions/cancel/:trans_id

Cancel Transaction specified in the path variable trans_id, by setting the status field to cancelled.

Path Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Transaction cancelled successfully",
    "data": {
        "dev_mode": "live",
        "_id": "61ae25afa8367b20f16d864d",
        "trans_id": "99264006",
        "delivery_addr": "Obalende",
        "pay_deadline": "2021-12-18T00:00:00.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "618559827c7b9bcfbcb8b073",
            "firstname": "Nurudeen",
            "lastname": "Qoyyum",
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1649158065/vahlid_mern/avatar/xxurbh0oyoxojxkqnydy.jpg",
            "username": "CloudNQT",
            "vahlid_id": "68985022",
            "email": "cloudnqt@gmail.com",
            "referralCode": "VAHL-68985022",
            "notificationToken": "fqwvH28_QWCv2bKcwECcoZ:APA91bGKSeS2gyBpwHortzTNp6O2ux2l51zbdtT0dZbc4K5idZY_fJbxfpln2ZhVwDj3o0TDBp57gLpcMNcCrNEr7Qv9wWgdbmKwziyPc52OqXX3zNQ2kHguefyTn1MpGeZzfVC6Z7wd"
        },
        "buyer": {
            "_id": "61a0d3eb780f50d2d3c0b8a1",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Qoyyum",
            "vahlid_id": "68590835",
            "email": "nurudeen96qoyyum@gmail.com",
            "referralCode": "VAHL-68590835",
            "notificationToken": null
        },
        "products": [
            {
                "name": "Ac",
                "prod_desc": "Brand New",
                "prod_image": "https://res.cloudinary.com/vahlid/image/upload/v1638802861/vahlid_mern/transactions/aukkiphfnv5eis4lmfyq.jpg",
                "prod_price": 300,
                "_id": "61ae25afa8367b20f16d864e"
            }
        ],
        "products_price": 300,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "cancelled",
        "is_service": false,
        "test": false,
        "fee": 7,
        "vendorFee": 4.2,
        "source": "api",
        "promoPointsAwarded": false,
        "anonymous": "nil",
        "created_at": "2021-12-06T15:01:03.108Z",
        "updated_at": "2021-12-06T15:01:03.108Z",
        "hash": "i1ak1g9wgtyuby4twa4izqp53hh2nf83gvny6qyji56rpcbrty",
        "currency": "NGN"
    }
}

Product Purchase Transaction

POST {{url}}/v2/transactions/product/purchase

Make a purchase for a product. Return a new transaction data populated with buyer and seller data.

Headers

Request Body

{
    "status": true,
    "code": 200,
    "message": "Product purchase transaction created successfully.",
    "data": {
        "trans_id": "TEST-816264995",
        "delivery_addr": "Jos, Plateau State",
        "pay_deadline": "2023-06-10T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabipo6",
            "vahlid_id": "68162524",
            "email": "toyabipo9@gmail.com",
            "notificationToken": null
        },
        "buyer": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151991",
            "email": "vicolas@email.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "products": [
            {
                "name": "Irish Potatoes",
                "prod_desc": "Perishable food",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 5000,
                "_id": "64832fb99cffa2266474564b"
            }
        ],
        "products_price": 5000,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": false,
        "test": true,
        "fee": 225,
        "vendorFee": 70,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": false,
        "anonymous": "seller",
        "currency": "NGN",
        "_id": "64832fb99cffa2266474564a",
        "created_at": "2023-06-09T13:57:13.435Z",
        "updated_at": "2023-06-09T13:57:13.435Z",
        "hash": "5821mcxoi4vcwnkgm59owi6pk91dzxsvmpui7tjhzhorIRy597"
    }
}J

Product Sale Transaction

POST {{url}}/v2/transactions/product/sale

Make sales for a product. Return a new transaction data populated with buyer and seller data.

Headers

Request Body

{
    "status": true,
    "code": 200,
    "message": "Product sale transaction has been successfully created.",
    "data": {
        "trans_id": "TEST-503028339",
        "delivery_addr": "Jos, Plateau State",
        "pay_deadline": "2023-06-10T15:27:16.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "vicola2gmail.com",
            "referralCode": "VAHL-68152491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "buyer": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabipo1",
            "vahlid_id": "68160524",
            "email": "toyabilp23@gmail.com",
            "notificationToken": null
        },
        "products": [
            {
                "name": "Toy",
                "prod_desc": "Perishable toy",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 2500,
                "_id": "64833f209cffa2266474568d"
            }
        ],
        "products_price": 2500,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": false,
        "test": false,
        "fee": 62,
        "vendorFee": 35,
        "source": "developer",
        "dev_mode": "live",
        "promoPointsAwarded": false,
        "anonymous": "buyer",
        "currency": "NGN",
        "_id": "64833f209cffa2266474568c",
        "created_at": "2023-06-09T15:02:56.807Z",
        "updated_at": "2023-06-09T15:02:56.807Z",
        "hash": "jogc42w45ey2k3bpw2q578sojsmngynrk6b44hxr6y3xdt9fvj"
    }
}

Service Purchase Transaction

POST {{url}}/v2/transactions/service/purchase

Make a purchase for service(s). Return a new transaction data populated with buyer and seller data.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Service purchase transaction successfully created.",
    "data": {
        "trans_id": "TEST-677252295",
        "delivery_addr": "Kwali, Abuja",
        "pay_deadline": "2023-06-10T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "618559827c7b9bcfbcb8b073",
            "firstname": "Nurudeen",
            "lastname": "Qoyyum",
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1649158065/vahlid_mern/avatar/xxurbh0oyoxojxkqnydy.jpg",
            "username": "CloudNQT",
            "vahlid_id": "68985022",
            "email": "cloudnqt@gmail.com",
            "referralCode": "VAHL-68985022",
            "notificationToken": "fqwvH28_QWCv2bKcwECcoZ:APA91bGKSeS2gyBpwHortzTNp6O2ux2l51zbdtT0dZbc4K5idZY_fJbxfpln2ZhVwDj3o0TDBp57gLpcMNcCrNEr7Qv9wWgdbmKwziyPc52OqXX3zNQ2kHguefyTn1MpGeZzfVC6Z7wd"
        },
        "buyer": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "akohvictor1@gmail.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "products": [
            {
                "name": "Lesson",
                "prod_desc": "Home lesson for kids",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 113000,
                "_id": "64833aa99cffa22664745676"
            }
        ],
        "products_price": 113000,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": true,
        "test": true,
        "fee": 2925,
        "vendorFee": 1582,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": false,
        "anonymous": "nil",
        "currency": "NGN",
        "_id": "64833aa99cffa22664745675",
        "created_at": "2023-06-09T14:43:53.092Z",
        "updated_at": "2023-06-09T14:43:53.092Z",
        "hash": "jmd123a8nz2dobtrqrjnasne2p6b7ifh73jsoxc9rg9dxi3mov"
    }
}

Service Sale Transaction

POST {{url}}/v2/transactions/service/sale

Make sales for service(s). Return a new transaction data populated with buyer and seller data.

Query Parameters

Headers

{
    "status": true,
    "code": 200,
    "message": "Service sale transaction successfully created.",
    "data": {
        "trans_id": "TEST-520549503",
        "delivery_addr": "Otukpo, Benue State",
        "pay_deadline": "2023-06-11T13:47:13.000Z",
        "deadline_action": "nothing",
        "seller": {
            "_id": "644bb008c3c5e79ac2857cef",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": null,
            "username": "Vicolas",
            "vahlid_id": "68151491",
            "email": "akohvictor1@gmail.com",
            "referralCode": "VAHL-68151491",
            "notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
            "terms_conditions": {
                "accepted": true,
                "meta": {
                    "transaction": "6473d45cc667f96a3eb3d9f1",
                    "accepted_date": "2023-06-08T19:29:54.963Z",
                    "_id": "64822c32c8548d4c3cff91bb"
                },
                "_id": "64822c32c8548d4c3cff91ba"
            }
        },
        "buyer": {
            "_id": "64525e2c9c29739758c8dadd",
            "firstname": null,
            "lastname": null,
            "phone": null,
            "photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
            "username": "toyabilo3@gmail.com",
            "vahlid_id": "68162524",
            "email": "toyabilo3@gmail.com",
            "notificationToken": null
        },
        "products": [
            {
                "name": "Cleaning",
                "prod_desc": "House cleaning",
                "prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
                "prod_price": 5000,
                "_id": "648340c99cffa226647456a1"
            }
        ],
        "products_price": 5000,
        "is_deposit_made": false,
        "is_delivery_made": false,
        "is_delivery_confirmed": false,
        "is_payment_reminded": false,
        "status": "pending",
        "is_service": true,
        "test": true,
        "fee": 225,
        "vendorFee": 70,
        "source": "developer",
        "dev_mode": "test",
        "promoPointsAwarded": false,
        "anonymous": "buyer",
        "currency": "NGN",
        "_id": "648340c99cffa226647456a0",
        "created_at": "2023-06-09T15:10:01.220Z",
        "updated_at": "2023-06-09T15:10:01.220Z",
        "hash": "p3913ps22vt4d5chvizhdjgnqeevfcfkt3gyreayjzybh15p8s"
    }
}

Last updated