Links API

Attribute

Name Type Description
object string

The string link.

id string

The LINK_ID.

livemode boolean

Whether this is a Live (true) or Test (false) link.

location string

Path to retrieve this link.

amount integer

Amount charged in the smallest currency unit. (e.g. 100 satangs to charge THB 1) The minimum charge amount is THB 20 (2000) and the maximum is THB 1,000,000 (100000000).

currency string

The currency as its lower-cased international 3-letter code, defined by the ISO 4217 standard.

used boolean

Whether the link was used or not.

multiple boolean

Whether the link is set to be used multiple times or not.

title string

The link title.

description string

The link description.

charges list

A list of charge objects.

payment_uri string

Url of payment page where the customer enters card details.

created datetime

Creation date of the link in ISO 8601 format.

List all links

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

Returns a list of link objects. Return all links that belongs to your account since the beginning of time. You can learn more about lists in the pagination documentation.

Query 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 maximum amount of records returned.

from datetime

(optional, default: 1970-01-01T00:00:00Z, format: ISO 8601) The UTC date and time limiting the beginning of returned records. E.g.: 2014-10-20T00:00:00Z

to datetime

(optional, default: current UTC Datetime, format: ISO 8601) The UTC date and time limiting the end of returned records. E.g.: 2015-01-20T00:00:00Z

order string

(optional, default: chronological) The order of the list returned. I.e.: chronological (from earliest to latest), reverse_chronological (from latest to earliest).

Example

  • List all links

Create a link

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

Returns a new link object.

Request Parameter

Name Type Description
amount integer

(required) The amount in the smallest subunits of the currency used. For thb (Thai Baht) you'll need to pass the amount in satangs. #Maximum and Minimum amount by supported currencies

currency string

(required) The currency in which you want the charge to be done.

title string

(required) A custom title for the link.

description string

(required) A custom description for the link.

multiple boolean

(optional) Whether or not you want the link to be used multiple times, when not specified it is set to false.

Example

  • Create a link for one time use

  • Create a link for multiple time use

Retrieve a link

- GET https://api.omise.co/links/LINK_ID

Example

  • Retrieve a link