POST
/
api
/
v1
/
server-to-server-interface
/
refund
curl --request POST \
  --url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/refund \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "transactionId": "9dfd39ec-eb4a-4f8b-a526-17abf140a717",
  "amount": 1000,
  "merchant_id": "< Merchant ID >",
  "notes": "Refund amout captured/purchased"
}'
{
  "success": true,
  "status_code": 201,
  "is_live": false,
  "transaction_type": "REFUND",
  "gateway_response": {
    "version": "1",
    "type": "INFO",
    "message": "金額が正常に払い戻されました。",
    "code": "INFO0002"
  },
  "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": "626fa81d-9819-4947-bb9b-b0f11e00a50e",
    "ref": 74824,
    "timestamp": "2024-11-25T08:51:52.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

取引を払い戻すためのリクエストペイロード。

The body is of type object.

Response

201 - application/json

取引が正常に払い戻されました。

The response is of type object.