Tokens are used in place of personal/banking details. Once a token is generated it can be stored safely as part of a
users profile for example.
Retrieving API owner tokens
Each organization registered contains a token ID.
The IDs are updated if the banking details are changed when editing your profile.
A list of organizations IDs are retrieved as follows:
Query:
Response:
Creating a Token
For regular users a token must be generated before they can be added to a transaction.
A token can be created as follows:
The banking and organization details are optional however users cannot receive a payout without providing their banking
details.
Query:
Response:
Transactions
Querying
Listing All Transactions
You can retrieve a list of transactions using the transactions query.
The query allows you to receive a paginated list of all transactions.
A full list of available fields can be found in the GraphQL Schema which can be viewed in
the playground
The paginatorInfo block has a number of helpful values to page through the list of transactions.
The speed of this query is heavily impacted by the amount of data requested. It is recommended you only
retrieve the data that is required.
Query:
Variables:
The first and page allow you to query a specific part of the transaction list. First sets the number of results to return while page sets the group of transactions to return.
For example first: 10 and page: 3 will return 21st through to the 30th transaction in the list.
Response:
Retrieving a single Transaction
Querying a transaction is much like getting a list of transactions. However, you need to provide the transaction id.
Query:
Variables:
Response:
Creating a Transaction
Once you have tokens for each of the parties that you would like to add to the transaction. Thee transaction itself can
be created.
The following creates a simple transaction between a buyer, seller and agent.
Query:
Variables:
Response:
Deposits
Once a transaction has been created the buyer needs to be prompted to deposit the funds. A payment link needs to be
generated first.
The following generates a payment link. The buyer can then be directed to the link and complete the payment. They will
be redirected back to either the success, failure/cancel urls.
Mutation:
Variables:
Response:
Start Delivery
Once the funds have been received, and the transaction is in the FUNDS_RECEIVED state.
The allocation and transaction will be updated to the INITIATED state.
Query:
Variables:
Response:
Accept Delivery
Once the buyer has received the goods or service they can then accept the delivery.
Once all allocations have been accepted, the transaction will transition to the FUNDS_RELEASED once the funds have
been paid.
Query:
Variables:
Response:
Callbacks
Everytime a transaction is updated a callback will be sent to the url provided when registering your application.