1. Home
  2. Docs
  3. 授權扣款 Authorized Payment
  4. API列表 (API Lists)
  5. 授權狀態查詢 Inquiry on Authorization Status

授權狀態查詢 Inquiry on Authorization Status

授權狀態查詢 Inquiry API

Method:GET
Domain:
https://[Host]/platform/authpay/detail

說明:
平台可呼叫此API,利用街口端授權編號來查詢此筆授權狀態。

請求參數 (Request Parameter)

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

返回參數 (Response JSON Body)

參數名稱
Parameter
資料型態
Data Type
最大長度
Maximum
必要
Required
說明Description
resultStringY回覆結果
messageStringY回覆訊息
result_objectObject (result_object)Y回覆物件

result_object

參數名稱
Parameter
資料型態
Data Type
說明Description
authpayGrantedAuthPay授權資料Granted authpay information

GrantedAuthPay

參數名稱
Parameter
資料型態
Data Type
最大長度
Maximum
必要
Required
說明Description
typeString30Y授權類型
regular: 定期定額授權扣款
Authorization type
regular: recurring payment (fixed amount)
statusString30Y授權狀態
ungranted: 未授權
granted: 已授權
cancel: 已取消
Authorization status
ungranted: not yet authorized
granted: authorized
cancel: authorization canceled
auth_noString30Y街口端授權編號JKOPay authorization number
platform_authpay_idString60Y平台授扣編號(留存用)Merchant platform authorization number(for record-keeping)
jkos_accountString100Y街口帳號JKOPay user’s account
billing_currencyStringN原始扣款幣別,預設TWDOriginal currency, default= TWD
billing_amountDecimal18,0N原始扣款金額Original amount
billing_cyclebilling_cycle[]定期定額: Y
不定期不定額: N
扣款週期與扣款次數(定期定額適用)Deduction cycle and times (For type is regular)

billing_cycle

注:時區統一為 UTC+8(Note: UTC+8 timezone)

參數名稱
Parameter
資料型態
Data Type
最大長度
Maximum
必要
Required
說明Description
billing_cycle.periodStringY扣款週期,時區限制為UTC+8,限帶入以下字串(e.g.week)
week:週(Sun~Mon)
month:月
quarter:季
year:年
Deduction cycle period, timezone is UTC+8, and input the following string only (e.g.week)
week:(From Sun to Mon)
month
quarter
year
billing_cycle.timesIntN每週期內,扣款次數。
(限帶入整數,如未帶此參數,系統預設為1次)
Week <= 7次
Month <= 7次
Quarter <= 7次
Year <= 12次
The deduction time in regular period. (input Int only, default= 1)
If the period is a week, then the times-limit <= 7
If the period is a month, then the times-limit <= 7
If period is a quarter, then the times-limit <= 7
If the period is a year, then the times-limit <= 12

範例 (Example):

查詢API Request:

https://{domain}/platform/authpay/detail?auth_no=02412421xxxx

查詢API Response:

{
	"result": "000",
	"message": null,
	"result_object": {
		"authpay": {
			"type": "regular",
			"auth_no": "591692855148417025",
			"status": "granted",
			"platform_authpay_id": "AUTHPAY_002",
			"jkos_account": "9xxxxxxxx",
			"billing_cycle":{
				"period": "month",
				"times": 1
			},
			"billing_amount": 100,
			"billing_currency": "TWD"
		}
	}
}