Transfer API

The Transfer API allows you to create and retrieve transfers to your bank account or third-party bank accounts. Third-party transfer recipients have to be verified by Omise.

Attribute

Name Type Description
object string

The string transfer.

id object_id

The TRANSFER_ID matching /trsf(_test)?_[1-9a-z]+/.

livemode boolean

Whether this is a live (true) or test (false) transfer.

location string

API path to retrieve the current transfer object.

amount integer

The amount expressed as a positive integer in the smallest unit for a given currency (e.g. 100 satangs equals THB 1). See supported currencies by country for maximum and minimum.

bank_account bank_account

The bank account related to the transfer.

created datetime

The UTC datetime of the creation of the transfer in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

currency string

The currency expressed as its lower-cased international 3-letter code defined by the ISO 4217 standard (see supported currencies by country).

fail_fast boolean

Whether the transfer will avoid retrying in the case of failure: true if the transfer will not be retried, false if it will be retried.

failure_code string

The failure code if status == failed. See testing for possible codes.

failure_message string

The human-readable message describing the failure if status == failed.

fee integer

The transfer fee.

metadata Object

Custom metadata (e.g. {"customer-id": 42}) for transfer.

paid boolean

Whether the transfer was paid.

paid_at datetime

The UTC pay datetime of the transfer in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

recipient object_id

The RECIPIENT_ID to which the transfer was sent.

sent boolean

Whether the transfer was sent.

sent_at datetime

The UTC send datetime of the transfer in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

transaction string

The TRANSACTION_ID of the transfer.

Example

  • Json Response

List all transfers

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

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

Request Parameter

Name Type Description
offset integer

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

limit integer

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

from datetime

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

to datetime

(optional, default: current UTC datetime) The latest UTC date and time for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

order string

(optional, default: chronological) The order of the list returned. Either chronological (earliest to latest) or reverse_chronological (latest to earliest).

Example

  • List all transfers

Create a transfer

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

Returns a new transfer object.

Request Parameter

Name Type Description
amount integer

The amount in the smallest subunits of the currency used. So for thb (Thai Baht) you will need to pass the amount in satangs.

recipient object_id

(optional, default: The recipient ID of the default recipient.) The recipient ID.

fail_fast boolean

True = do not retry the transfer in case of failure (insufficient balance, inactive recipient, ... ). False = keep retrying every day. Default: false.

metadata Object

(optional) Custom metadata (e.g. {"customer-id": 42}) for transfer.

Example

  • Create a transfer

  • Create a transfer to a third-party recipient

Retrieve a transfer

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

Returns an existing transfer object.

Example

  • Retrieve a transfer

Update a transfer

- PATCH https://api.omise.co/transfers/TRANSFER_ID

Returns the updated transfer object.

Request Parameter

Name Type Description
amount integer

The amount in the smallest subunits of the currency used. So for thb (Thai Baht) you will need to pass the amount in satangs.

metadata Object

(optional) Custom metadata (e.g. {"customer-id": 42}) for transfer.

Example

  • Update a transfer

Destroy a transfer

- DELETE https://api.omise.co/transfers/TRANSFER_ID

Returns the destroyed transfer object.

Example

  • Destroy a transfer

  • JSON Response