Routines
Overview
Routines are the instructions to move money, while Transfers are the actual vehicle that move the money. Routines are the parent object of Transfers. A Transfer is a child object of the Routine. A Transfer cannot exist without a Routine. There are one-time Routines and recurring Routines. There are various kinds of recurring routines, some with fixed amounts and others with variable amounts. A Routine can have multiple Transfers, but a Transfer cannot have multiple Routines.
Types of Routines
One Time
Move money between two authorized accounts on a specific date.
Request Body:
[
{
"type": "one-time",
"name": "My One Time Transfer",
"source_id": "your_source_id",
"destination_id": "your_destination_id",
"amount": 20,
"start_date": "2020-10-29"
}
]
In Practice:
A User can select a One Time Transfer, specifying the amount that they would like to transfer and where the Transfer should be deposited. The Routine will run once created, checking the balance of the Source Account before initiating the Transfer to ensure that no accounts are overdrawn.
Routine Specific Parameters Required:
Parameter | Data Type | Description |
---|---|---|
type | string | The type of Routine (one-time ) |
amount | float | The amount of the transfer |
Recurring
Move a specified amount of money from one authorized Account to another authorized Account on a recurring basis starting on a specific date.
Request Body:
[
{
"type": "recurring",
"name": "My Recurring Routine",
"source_id": "your_source_id",
"destination_id": "your_destination_id",
"amount": 20,
"start_date": "2020-10-29",
"frequency": "monthly"
}
]
In Practice:
When a User creates a Recurring Transfer, they must define the amount that they want to transfer and then the frequency the Routine should run. Once created, the Routine will run at the prescribed interval, checking the balance of the Source Account before initiating the Transfer to ensure that no accounts are overdrawn.
Like all Routines, it can be Paused (or Activated again). When Paused, it will not create a new Transfer even when the time interval is triggered. It can be Deleted as well, where it will no longer run again and will be removed from the active Routines list.
Routine Specific Parameters Required:
Parameter | Data Type | Description |
---|---|---|
type | string | The type of Routine (recurring ) |
amount | float | The amount of the transfer |
start_date | date | The date the Routine should start processing (timezone is "America/Los_Angeles") |
frequency | string | The frequency a repeating Routine should process (weekly , bi-weekly , or monthly ) |
Peer-to-Peer
Move money between two authorized accounts, from one authorized User to another.
Request Body:
[
{
"type": "one-time",
"name": "My P2P Transfer",
"source_id": "your_source_id",
"destination_id": "your_destination_id",
"destination_user_id": "your_id_for_the_receiving_user",
"amount": 20,
"start_date": "2020-10-29"
}
]
In Practice:
Transferring funds between two different Users is almost exactly like a One Time Transfer Routine; however, the request body includes an additional parameter that defines the User that will receive the funds. The parameters that differentiate the Sending User and Receiving User are as follows:
Sending User:
access_token
from the authorization header defines the authorization for the User sending fundssource_id
indicates the source of funds, and must be one of the Sending User's Accounts
Receiving User:
destination_user_id
is theuser_id
for the Receiving User, which must have an activeaccess_token
destination_id
indicates the destination of funds, and must be one of the Receiving User's Accounts
Routine Specific Parameters Required:
Parameter | Data Type | Description |
---|---|---|
type | string | The type of Routine (one-time ) |
amount | float | The amount of the transfer |
destination_user_id | string | The ID of the Receiving User |
start_date | date | The date the Routine should start processing (timezone is "America/Los_Angeles") |
Appendix
Routine Frequency
Frequency | Trigger | Example |
---|---|---|
weekly | Same day of the week as the start_date of the routine. | A routine with a start_date of 2023-01-02 (Monday) will repeat every Monday. The next time this example routine will trigger will be on 2023-01-09 (Monday). |
bi-weekly | Same day of the week as the start_date of the routine. | A routine with a start_date of 2023-01-02 (Monday) will repeat every other Monday. The next time this example routine will trigger will be on 2023-01-16 (Monday). |
monthly | Same day of the month as the start_date of the routine. | A routine with a start_date of 2023-01-30 (January 30th) will repeat monthly on the 30th day of the next month. The next time this example routine will trigger will be on 2023-02-28. Note that if subsequent months do not have a specific day (29th, 30th, or 31st) then the routine will run on the last day of that month. In this example, since the routine is scheduled to run every 30th day of the month, and Februrary does not have a 30th day, the routine will trigger on the last day of Februrary (which in 2023 is the 28th). |
Updated about 19 hours ago