授權狀態查詢 Inquiry on Authorization Status
授權狀態查詢 Inquiry API
Method:GET
Domain:https://[Host]/platform/authpay/detail
?auth_no={auth_no}
說明:
平台可呼叫此API,利用街口端授權編號來查詢此筆授權狀態。
請求參數 (Request Parameter)
參數名稱 Parameter | 資料型態 Data Type | 最大長度 Maximum | 必要的 Required | 說明 | Description |
---|---|---|---|---|---|
auth_no | string | 30 | Y | 街口端授權編號 | jkopay authorization number |
範例 (Example):
授權狀態查詢 API Request:
GET https://{街口路徑}/platform/authpay/detail?auth_no=650660555924205568
Content-Type: application/json
api-key: 795ca21ca75064da4d361bbc5120171e46251785891540dbf2f3af94699ae428
digest: a9fe45682ff7be3d3f13910e02776b32c70886571f8421c81c390d7fcdd717dd
返回參數 (Response JSON Body)
參數名稱 Parameter | 資料型態 Data Type | 說明 | Description |
---|---|---|---|
result | string | 請參照 API 回覆代碼(ResponseCode)。 | |
message | string | 結果訊息或失敗理由 | |
result_object fields | |||
result_object.authpay fields | |||
result_object.authpay.type | string | 授權類型 regular: 定期定額授權扣款 limited: 不定期不定額授權扣款 | Authorization type regular: recurring payment (fixed amount) |
result_object.authpay.auth_no | string | 街口端授權編號 | jkopay authorization number |
result_object.authpay.status | string | 授權狀態 ungranted: 未授權 granted: 已授權 cancel: 已取消 | Authorization status ungranted: not yet authorized granted: authorized cancel: authorization canceled |
result_object.authpay.platform_authpay_id | string | 平台授扣編號(留存用) | Merchant platform authorization number(for record-keeping) |
result_object.authpay.jkos_account | string | 街口帳號 | jkopay user’s account |
result_object.authpay.billing_amount | decimal | 原始扣款金額 | Original amount |
result_object.authpay.billing_currency | string | 原始扣款幣別,預設 TWD | Original currency, default is TWD |
result_object.authpay.billing_cycle fields | |||
result_object.authpay.billing_cycle.period | string | 扣款週期,時區限制為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 |
result_object.authpay.billing_cycle.times | int | 每週期內,扣款次數。 (限帶入整數,如未帶此參數,系統預設為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 Response:
{
"result": "000",
"message": null,
"result_object": {
"authpay": {
"type": "regular",
"auth_no": "650660555924205568",
"status": "granted",
"platform_authpay_id": "platform_authpay_id_001",
"jkos_account": "9xxxxxxxx",
"billing_amount": 100,
"billing_currency": "TWD",
"billing_cycle": {
"period": "month",
"times": 1
}
}
}
}