1. Home
  2. Docs
  3. 授權扣款 Authorized Payment
  4. API列表 (API Lists)
  5. 授權扣款 Authorization deduction request

授權扣款 Authorization deduction request

Domain:https://{Please update according to test/production path provided by JKOPAY}/platform/authpay/transaction

Method:POST

說明:電商平台呼叫此API,發動該筆平台授權序號的授權扣款。

Platform calls this API to request for authorization deduction request.

整合流程 (Integration Workflow)

Merchant platform authorization request workflow

請求參數 (Request Parameter)

參數名稱
Parameter
資料型態
Data Type
最大長度
Maximum
必要
Required
說明Description
auth_noString30Y街口端授權編號Jkopay authorization number
orderAuthOrderUnitYAuthOrderUnit

範例 (Example):

{
	"auth_no": "605495635344494592",
	"order": {
		"platform_order_id": "test-roy-010",
		"trade_name":"第X次扣款",
		"currency": "TWD",
		"total_price": 50,
		"final_price": 50,
		"unredeem": 50,
		"products": [{
			"name": "商品1",
			"img": null,
			"unit_count": 1,
			"unit_price": 50,
			"unit_final_price": 50,
			"category_path": []}],
		"remark": "備註"
	}
}

返回參數 (Response JSON Body) – (When Success)

參數名稱
Parameter
資料型態
Data Type
說明Description
transactionTransaction[]Transaction

範例 (Example):

{
    "result": "000",
    "message": null,
    "result_object": {
        "platform_order_id": "test-roy-010",
        "status": 0,
        "tradeNo": "J000384112110270000E",
        "trans_time": "2021-10-27 09:04:51",
        "currency": "TWD",
        "final_price": "50",
        "redeem_amount":" 0",
        "redeem_detail": {
            "jko_coin_amount": 0,
            "official_coupon_amount": 0,
            "store_coupon_amount": 0
        },
        "debit_amount": "50",
        "refund_history": [],
        "invoice_vehicle": "/9-99+99",
        "remain_JKO_fee": 0.00,
        "maskNo": null,
        "channel_type": "account"
    }
}

返回參數 (Response JSON Body) – (When Failed)

參數名稱
Parameter
資料型態
Data Type
說明Description
Error_codeStringErrorCodeErrorCode
messageString扣款金額驗證失敗時會提供error messageWhen the deduction failed then will reply error message

範例 (Example):

{
	"result": "305",
	"message": “AUTHPAY_REGULAR_PAYMENT_TIMES_EXCEED”
}