取引ステータスを取得
curl --request GET \
--url https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId} \
--header 'Authorization: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}"
headers = {
"Authorization": "<api-key>",
"x-api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>', 'x-api-key': '<api-key>'}};
fetch('https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}")
.header("Authorization", "<api-key>")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"status_code": 200,
"is_live": false,
"transaction_type": "CAPTURE",
"gateway_response": {
"version": "1",
"type": "INFO",
"message": "Payment Successful.",
"code": "INFO0000"
},
"merchant_details": {
"legal_name": "Tink15 Factory",
"mid": "< Merchant ID >",
"merchant_txn_ref": "qwe"
},
"payment_details": {
"amount": 1000,
"response_code": 0,
"responseDescription": "取引は正常に完了しました。",
"auth_code": "268004",
"currency": "JPY",
"payment_method": "ECMC-SSL",
"scheme": "MASTERCARD",
"card": {
"name": "John Doe",
"number": "5200000000001005",
"exp_month": "12",
"exp_year": "29"
},
"additional_data": {
"payment_data_source": {
"type": "card"
}
}
},
"transaction_details": {
"id": "fc565b43-26f5-4906-92ae-d849edc3c3a1",
"ref": 74811,
"timestamp": "2024-11-25T08:24:36.000Z",
"billing_details": {
"billing_address": {
"country": "JP",
"email": "billing@testemail.com",
"address1": "1-2-3 Shinjuku",
"phone_number": "N/A",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
},
"shipping_address": {
"country": "JP",
"email": "shipping@testemail.com",
"address1": "1-2-3 Shinjuku",
"phone_number": "N/A",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
}
}
},
"risk_details": {
"risk_score": null
}
}サーバー間通信
取引ステータスAPI
取引ステータスAPIは、特定の取引の現在のステータスを取得するために使用され、事前認証、キャプチャ、返金、または無効化された取引を含みます。
GET
/
api
/
v1
/
server-to-server-interface
/
transaction
/
status
/
{transactionId}
取引ステータスを取得
curl --request GET \
--url https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId} \
--header 'Authorization: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}"
headers = {
"Authorization": "<api-key>",
"x-api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>', 'x-api-key': '<api-key>'}};
fetch('https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}")
.header("Authorization", "<api-key>")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.paymentoptions.com/api/v1/server-to-server-interface/transaction/status/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"status_code": 200,
"is_live": false,
"transaction_type": "CAPTURE",
"gateway_response": {
"version": "1",
"type": "INFO",
"message": "Payment Successful.",
"code": "INFO0000"
},
"merchant_details": {
"legal_name": "Tink15 Factory",
"mid": "< Merchant ID >",
"merchant_txn_ref": "qwe"
},
"payment_details": {
"amount": 1000,
"response_code": 0,
"responseDescription": "取引は正常に完了しました。",
"auth_code": "268004",
"currency": "JPY",
"payment_method": "ECMC-SSL",
"scheme": "MASTERCARD",
"card": {
"name": "John Doe",
"number": "5200000000001005",
"exp_month": "12",
"exp_year": "29"
},
"additional_data": {
"payment_data_source": {
"type": "card"
}
}
},
"transaction_details": {
"id": "fc565b43-26f5-4906-92ae-d849edc3c3a1",
"ref": 74811,
"timestamp": "2024-11-25T08:24:36.000Z",
"billing_details": {
"billing_address": {
"country": "JP",
"email": "billing@testemail.com",
"address1": "1-2-3 Shinjuku",
"phone_number": "N/A",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
},
"shipping_address": {
"country": "JP",
"email": "shipping@testemail.com",
"address1": "1-2-3 Shinjuku",
"phone_number": "N/A",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
}
}
},
"risk_details": {
"risk_score": null
}
}重要なポイント
- 取引IDは、特定の取引のステータスを問い合わせるために必要です。
- APIは、取引の現在のステータスと関連するエラーコードやメッセージを含む詳細情報を返します。
- このAPIは、取引ライフサイクルの追跡と管理に不可欠で、取引が正常に完了したことを確認するか、対応が必要な問題を特定します。
APIパラメータ
承認
認証のためのAPIキー。形式:'Basic YOUR_API_KEY_HERE'
x-api-key専用のAPIキー。
パスパラメータ
事前承認(Pre-Auth)、キャプチャ(Capture)、払い戻し(Refund)、または無効(Void)取引の元の取引ID。
Maximum string length:
36レスポンス
200 - application/json
取引ステータスが正常に取得されました
取引が成功した場合はtrue、失敗した場合はfalse。
例:
true
取引のステータスコード。
例:
200
本番取引の場合はtrue、テスト取引の場合はfalse。
例:
false
取引タイプ(例:PRE_AUTH、CAPTURE)。
例:
"CAPTURE"
ゲートウェイからの応答を含むJSONオブジェクト。
Show child attributes
Show child attributes
加盟店の詳細を含むJSONオブジェクト。
Show child attributes
Show child attributes
取引の支払い詳細を含むJSONオブジェクト。
Show child attributes
Show child attributes
取引の詳細を含むJSONオブジェクト。
Show child attributes
Show child attributes
リスクの詳細を含むJSONオブジェクト。
Show child attributes
Show child attributes
⌘I