Creating a suspense transaction record upon denial

When a program has the suspense transaction configuration enabled, if a transaction posting is denied (due to an account's status, technical issues, and so on) the transaction is posted as a credit transaction into a suspense account. From this account, a banker can examine the transaction and either confirm the denial or manually approve the transaction.

In order for a transaction to have the option of being manually posted in the future, the payment must be made with the allow_suspense_posting property, in the Initiate a payment endpoint.

In order to list the suspense transactions in a division, use the Get division suspense transactions endpoint:

curl --request GET \
     --url \
     --header 'Accept: application/json'

This returns a list of suspense transactions and the current suspense balance, which is a sum of the amount of all suspense transactions in the PENDING state

  "suspense_balance": 200,
  "suspense_transactions": [
      "id": "19b11871-fb7d-4421-bf81-64a6139080ae",
      "account_id": 102511743,
      "status": "PENDING",
      "reason": "WP2P0002",
      "type": "CASHIN",
      "processing_code": "007400",
      "amount": 200,
      "created_at": "2022-02-10T15:28:54.013553543Z"

Once the ID is retrieved by this GET endpoint, it can be used to clear the suspense transaction by approving it or denying it through the usage of the Clear a suspense transaction endpoint.

curl --request POST \
     --url \
     --header 'Content-Type: application/json' \
     --data '
     "id": "dd671453-a634-4f8f-aa2c-bb9262738161",
     "status": "PROCESSED",
     "account_id": 102701621