Version: current

STEP 7 - Approve or Reject a Transaction

Authorization of transactions is dependent on Custodian Approval in two ways.

a) A real User Custodian approves or rejects via the mobile Qredo Signing App on their phone. b) A programmatic 'Core Client Custodian approves or rejects via the websocket.

This section focuses on Core Client approvals/rejections.

You required fields are:

  • client_id obtained when you created a Core Client in Step 3.
  • action_id obtained from the Websocket Feed or below.
  1. Perform a GET request to view all pending actions.
GET /coreclient/{client_id}/actions

The Response body returns the following:

  • count - the number of pending actions.
  • actions - details of the action.
  • id - the ACTION ID you provided.
  • type - The type of action. e.g. ApproveTransfer
  • status - The status of the action. e.g. Pending
  • timestamp - The time it was created in epoch.
  • expireTime - The time it expires in epoch if not approved.

Example core client action response#

{
"count": 0,
"actions": [
{
"id": "<ACTION_ID>",
"type": "<TYPE_OF_ACTION>",
"status": "<STATUS>",
"timestamp": <EPOCH_TIME>,
"expireTime": <EPOCH_TIME>
}
]
}
info

Partner defined logic determines how transactions are approved or rejected.

How to Approve a Transaction (via Core Client)#

  1. Perform a PUT request to approve an action
PUT /coreclient/{client_id}/action/{action_id}

Example 1. approve withdraw action response#

The approve withdraw response returns the following:

  • id - The Action ID.
  • type - The type of action. e.g. ApproveWithdraw
  • status - The status of the action. e.g. Approved
  • timestamp - The time it was created in epoch.
  • expireTime - The time it would have expired in epoch if not approved.
  • details - Approved transaction full details.
  • recipientAddress - The whitelisted counterparty address.
  • recipientAddressName - The memorable name for the whitelisted counterparty address.
{
"id": "string",
"type": "ApproveWithdraw",
"status": "approved",
"timestamp": 0,
"expireTime": 0,
"details": {
"txType": "string",
"txID": "string",
"asset": "string",
"amount": 0,
"fees": 0,
"netAmount": 0,
"reference": "string",
"benefitOf": "string",
"accountNo": "string",
"companyID": "string",
"fundID": "string",
"initiatedTime": 0,
"expires": 0,
"recipientAddress": "string",
"recipientAddressName": "string",
"initiatedBy": "string",
"initiatorName": "string",
"initiatorType": "string"
}
}

Example 2. Approve transfer action response.#

The approve transfer response returns the following:

  • id - The Action ID.
  • type - The type of action. e.g. ApproveTransfer
  • status - The status of the action. e.g. Approved
  • timestamp - The time it was created in epoch.
  • expireTime - The time it would have expired in epoch if not approved.
  • details - Approved transaction full details.
  • recipientID - This is the Counterparty ID.
  • recipientName - This is the Counterparty name.

How to Reject a Transaction (via the Core Client)#

  1. Perform a DELETE request to reject a transaction.
DELETE /coreclient/{client_id}/action/{action_id}

Example 3. Reject a transaction response#

The response is the same as for the earlier examples except for the Action Status:

"status": "rejected",