Splitting Payouts to Parents' Wallet and Bank Account

In this scenario, we’ll set an event trigger to automatically transfer a percentage of your PayMongo payouts to the Parents’ PayMongo Wallet before disbursing the remaining amount directly to your Bank Account.

Create the Workflow

You can use the Create a Workflow endpoint to create the workflow. The workflow schema can be as follows:

You can use the Create a Workflow endpoint to create the workflow. The workflow schema can be as follows:

version: 1
name: "Send money from my wallet to parent wallet and bank account"
description: "Send money from my wallet to parent wallet and bank account"
steps:
    - send_money:
        source:
            type: "wallet"
            account: "${merchant_account_number}"
        destination:
            type: "wallet"
            account: "7754473456987" # CHANGE THIS
            account_name: "ParrentAccount1" # CHANGE THIS
            bic: "PAEYPHM2XXX"
        provider: "paymongo"
        amount: "0.1 * ${net_amount}" #10 percent of the payout amount
        currency: "PHP"
        notes: "Received money from Payout disbursement"
    - send_money:
        source:
            type: "wallet"
            account: "${merchant_account_number}"
        destination:
            type: "bank"
            account: "000010094477"
            account_name: "Amazing Cookie Store"
            bic: "UBPHPHMMXXX"
        provider: "instapay"
        amount: "0.9 * ${net_ammount}" #90 percent of the payout amount
        currency: "PHP"
        notes: "Payout Disbursement"

The specified workflow definition above will run these operations:

  • Transfer 10% of the payout amount received in your PayMongo Wallet to the Parents’ Account PayMongo Wallet.
  • Transfer the remaining 90% of the received payout amount to your Bank Account.

The percentage is adjustable depending on your needs. There are several changes that you need to make:

  • Parents’ account PayMongo Wallet account name and number
  • Destination bank account number, account name, BIC, and provider. Instapay can only support transfers up to 50k PHP. To transfer more than 50k PHP, please use Pesonet.

Setting up the Event Trigger

To set up your trigger to automatically run the created Workflow, use the Create a Trigger endpoint. You can set the request body as follows:

{
    "workflow_id": "<CHANGE THIS>",
    "condition": {
        "event_name": "payout.deposited",
        "channel": "paymongo"
    }
}

Based on the payload above, you only need to change the workflow_id based on the workflow ID that you created in the step before. After the trigger is successfully activated, whenever you receive a payout from PayMongo to your PayMongo wallet, the workflow you created will run automatically.