Funding a Receiving Institution

Every transfer in or out of your Paymongo Wallet or banks(with similar event attribute) will generate the following event.

{
  "id"                        : "d5e368c6-5077-40fc-bff3-5164617e42bc",
  "direction"                 : "in",
  "method"                    : "BIFAST",
  "internal_bic"              : "PAEYPHM2",
  "internal_account_id"       : "506285930632",
  "resulting_account_balance" : 600000,
  "external_bic"              : "BUSTIDJ1",
  "external_account_number"   : "770007888808",
  "external_sender_name"      : "VINCENT TJIANATTAN",
  "external_reference_number" : "BF25070600395675",
  "notes"                     : "TX1234567890",
  "currency"                  : "IDR",
  "amount"                    : 1000000,
  "fees"                      : 0,
  "metadata" : {
    "transaction_purpose" : 2
  }
}

You can then use the following event pattern to filter the following.

{
  "internal_bic": ["PAEYPHM2"],
  "internal_account_id" : ["506285930632"],
  "currency": ["IDR"],
  "resulting_account_balance": [ { "numeric": [ "<=", 1000000 ] } ]
}

The event pattern above will trigger whenever the resulting account balance of your paymongo wallet is less than 1.000.000 IDR

Then you can use the following to trigger a funding to your paymongo wallet @workflow-fund_money_from_bca

version: 1
name: Send Money via Bifast

jobs:
  send-money:
    integration: "bca"
    account: 5271639857
    steps:
      - uses: bifast
        currency: "IDR"
        amount: "100000000"
        destination: $contacts.self
        purpose: 02
        remark: "Auto Funding from BCA to Paymongo Wallet" # optional
        on-failure: "@slack-fail-auto-funding-notification Failed auto funding from BCA to Paymongo Wallet"

The workflow above will automatically send money from your BCA account to Paymongo Wallet.