Create a transaction
Creating transactions with the Trustcrow API is straight forward. Consider a simple transaction between myself and a seller, where I am buying 3 bags of cements for NGN500,000.
Create a new transaction
POST
{{api_url}}/v1/transactions
Headers
Accepts
string
application/json
Authorization
string
your Trustcrow API keys with which you authorize customers.
As an example, you can a make a post request to the endpoint above and pass in the raw json data below to create an escrow transaction.
We represent a transaction with a Transaction object. Within the transaction object, we have different attributes.
During transaction creation we use the parties attribute to determine the role of each customer in a transaction. There are two different roles: buyer and seller. It is important to set the customers to their correct role as it cannot be changed once the transaction has been started. Certain actions are only able to be performed by certain roles, such as accepting items.
The buyer in the transaction is the customer that is purchasing the items in the transaction. They are required to fund the transaction and accept the items after the inspection period.
The seller in the transaction is the customer that is providing the items in the transaction. They are required to ship the items to the buyer, and have their funds disbursed after the buyer accepts the items.
Note
The current model of transactions supports two participants: one buyer and one seller. However the API may support more roles in the future.
Last updated