Transfer Schedule API

The Transfer Schedule API allows you to 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.

Attribute

Name Type Description
amount integer

Amount for transfer schedule in smallest currency unit.

currency string

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

percentage_of_balance float

Percentage of balance transferred.

recipient object_id

RECIPIENT_ID to which the transfer was sent.

Example

  • Json Response

List all transfer schedules

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

Returns a list of all transfer_schedule objects belonging to your account.

Request Parameter

Name Type Description
offset integer

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

limit integer

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

from datetime

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

to datetime

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

order string

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

Example

  • List all transfer schedules

List all transfer schedules for a given recipient

- GET https://api.omise.co/recipients/RECIPIENT_ID/schedules

Returns a list of schedule objects. Returns all transfer schedules that belong to a given recipient.

Example

  • List all transfer schedules for a recipient.

Retrieve a transfer schedule

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

Create a transfer schedule

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

Creates and returns a new transfer schedule object.

Request Parameter

Name Type Description
every integer

How often the schedule runs. E.g.: Every 3 weeks.

period string

day, week or month. E.g.: Every 3 weeks.

on object

The on object has the following structure based on the value of period:

  • If period is day, omit on object entirely.
  • If period is week, on object has following structure: { weekdays: [''Monday'', ''Wednesday''] }.
  • If period is month, on object has one of two structures:
    • { days_of_month: [1, 15, 20] } (1 through 28 only)
    • { weekday_of_month: "second_monday" }.
start_date date

(optional) When the schedule should start, in ISO 8601 format (YYYY-MM-DD). Defaults to today.

end_date date

When the schedule should end, in ISO 8601 format (YYYY-MM-DD).

transfer transfer_schedule
  • amount: The amount to be transferred. Omit this field if you are not doing a fixed amount schedule.
  • percentage_of_balance: The percentage of balance to be transfered. Omit this field if you are not doing a percentage schedule.
  • recipient: The recipient ID to get the transfer.

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

Destroy a transfer schedule

- DELETE https://api.omise.co/schedules/SCHEDULE_ID