> ## 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>
  * 認証無効化APIは、認証されたがまだキャプチャされていない取引を進めない決定がなされた場合に非常に重要です。

  * 認証が無効化されると、顧客のアカウントで保留されていた資金が解放され、再び顧客が使用できるようになります。

  * このAPIは、注文が履行前にキャンセルされた場合や、取引詳細の変更により再認証が必要な場合に一般的に使用されます。
</Info>

## フローダイアグラム

<img src="https://mintcdn.com/dasdoc/kfo25CLU3J6KbVVp/images/timeline-diagram/flows-API-void-jp.svg?fit=max&auto=format&n=kfo25CLU3J6KbVVp&q=85&s=64b8992f3d2878c1dc7cfd8e88cb64de" alt="フローダイアグラム画像" width="1997" height="868" data-path="images/timeline-diagram/flows-API-void-jp.svg" />

## APIパラメータ


## OpenAPI

````yaml api-reference/jp/open-api-config/server-to-server/void-authorization.json POST /api/v1/server-to-server-interface/void
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/void:
    post:
      summary: 取引を無効にする
      description: このエンドポイントは、加盟店が承認済みの取引を無効にできるようにします。
      operationId: voidTransaction
      requestBody:
        description: 取引を無効にするためのリクエストペイロード。
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                transactionId:
                  type: string
                  description: 承認済みの取引の元の取引ID。
                  example: ab8444e7-fec0-40dd-994d-0ad813785f74
                  maxLength: 36
                merchant_id:
                  type: string
                  description: 加盟店ID（DASMID）。
                  example: < Merchant ID >
                  maxLength: 10
              required:
                - transactionId
                - merchant_id
      responses:
        '201':
          description: 取引が正常に無効化されました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: 取引が成功した場合はtrue、失敗した場合はfalse。
                    example: true
                  status_code:
                    type: integer
                    description: 取引のステータスコード。
                    example: 201
                  is_live:
                    type: boolean
                    description: 本番取引の場合はtrue、テスト取引の場合はfalse。
                    example: false
                  transaction_type:
                    type: string
                    description: 取引タイプ（例：VOID）。
                    example: VOID
                  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: 承認が正常にキャンセルされました。
                      code:
                        type: string
                        description: 応答のメッセージコード。
                        example: INFO0003
                  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
                      auth_code:
                        type: string
                        description: アクワイアラーの認証コード。
                        example: '917290'
                      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: 9e9255f5-d3dc-423e-9026-6e4da194bab5
                      ref:
                        type: integer
                        description: 取引の認証コード。
                        example: 74813
                      timestamp:
                        type: string
                        description: 取引の日付と時刻。
                        example: '2024-11-25T08:33:48.000Z'
                      merchant_txn_ref:
                        type: string
                        description: 加盟店の取引参照ID。
                        example: qwe
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キー。

````