Transactions
View a Transaction
The transaction
query is the is one of the most important queries as it provides all the information needed to
interact with a transaction.
When viewing a transaction it is recommended to keep the query as small as possible to ensure you get a quick response from the API
Query
Result
List Transactions
Transactions can be listed through the transactions
query.
When listing transactions it is recommended to keep the query as small as possible to ensure you get a quick response from the API
Create a Transaction
The transactionCreate
mutation is used to create transactions on the API and requires that you have all the necessary
data available before you start; for this reason we recommend that this mutation only be called at the beginning of your
checkout process.
There are several parts to a transaction. They can be summarised as follows:
- Transaction Information
- Allocations
- Parties (Users in a transaction)
Transaction Information
The basic information about a transaction includes the following:
- Title - A title clearly identifying the transaction
- Description - More information about the transaction. This could be an itemised product list or the terms of transaction.
- Industry - Which industry the transaction is for.
- Fee Allocation - Who will pay the escrow processing fee
- Workflow - The type of workflow you want to use Standard (One payment), Milestone or Drawdown
- Reference - A unique reference from your application
Allocations
Allocations are used to assign funds to a particular action. A simple example would be delivery of goods, or a service. A more complex example would be a project with multiple phases, and a portion of the funds assigned to each phase.
Parties
Parties are users or organizations that are associated with the transaction. Each party has a role assigned to them. A simple transaction requires two parties namely a buyer and seller, however you can add an agent and along with other beneficiaries.
One allocation
Multiple allocations
Drawdowns
Creating a drawdown transaction only requires a single allocation. This allocation will be used as the pool of funds used for the drawdown process.
The key difference from a transaction with a single allocation is the workflow
field which is set to DRAWDOWN
.
Update a transaction
Updating a transaction works much like the createTransaction
mutation. The key difference is that the keys for nested
mutations (allocations and parties) reflect the action you want to achieve (create, update, delete)
Cancel or Refund a transaction
When calling transactionCancel
the transaction will be cancelled and the funds will be refunded to the buyer if a
deposit has been made.
Delete a transaction
If a transaction is still in the CREATED
state is can be deleted using the transactionDelete
mutation