Chain API

Retrieve and revoke chains. Chains represent sub-merchant accounts which have authorized another account to create charges and perform other actions on their behalf. When performing these actions, merchants use the sub-merchant chain key when interacting with the API.

Attributes

Name Type Description
object string

The string chain

id string

The chain identifier matching /acch(_test)?_[0-9a-z]+/

livemode boolean

Whether this is a live (true) or test (false) chain

location string

API path to retrieve the current chain object

created_at string

UTC datetime of sub-merchant chain creation in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ)

email string

Sub-merchant account email address

key string

Chain key. Use instead of sub-merchant's secret key to perform actions on their behalf

revoked boolean

Whether this sub-merchant chain is revoked

Example

  • JSON Response

List sub-merchant chains

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

Returns a list of sub-merchant chains belonging to your account.

Request Parameters

Name Type Description
from string

(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) 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, one of: chronological, reverse_chronological) Order of records returned.

to string

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

Example

  • List all sub-merchant chains

Retrieve a sub-merchant chain

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

Returns the sub-merchant chain matching :id.

Example

  • Retrieve a sub-merchant chain

Revoke a sub-merchant chain

- POST https://api.omise.co/chains/{id}/revoke

Revokes the sub-merchant chain matching :id.

Example

  • Revoke a sub-merchant chain

Related

Omise uses cookies to improve your overall site experience and collect information on your visits and browsing behavior. By continuing to browse our website, you agree to our Privacy Policy. Learn more