Transaction(トランザクション)
Transaction(トランザクション)情報を取得するAPIです。
Attributes
Name | Type | Description |
---|---|---|
object | string | 固定値 |
id | string |
|
livemode | boolean | 本番モード ( |
location | string | 現在の |
amount | integer | 最小通貨単位での取引金額。 |
created_at | string | ISO 8601 形式 ( |
currency | string | 小文字3桁の国際識別コードで、ISO 4217規格 によって定義された通貨 |
direction | string |
|
key | string | 取引の詳細(例:「課金」「売上確定」「インターネット」)。 |
origin | string | 課金されたソース。 |
transferable_at | string | 取引金額のポイントでのUTC日時は、[ISO 8601](http://ja.wikipedia.org/wiki/ISO_860100形式でavailable balanceの一部となります。 |
Example
-
JSON Response
{ "object": "transaction", "id": "trxn_test_no1t4tnemucod0e51mo", "livemode": false, "currency": "THB", "amount": 11862, "location": "/transactions/trxn_test_no1t4tnemucod0e51mo", "direction": "credit", "key": "charge.captured.net", "origin": "chrg_test_no1t4tnemucod0e51mo", "transferable_at": "2019-12-31T12:59:59Z", "created_at": "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}");
Request<ScopedList<Transaction>> request = new Transaction.ListRequestBuilder().build(); ScopedList<Transaction> transactions = client().sendRequest(request); System.out.printf("Total 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}");
Request<Transaction> request = new Transaction.GetRequestBuilder("trxn_test_4xuy2z4w5vmvq4x5pfs").build(); Transaction transaction = client().sendRequest(request); 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")