> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paymentoptions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 取引ステータスAPI

> 取引ステータスAPIは、特定の取引の現在のステータスを取得するために使用され、事前認証、キャプチャ、返金、または無効化された取引を含みます。

### 重要なポイント

<Info>
  * 取引IDは、特定の取引のステータスを問い合わせるために必要です。

  * APIは、取引の現在のステータスと関連するエラーコードやメッセージを含む詳細情報を返します。

  * このAPIは、取引ライフサイクルの追跡と管理に不可欠で、取引が正常に完了したことを確認するか、対応が必要な問題を特定します。
</Info>

## APIパラメータ


## OpenAPI

````yaml api-reference/jp/open-api-config/server-to-server/transaction-status.json GET /api/v1/server-to-server-interface/transaction/status/{transactionId}
openapi: 3.0.1
info:
  title: Payment Options API
  description: ホストされた支払いページ（HPP）リンクを生成し、支払いを処理するためのAPI。
  version: 1.0.0
servers:
  - url: https://api-dev.paymentoptions.com
security:
  - apiKeyAuth: []
    xApiKeyAuth: []
paths:
  /api/v1/server-to-server-interface/transaction/status/{transactionId}:
    get:
      summary: 取引ステータスを取得
      description: このエンドポイントでは、加盟店が取引IDを使用して特定の取引のステータスを取得できます。
      operationId: getTransactionStatus
      parameters:
        - name: transactionId
          in: path
          required: true
          schema:
            type: string
            maxLength: 36
          description: 事前承認（Pre-Auth）、キャプチャ（Capture）、払い戻し（Refund）、または無効（Void）取引の元の取引ID。
      responses:
        '200':
          description: 取引ステータスが正常に取得されました
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: 取引が成功した場合はtrue、失敗した場合はfalse。
                    example: true
                  status_code:
                    type: integer
                    description: 取引のステータスコード。
                    example: 200
                  is_live:
                    type: boolean
                    description: 本番取引の場合はtrue、テスト取引の場合はfalse。
                    example: false
                  transaction_type:
                    type: string
                    description: 取引タイプ（例：PRE_AUTH、CAPTURE）。
                    example: CAPTURE
                  gateway_response:
                    type: object
                    description: ゲートウェイからの応答を含むJSONオブジェクト。
                    properties:
                      version:
                        type: string
                        description: ゲートウェイのバージョン。
                        example: '1'
                      type:
                        type: string
                        description: 応答のタイプ（例：INFOは情報用）。
                        example: INFO
                      message:
                        type: string
                        description: ゲートウェイからのメッセージ応答。
                        example: Payment Successful.
                      code:
                        type: string
                        description: 応答のメッセージコード。
                        example: INFO0000
                  merchant_details:
                    type: object
                    description: 加盟店の詳細を含むJSONオブジェクト。
                    properties:
                      legal_name:
                        type: string
                        description: 加盟店の正式名称。
                        example: Tink15 Factory
                      mid:
                        type: string
                        description: 加盟店ID（DASMID）。
                        example: < Merchant ID >
                      merchant_txn_ref:
                        type: string
                        description: 加盟店の取引参照。
                        example: qwe
                  payment_details:
                    type: object
                    description: 取引の支払い詳細を含むJSONオブジェクト。
                    properties:
                      amount:
                        type: number
                        description: 取引の金額。
                        example: 1000
                      response_code:
                        type: integer
                        description: アクワイアラー応答コード。
                        example: 0
                      responseDescription:
                        type: string
                        description: アクワイアラーの応答説明。
                        example: 取引は正常に完了しました。
                      auth_code:
                        type: string
                        description: アクワイアラーの認証コード。
                        example: '268004'
                      currency:
                        type: string
                        description: 取引の通貨。
                        example: JPY
                      payment_method:
                        type: string
                        description: 支払いカードの種類（例：クレジットカードまたはデビットカード）。
                        example: ECMC-SSL
                      scheme:
                        type: string
                        description: カードブランドのスキーム（例：MASTERCARD）。
                        example: MASTERCARD
                      card:
                        type: object
                        description: カードの詳細を含むJSONオブジェクト。
                        properties:
                          name:
                            type: string
                            description: カード所有者の名前。
                            example: John Doe
                          number:
                            type: string
                            description: カード番号（マスク済み）。
                            example: '5200000000001005'
                          exp_month:
                            type: string
                            description: カードの有効期限の月。
                            example: '12'
                          exp_year:
                            type: string
                            description: カードの有効期限の年。
                            example: '29'
                      additional_data:
                        type: object
                        description: 追加データを含むJSONオブジェクト。
                        properties:
                          payment_data_source:
                            type: object
                            description: 支払いデータソースを含むJSONオブジェクト。
                            properties:
                              type:
                                type: string
                                description: 支払いデータソースの種類（例：カード、GooglePay、ApplePay）。
                                example: card
                  transaction_details:
                    type: object
                    description: 取引の詳細を含むJSONオブジェクト。
                    properties:
                      id:
                        type: string
                        description: 取引のトランザクションID。
                        example: fc565b43-26f5-4906-92ae-d849edc3c3a1
                      ref:
                        type: integer
                        description: 取引の認証コード。
                        example: 74811
                      timestamp:
                        type: string
                        description: 取引の日付と時刻。
                        example: '2024-11-25T08:24:36.000Z'
                      billing_details:
                        type: object
                        description: 請求情報を含むJSONオブジェクト。
                        properties:
                          billing_address:
                            type: object
                            description: 請求先住所を含むJSONオブジェクト。
                            properties:
                              country:
                                type: string
                                description: カード所有者の請求先国コード。
                                example: JP
                              email:
                                type: string
                                description: カード所有者の請求先メールアドレス。
                                example: billing@testemail.com
                              address1:
                                type: string
                                description: カード所有者の請求先住所の詳細。
                                example: 1-2-3 Shinjuku
                              phone_number:
                                type: string
                                description: カード所有者の請求先電話番号。
                                example: N/A
                              city:
                                type: string
                                description: カード所有者の請求先都市。
                                example: Shinjuku-ku
                              state:
                                type: string
                                description: カード所有者の請求先都道府県。
                                example: Tokyo
                              postal_code:
                                type: string
                                description: カード所有者の郵便番号。
                                example: '1600022'
                          shipping_address:
                            type: object
                            description: 配送先住所を含むJSONオブジェクト。
                            properties:
                              country:
                                type: string
                                description: カード所有者の配送先国コード。
                                example: JP
                              email:
                                type: string
                                description: カード所有者の配送先メールアドレス。
                                example: shipping@testemail.com
                              address1:
                                type: string
                                description: カード所有者の配送先住所の詳細。
                                example: 1-2-3 Shinjuku
                              phone_number:
                                type: string
                                description: カード所有者の配送先電話番号。
                                example: N/A
                              city:
                                type: string
                                description: カード所有者の配送先都市。
                                example: Shinjuku-ku
                              state:
                                type: string
                                description: カード所有者の配送先都道府県。
                                example: Tokyo
                              postal_code:
                                type: string
                                description: カード所有者の配送先郵便番号。
                                example: '1600022'
                  risk_details:
                    type: object
                    description: リスクの詳細を含むJSONオブジェクト。
                    properties:
                      risk_score:
                        type: string
                        description: リスクスコア（該当する場合）。
                        example: null
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
      description: 認証のためのAPIキー。形式：'Basic YOUR_API_KEY_HERE'
    xApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: x-api-key専用のAPIキー。

````