Transaction(トランザクション)
Transaction(トランザクション)情報を取得するAPIです。
Attributes
Name | Type | Description |
---|---|---|
object | string | 固定値 |
id | string |
|
location | string | 現在の |
amount | integer | 最小通貨単位での取引金額。 |
created | string | 取引が作成された際のISO 8601形式( |
currency | string | 小文字3桁の国際識別コードで、ISO 4217規格 によって定義された通貨 |
source | object_id_expandable | 取引の派生元: |
transferable | string | 取引金額のポイントのUTC日時は、ISO 8601形式 ( |
type | string |
|
Example
-
JSON Response
{ "object": "transaction", "currency": "thb", "amount": 11862, "id": "trxn_test_no1t4tnemucod0e51mo", "source": "chrg_test_no1t4tnemucod0e51mo", "location": "/transactions/trxn_test_no1t4tnemucod0e51mo", "type": "credit", "created": "2019-12-31T12:59:59Z", "transferable": "2019-12-31T12:59:59Z" }
トランザクションリストの取得
- GET https://api.omise.co/transactionsReturns a list of transactions belonging to your account.
Request Parameters
Name | Type | Description |
---|---|---|
from | string | (任意, default: |
limit | integer | (任意, default: |
offset | integer | (任意, default: |
order | string | (任意, default: |
to | string | (任意) ISO 8601形式 ( |
Example
-
トランザクションリストの取得
- curl
- php
- node.js
- ruby
- C#
- java
- python
- go
- elixir
curl https://api.omise.co/transactions \ -u $OMISE_SECRET_KEY:
<?php $transactions = OmiseTransaction::retrieve();
const omise = require('omise')({ secretKey: 'skey_test_no1t4tnemucod0e51mo', }); const customer = await omise.transactions.list(); console.log(customer);
require "omise" Omise.secret_api_key = "skey_test_4xs8breq3htbkj03d2x" transactions = Omise::Transaction.retrieve
var transactions = await Client.Transactions.GetList(order: Ordering.ReverseChronological); Console.WriteLine($"total transactions to-date: {transactions.Total}");
ScopedList<Transaction> transactions = client.transactions().list(); System.out.printf("no. of transactions: %d", transactions.getTotal());
import omise omise.api_secret = "skey_test_no1t4tnemucod0e51mo" transactions = omise.Transaction.retrieve()
client, _ := omise.NewClient( "pkey_test_no1t4tnemucod0e51mo", "skey_test_no1t4tnemucod0e51mo", ) result := &omise.TransactionList{} err := client.Do(result, &operations.ListTransactions{ operations.List{ Limit: 100, From: time.Now().Add(-1 * time.Hour), }, }) if err != nil { log.Fatalln(err) } log.Println(result)
Omise.configure(secret_key: "skey_test_4xs8breq3htbkj03d2x") Omise.Transaction.list
トランザクション情報の取得
- GET https://api.omise.co/transactions/{id}Transaction IDで指定した、トランザクション情報を取得します。
Example
-
トランザクション情報の取得
- curl
- php
- node.js
- ruby
- C#
- java
- python
- go
- elixir
curl https://api.omise.co/transactions/trxn_test_5fzo4nqrnop03djdde1 \ -u $OMISE_SECRET_KEY:
<?php $transactions = OmiseTransaction::retrieve('trxn_test_4xuy2z4w5vmvq4x5pfs');
const omise = require('omise')({ secretKey: 'skey_test_no1t4tnemucod0e51mo', }); const customer = await omise.transactions.retrieve('trxn_test_no1t4tnemucod0e51mo'); console.log(customer);
require "omise" Omise.secret_api_key = "skey_test_4xs8breq3htbkj03d2x" transaction = Omise::Transaction.retrieve("trxn_test_4xuy2z4w5vmvq4x5pfs")
var transactionId = "trxn_test_58fmj4hion95mndc96d"; var transaction = await Client.Transactions.Get(transactionId); Console.WriteLine($"transaction amount: {transaction.Amount}");
Transaction transaction = client.transactions().get("trxn_test_4xuy2z4w5vmvq4x5pfs"); System.out.printf("transaction amount: %d", transaction.getAmount());
import omise omise.api_secret = "skey_test_no1t4tnemucod0e51mo" transaction = omise.Transaction.retrieve("trxn_test_no1t4tnemucod0e51mo")
client, _ := omise.NewClient( "pkey_test_5no1t4tnemucod0e51mo", "skey_test_no1t4tnemucod0e51mo", ) result := &omise.Transaction{} err := client.Do(result, &operations.RetrieveTransaction{ TransactionID: "trxn_test_no1t4tnemucod0e51mo", }) if err != nil { log.Fatalln(err) } log.Println(result)
Omise.configure(secret_key: "skey_test_4xs8breq3htbkj03d2x") Omise.Transaction.retrieve("trxn_test_4xuy2z4w5vmvq4x5pfs")