POST
/
api
/
v1
/
server-to-server-interface
/
capture
curl --request POST \
  --url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/capture \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "transactionId": "e0b0731e-7170-4b64-8a21-7d835eebd641",
  "amount": 1000,
  "merchant_id": "< Merchant ID >",
  "notes": "Capturing authorised amount"
}'
{
  "success": true,
  "status_code": 201,
  "is_live": false,
  "transaction_type": "CAPTURE",
  "gateway_response": {
    "version": "1",
    "type": "INFO",
    "message": "金額が正常にキャプチャされました。",
    "code": "INFO0001"
  },
  "merchant_details": {
    "legal_name": "Tink15 Factory",
    "mid": "< Merchant ID >",
    "merchant_txn_ref": "qwe"
  },
  "payment_details": {
    "amount": 1000,
    "response_code": 0,
    "auth_code": "264302",
    "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": "9dfd39ec-eb4a-4f8b-a526-17abf140a717",
    "ref": 74819,
    "timestamp": "2024-11-25T08:41:15.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:

"e0b0731e-7170-4b64-8a21-7d835eebd641"

amount
integer
required

キャプチャする金額。これは承認された金額を超えてはなりません。金額の制限は銀行によって異なります。

Example:

1000

merchant_id
string
required

加盟店ID(DASMID)。

Maximum length: 10
Example:

"< Merchant ID >"

notes
string

キャプチャ取引の参照(オプション)。

Maximum length: 128
Example:

"Capturing authorised amount"

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

取引タイプ(例:CAPTURE)。

Example:

"CAPTURE"

gateway_response
object

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

merchant_details
object

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

payment_details
object

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

transaction_details
object

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