Transfer Schedule

Create, retrieve, and delete Transfer Schedules, a type of schedule. To create a new Transfer Schedule, create a new schedule and populate the transfer field with this object.

Attributes

Name Type Description
amount integer

Scheduled transfer amount in smallest unit of transfer currency.

currency string

Currency for scheduled transfer as three-letter ISO 4217 code.

percentage_of_balance float

Percentage of balance to transfer.

recipient object_id

Identifier for recipient of scheduled transfer.

Example

  • JSON Response

Create a transfer schedule

- POST https://api.omise.co/schedules

Creates and returns a new transfer schedule.

Request Parameters

Name Type Description
end_date date

(required) End date of schedule in ISO 8601 format.

every integer

(required) How often schedule should run when applied to period. For example, if set to 3 and period is set to week, schedule should run every 3 weeks.

period string

(required) Period to use for every. One of day, week or month. For example, if set to week and every is set to 3 schedule should run every 3 weeks.

transfer[recipient] string

(required) Identifier for recipient of scheduled transfer.

on[days_of_month] array

(optional, but conditionally required) Required when on[period]=month and when on[weekday_of_month] is omitted. An array of days of month numbers (1..28). Please note that 29, 30 and 31 are not supported as not all months have these. E.g.: [1, 15, 20].

on[weekday_of_month] string

(optional, but conditionally required) Required when on[period]=month and when on[days_of_month] is omitted. An ordinalized weekday. E.g.: 2nd_monday, last_friday.

on[weekdays] array

(optional, but conditionally required) Required when on[period]=week. An array of weekday names. E.g.: ['Monday', 'Wednesday'].

start_date date

(optional) Start date of schedule in ISO 8601 format.

transfer[amount] integer

(optional) Amount for scheduled transfer in smallest currency unit. If omitted, the entire balance will be transferred (percentage_of_balance=100).

transfer[percentage_of_balance] float

(optional) Percentage of balance to transfer. If omitted, the entire balance will be transferred (percentage_of_balance=100).

Example

  • Transfer a fixed amount every 2 days

  • Transfer a percentage of the balance every Monday and Friday

  • Transfer the whole balance on the 1st, 10th and 15th every 3 months

  • Transfer the whole balance on the second Monday every month

Retrieve a transfer schedule

- GET https://api.omise.co/schedules/{id}

See schedules documentation for more information.

Destroy a transfer schedule

- DELETE https://api.omise.co/schedules/{id}

List transfer schedules

- GET https://api.omise.co/transfers/schedules

Returns a list of transfer schedules belonging to your account.

Request Parameters

Name Type Description
from datetime

(optional, default: 1970-01-01T00:00:00Z) Earliest UTC datetime for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

limit integer

(optional, default: 20, maximum: 100) Number of records returned.

offset integer

(optional, default: 0) Offset of the first record returned (i.e. how many records to skip from the beginning).

order string

(optional, default: chronological) Order of records returned. One of chronological (earliest to latest) or reverse_chronological (latest to earliest).

to datetime

(optional, default: current UTC datetime) Latest UTC datetime for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

Example

  • List all transfer schedules

List transfer schedules for recipient

- GET https://api.omise.co/recipients/{id}/schedules

Returns a list of transfer schedules belonging to recipient matching :id.

Request Parameters

Name Type Description
from datetime

(optional, default: 1970-01-01T00:00:00Z) Earliest UTC datetime for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

limit integer

(optional, default: 20, maximum: 100) Number of records returned.

offset integer

(optional, default: 0) Offset of the first record returned (i.e. how many records to skip from the beginning).

order string

(optional, default: chronological) Order of records returned. One of chronological (earliest to latest) or reverse_chronological (latest to earliest).

to datetime

(optional, default: current UTC datetime) Latest UTC datetime for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

Example

  • List all transfer schedules for recipient