Adjust Stored Value By VipAppService
Description
透過 VipAppService 異動會員儲值金。
系統會依異動類型採不同保護:
- 結帳扣款:為避免重試造成重複扣款,實際異動前先確認該筆前一次異動是否已成功;若確認前次已成功則不再重複異動並直接回報成功,否則正常執行本次異動。
- 退單退款:為避免重複退款,退款前先確認該筆是否已退款(已退款則直接回報成功、不再退款),並確認原扣款確實成功後才執行退款;查無對應付款資料或無法確認原扣款成功時,回報失敗、不予退款。
以上為系統內部保護機制,請求與回應格式不變。
Resource
POST /v1/user/member/jxinfo/stored_value
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| counter_code | string | 店號 |
| card_no | string | 會員卡號 |
| cn | string | 實體卡號 (optional) |
| amount | number | 異動金額(正數=儲值、負數=扣除) |
| adjust_type | AdjustType | 異動類型 |
| order_no | string | 單號 |
| remark | string | 說明 (optional) |
Request Body Parameters - AdjustType
| Name | Description |
|---|---|
| CHECKOUT_DEDUCT | 結帳扣 |
| POINT_REFUND | 退點 |
| REPLENISH | 補回 |
| ORDER_REFUND_DEDUCT | 退單扣 |
| STORED_VALUE_TRANSFER | 儲值轉入 |
Request Example
{
"counter_code": "0001",
"card_no": "202401TEA0000000006",
"cn": "1234567890123456",
"amount": -100,
"adjust_type": "CHECKOUT_DEDUCT",
"order_no": "SO0001",
"remark": "結帳扣款"
}
Response
{
"transaction_id": "JXSO000120260622094512123",
"result_code": "1",
"message": "成功"
}
Response Body
| Name | Type | Description |
|---|---|---|
| transaction_id | string | 本次異動辨識碼 |
| result_code | string | 結果碼 |
| message | string | 結果說明 |