Fund Sub-Ledger Account

To fund a sub-ledger account from outside your organization, send money to the virtual account number (i.e virtual NUBAN) that is linked to the sub-ledger account. This money will then settle into the deposit account that is linked to the sub-ledger account, which in this case is the Organization FBO Account.

πŸ“˜

When a virtual account number (virtual NUBAN) receives money, we send you two webhook events: payment.received and payment.settled.

payment.received event is sent when a virtual account number (virtual NUBAN) receives money. When the money is settled into the deposit account the virtual NUBAN is attached to, we send you payment.settled event.

To fund a sub-ledger account (subaccount) from within your organization, make a BookTransfer to the subaccount Id. To learn more about book transfer here.

Sample request payload to make a BookTransfer to a subaccount and 200 OK response are given below:

curl --request POST \
     --url https://api.sandbox.getanchor.co/api/v1/transfers \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-anchor-key: <API Key>' \
     --data '
{
  "data": {
    "attributes": {
      "currency": "NGN",
      "amount": 10000,
      "reason": "Payment",
      "reference": "ancsub_12"
    },
    "relationships": {
      "destinationAccount": {
        "data": {
          "type": "SubAccount",
          "id": "16922609922041-anc_subacc"
        }
      },
      "account": {
        "data": {
          "type": "SubAccount",
          "id": "16932376220293-anc_subacc"
        }
      }
    },
    "type": "BookTransfer"
  }
}
'
{
  "data": {
    "id": "170167815150857-anc_trsf",
    "type": "BOOK_TRANSFER",
    "attributes": {
      "reference": "ancsub_12",
      "createdAt": "2023-12-04T08:22:31.510862",
      "reason": "Payment",
      "amount": 10000,
      "currency": "NGN",
      "status": "COMPLETED"
    },
    "relationships": {
      "destinationSubAccount": {
        "data": {
          "id": "16922609922041-anc_subacc",
          "type": "SubAccount"
        }
      },
      "sourceSubAccount": {
        "data": {
          "id": "16932376220293-anc_subacc",
          "type": "SubAccount"
        }
      },
      "destinationAccount": {
        "data": {
          "id": "16922123768364-anc_acc",
          "type": "DepositAccount"
        }
      },
      "account": {
        "data": {
          "id": "16922123768364-anc_acc",
          "type": "DepositAccount"
        }
      },
      "customer": {
        "data": {
          "id": "16922123736510-anc_bus_cst",
          "type": "BusinessCustomer"
        }
      }
    }
  }
}