Workflow Logic
Overview
This section provides further information on the following workflow logic that you can utilize for your automated financial needs.
Await
You would normally chain this event with another function to await for money in or an event from your application. Such as an escrow or transaction finish.
version: 1
name: Await for an Event
jobs:
await:
integration: "paymongo"
account: 506285930632
steps:
- uses: await_for_event
event_pattern: |
{
"direction": ["in"],
"internal_terminal_id": ["PAEYPHM2"],
"internal_account_id" : ["506285930632"],
"external_terminal_id": ["CENAIDJA"],
"external_account_number": ["5271639857"],
"currency": ["IDR"],
"amount": [ $input.amount ],
"notes": ["Automated funding to Paymongo Wallet"]
}
timeout: "1h"
on-failure: "@workflow-failed(destination=\"CENAIDJA;506285930632\")"
Field | Required | Values |
---|---|---|
event_pattern | Required | JSON format, same to how rules are defined |
timeout | Optional | By default it will be set to 1 hour |
on-failure | Optional | Action that need to be triggered if the timeout runs out, this can be a reversal of fund or other function you wanted to execute. By default if not set it will not do anything |
API Call
You can use the following functions to call an API of your choice to get data, which then can be cross-reference as the $output.stage_name.step_name
format.
JSON API ResponseThe API response must be a parsable JSON.
It is highly recommended that you setup any authorization header needed in the HTTP integration first as it will append those headers to the request.
version: 1
name: API Call
jobs:
call_an_api:
integration: http
account: "Paymongo_API"
steps:
- uses: http
url: https://api.paymongo.com/get_data/<uuid>
payload: "{}"
method: "POST"
headers: "{\"header-key\": \"header-value\"}"
timeout: "1m"
Field | Required | Values |
---|---|---|
url | Required | HTTP url of your API |
payload | Optional | Request body of your http request |
method | Required | HTTP Method |
headers | Optional | HTTP headers for the request in a key value format, will override any header set by the integration if there are duplicate value |
timeout | Optional | Time to wait for your API to response, by default it will be set to 1 minute. Maximum 5 minutes |
Trigger another workflow or notification
version: 1
name: Trigger
jobs:
call_an_api:
integration: "paymongo"
account: 506285930632
steps:
- uses: trigger
handle: "@slack-example @workflow-example(example=\"example\")"
Transfering money
Paymongo Internal
version: 1
name: Send Money via paymongo
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: paymongo
currency: "IDR"
amount: "100000"
destination: $contacts.get_contacts_by_name("vendor_1").paymoongo
remark: "Disbursement" # optional
Field | Required | Values |
---|---|---|
currency | Required | The currency you want to transact in, at the moment Paymongo Wallet only support PHP |
amount | Required | The amount of money that want to be transfered. You can use the following format "1000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the BIC code + Account Number separated by ";". Example: "PAEYPHM2;968482971274" |
remark | Optional | The transaction remark |
International
Automatic Least Cost Routing
For automatic least cost routing to work. You need to use contact with more than 1 destination, if not it will just send it to that 1 destination if a possible route is formed, since it will be deemed the most efficient route.
version: 1
name: Send Money to Vendor via Least Cost
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: automatic-least-cost-routing
currency: "IDR"
static_send_amount: "1000000"
destination: $contacts.get_contacts_by_name("vendor_1")
remark: "Disbursement" # optional
Field | Required | Values |
---|---|---|
currency | Required | The currency that the amount specified is in |
receive_amount | Optional | The amount of money you want the receiver to receive. You can use the following format "1000". This will dynamically debit your account based on the fees and forex rate at the time. Must be set if static_send is not set |
static_send | Optional | The amount of money you want to send from your account, the receiver may receive a higher or lower value based on the forex rates at the time |
include_fees_for_static_send | Optional | By default it will be exclude. whether to include or exclude fees in static send, if you include fees then the receiver will bear the fees and you will not be debited more than what you put as the value for static send. If you exclude the fees, then the receiver will receive whatever forex rate at the time and your account will be debited more to cover the fees required to send the money. |
destination | Required | This field should be filled in using attribute reference with contact |
same_currency_prioritization | Optional | By default it is false. If set to true, the workflow will try and find whether the contact have the same currency as the sender and send it to that bank/wallet as to not incur any forex. If it found one the workflow will still try it's best to find the least cost needed to be routed to that contact, example if the contact have the same bank then the cost would be 0(intrabank transfer) |
remark | Optional | The transaction remark |
Swift
version: 1
name: Send Money to Vendor via Swift Network
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: swift
currency: "USD"
amount: "1000"
destination: $contacts.get_contacts_by_name("vendor_1")
remark: "Disbursement" # optional
Field | Required | Values |
---|---|---|
currency | Required | The currency that the amount specified is in |
amount | Required | The amount of money that want to be transfered. You can use the following format "100000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the BIC code + Account Number separated by ";". Example: "CENAIDJA;5271639857" |
remark | Optional | The transaction remark |
Lightnet
version: 1
name: Send Money to Vendor via Swift Network
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: lightnet
currency: "USD"
amount: "1000"
destination: $contacts.get_contacts_by_name("vendor_1")
remark: "Disbursement" # optional
Field | Required | Values |
---|---|---|
currency | Required | The currency that the amount specified is in |
amount | Required | The amount of money that want to be transfered. You can use the following format "100000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the BIC code + Account Number separated by ";". Example: "CENAIDJA;5271639857" |
remark | Optional | The transaction remark |
Indonesia
Bifast
version: 1
name: Send Money via Bifast
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: bifast
currency: "IDR"
amount: "100000"
destination: $contacts.get_contacts_by_name("vendor_1").bca
purpose: 02
remark: "Disbursement" # optional
Field | Required | Values |
---|---|---|
currency | Required | The currency you want to transact in, at the moment BI-FAST only support IDR |
amount | Required | The amount of money that want to be transfered. You can use the following format "100000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the BIC code + Account Number separated by ";". Example: "CENAIDJA;5271639857" |
purpose | Optional | Investment: 01; Transfer of wealth: 02; Purchase: 03; Others: 99
If not defined we will use |
remark | Optional | The transaction remark |
Realtime Online Transfer
version: 1
name: Send Money via RTOL
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: rtol
currency: "IDR"
amount: "100000"
destination: $contacts.get_contacts_by_name("vendor_1").bca
remark: "Disbursement"
Field | Required | Values |
---|---|---|
currency | Required | The currency you want to transact in, at the moment RTOL only support IDR |
amount | Required | The amount of money that want to be transfered. You can use the following format "100000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the BIC code + Account Number separated by ";". Example: "CENAIDJA;5271639857" |
remark | Optional | The transaction notes |
QRIS
version: 1
name: Send Money via QRIS
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: qris
currency: "IDR"
amount: "100000"
destination: $contacts.get_contacts_by_name("vendor_1").qris
remarks: "Disbursement" # optional
Field | Required | Values |
---|---|---|
currency | Required | The currency you want to transact in, at the moment QRIS only support IDR |
amount | Required | The amount of money that want to be transfered. You can use the following format "100000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the QRIS code for example "00020101021223685016ID.CO.PAYMONGO.WWW011893630898030383813302150001952389826430303UMI51440014 ID.CO.QRIS.WWW0215ID10200253963980303UMI5204573253033605406500.005502015802ID5915Contoh6015Jl. Panjang N61456574163040384" |
Additional FeesSending money via QRIS might incur MDR fees on the receiver end.
Philippines
Instapay
version: 1
name: Send Money via Instapay
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: instapay
currency: "PHP"
amount: "1000"
destination: $contacts.get_contacts_by_name("vendor_1").ubp
purpose: 02
remark: "Disbursement"
Field | Required | Values |
---|---|---|
currency | Required | The currency you want to transact in, at the moment Instapay only support PHP |
amount | Required | The amount of money that want to be transfered. You can use the following format "1000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the BIC code + Account Number separated by ";". Example: "UBPHPHMM;003060001430" |
purpose | Required | Operational Expenses: 01; Payment for Employees Salary: 02; Payment for Rental: 03; Payment for Supplies: 04; Payment to customer: 05; Refund to customer: 06 |
remark | Optional | The transaction remark |
Pesonet
version: 1
name: Send Money via Pesonet
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: pesonet
currency: "PHP"
amount: "1000"
destination: $contacts.get_contacts_by_name("vendor_1").ubp
purpose: 02
remark: "Disbursement"
Field | Required | Values |
---|---|---|
currency | Required | The currency you want to transact in, at the moment Instapay only support PHP |
amount | Required | The amount of money that want to be transfered. You can use the following format "1000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the BIC code + Account Number separated by ";". Example: "UBPHPHMM;003060001430" |
purpose | Required | Operational Expenses: 01; Payment for Employees Salary: 02; Payment for Rental: 03; Payment for Supplies: 04; Payment to customer: 05; Refund to customer: 06 |
remark | Optional | The transaction remark |
QRPH
version: 1
name: Send Money via QRPH
handle: send-money-via-qrph
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: qrph
currency: "PHP"
amount: "1000"
destination: $contacts.get_contacts_by_name("vendor_1").qrph
remarks: "Disbursement" # optional
Field | Required | Values |
---|---|---|
currency | Required | The currency you want to transact in, at the moment QRPH only support PHP |
amount | Required | The amount of money that want to be transfered. You can use the following format "1000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the QRPH code for example "00020101021128790011ph.ppmi.p2m0111PAEYPHM2XXX0324sUFheuEHjeyWxVUjDJsjv MQq0410030300288605030115204559253036085802PH5925PM Test Account Commercia6006Taguig62430012ph.ppmi.qrph0306WXnByF05062110000803***88440012ph.ppmi .qrph0124sUFheuEHjeyWxVUjDJsjvMQq6304FE3F" |
Additional FeesSending money via QRPH might incur MDR fees on the receiver end.
Cambodia
KHQR
version: 1
name: Send Money via KHQR
handle: send-money-via-khqr
jobs:
send-money:
integration: "paymongo"
account: 506285930632
steps:
- uses: khqr
currency: "KHR"
amount: "100000"
destination: $contacts.get_contacts_by_name("vendor_1").khqr
remarks: "Disbursement" # optional
Field | Required | Values |
---|---|---|
currency | Required | The currency you want to transact in, at the moment KHQR only support KHR |
amount | Required | The amount of money that want to be transfered. You can use the following format "10000" |
destination | Required | This field can be filled in using attribute reference with contact, or can be filled in with the KHQR code for example "00020101021129270011paymongo.com0109123464675335204599953731165802KH5911LONG KIMHAK6410Phnom Penh63646EB3" |
Updated 1 day ago