Transaction API

Transaction API ใช้เพื่อเรียกข้อมูลรายการที่เกิดขึ้นในบัญชีผู้ใช้โอมิเซะ “รายการ” จะเกิดขึ้นก็ต่อเมื่อการทำธุรกรรมระหว่างผู้ซื้อและผู้ขายสำเร็จ ตัวอย่างเช่นรายการรับชำระเงินที่ดำเนินการสำเร็จจะเกิดเป็นหนึ่งรายการจัดอยู่ในหมวด “credit”

Attributes

Name Type Description
object string

The string transaction.

id string

The transaction identifier matching /trxn(_test)?_[0-9a-z]+/.

livemode boolean

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

location string

API path to retrieve the current transaction object.

amount integer

Transaction amount in smallest unit of transaction currency.

created_at string

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

currency string

Currency for transaction as three-letter ISO 4217 code.

direction string

One of credit or debit.

key string

Transaction detail (e.g. charge.captured.net)。

merchant_name string

TBD

merchant_uid string

TBD

origin string

Origin for transaction. One of charge, refund, transfer, dispute, or receipt (identifier).

transferable_at string

UTC datetime of when transaction amount becomes part of available balance in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ)

Example

  • JSON Response

List transactions

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

Returns a list of transactions 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 transactions

Retrieve a transaction

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

Returns the transaction matching :id.

Example

  • Retrieve a transaction

เว็ปไซต์นี้มีการใช้คุกกี้เพื่อวิเคราะห์การใช้และปรับการใช้งานให้เหมาะกับท่าน เมื่อกดยอมรับหรือยังคงเข้าชมเว็บไซต์ต่อ เราถือว่าท่านยินยอมในการใช้งานคุกกี้ของเว็บไซต์ อ่านนโยบายความเป็นส่วนตัว