POST
/
api
/
v1
/
server-to-server-interface
/
void
curl --request POST \
  --url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/void \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "transactionId": "ab8444e7-fec0-40dd-994d-0ad813785f74",
  "merchant_id": "< Merchant ID >"
}'
{
  "success": true,
  "status_code": 201,
  "is_live": false,
  "transaction_type": "VOID",
  "gateway_response": {
    "version": "1",
    "type": "INFO",
    "message": "承認が正常にキャンセルされました。",
    "code": "INFO0003"
  },
  "merchant_details": {
    "legal_name": "Tink15 Factory",
    "mid": "< Merchant ID >",
    "merchant_txn_ref": "qwe"
  },
  "payment_details": {
    "amount": 1000,
    "response_code": 0,
    "auth_code": "917290",
    "currency": "JPY",
    "payment_method": "ECMC-SSL",
    "scheme": "MASTERCARD",
    "card": {
      "name": "John Doe",
      "number": "5200000000001005",
      "exp_month": "12",
      "exp_year": "24"
    },
    "additional_data": {
      "payment_data_source": {
        "type": "card"
      }
    }
  },
  "transaction_details": {
    "id": "9e9255f5-d3dc-423e-9026-6e4da194bab5",
    "ref": 74813,
    "timestamp": "2024-11-25T08:33:48.000Z",
    "merchant_txn_ref": "qwe"
  }
}

重要なポイント

  • 認証無効化APIは、認証されたがまだキャプチャされていない取引を進めない決定がなされた場合に非常に重要です。

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

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

フローダイアグラム

APIパラメータ

Authorizations

Authorization
string
header
required

認証のためのAPIキー。形式:'Basic YOUR_API_KEY_HERE'

x-api-key
string
header
required

x-api-key専用のAPIキー。

Body

application/json
取引を無効にするためのリクエストペイロード。
transactionId
string
required

承認済みの取引の元の取引ID。

Maximum length: 36
Example:

"ab8444e7-fec0-40dd-994d-0ad813785f74"

merchant_id
string
required

加盟店ID(DASMID)。

Maximum length: 10
Example:

"< Merchant ID >"

Response

201 - application/json
取引が正常に無効化されました。
success
boolean

取引が成功した場合はtrue、失敗した場合はfalse。

Example:

true

status_code
integer

取引のステータスコード。

Example:

201

is_live
boolean

本番取引の場合はtrue、テスト取引の場合はfalse。

Example:

false

transaction_type
string

取引タイプ(例:VOID)。

Example:

"VOID"

gateway_response
object

ゲートウェイからの応答を含むJSONオブジェクト。

merchant_details
object

加盟店の詳細を含むJSONオブジェクト。

payment_details
object

取引の支払い詳細を含むJSONオブジェクト。

transaction_details
object

取引の詳細を含むJSONオブジェクト。