v0.1.73
jkf-pay-proto
transaction/transaction.proto
CompleteTransactionReq
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string | ||
| creditcard_param | PaymentParamsOfCreditCard | ||
| ecpay_inpay_param | PaymentParamsOfEcpayInpay | 站內付 | |
| happy_pay_param | PaymentParamsOfHappypay | Happypay oversea | |
| tap_pay_param | PaymentParamsOfTapPay | ||
| jpoint_pay_param | google.protobuf.Empty | ||
| cash_param | google.protobuf.Empty | ||
| jkopay_onlinepay_param | google.protobuf.Empty | ||
| jkopay_authpay_regular_param | PaymentParamsOfJkopayAuthPay | ||
| jkopay_authpay_limited_param | PaymentParamsOfJkopayAuthPay |
CompleteTransactionRes
| Field | Type | Label | Description |
|---|---|---|---|
| three_d_url | string | optional |
CreateTransactionTokenReq
| Field | Type | Label | Description |
|---|---|---|---|
| app_id | string | ||
| order_id | string | ||
| product_name | string | ||
| money | Money | ||
| check_code | string | ||
| callback_url | string | ||
| redirect_url | string | ||
| access_token | string | ||
| jpoint_discount | int64 | ||
| payment_channels | PaymentChannel | repeated | optional 指定訂單付款方式 |
| require_apea_twid | bool |
CreateTransactionTokenRes
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string | ||
| transc_id | string |
CreditCard
| Field | Type | Label | Description |
|---|---|---|---|
| card_id | string | ||
| last_four_num | string | ||
| issuing_network | string | 發卡機構 | |
| last_used | bool |
CreditCard.Status
DiscountTransactionReq
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string | ||
| jpoint_discount | int64 |
DiscountTransactionRes
FormData
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string | ||
| options | FormDataOptions | repeated |
FormDataOptions
| Field | Type | Label | Description |
|---|---|---|---|
| value | string | ||
| text | string |
GetExchangeRateReq
GetExchangeRateRes
| Field | Type | Label | Description |
|---|---|---|---|
| usd_to_twd | double |
GetPaymentInfoReq
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string | tranasaction token | |
| jpoint_discount | int64 | optional |
GetPaymentInfoRes
| Field | Type | Label | Description |
|---|---|---|---|
| payment_methods | PaymentMethod | repeated | |
| invoice_setting | InvoiceSetting |
GetPurchaseRecordReq
| Field | Type | Label | Description |
|---|---|---|---|
| access_token | string | ||
| page | int64 | ||
| limit | int64 | ||
| start_completed_at | google.protobuf.Timestamp | ||
| end_completed_at | google.protobuf.Timestamp | ||
| currency | Currency | ||
| app_id | string | optional |
GetPurchaseRecordRes
| Field | Type | Label | Description |
|---|---|---|---|
| records | PurchaseRecord | repeated | |
| total | int64 |
GetTransactionTokenReq
| Field | Type | Label | Description |
|---|---|---|---|
| app_id | string | ||
| transc_id | string | ||
| check_code | string |
GetTransactionTokenRes
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string |
InvoiceSetting
| Field | Type | Label | Description |
|---|---|---|---|
| string | |||
| phone_carrier | string | ||
| id_carrier | string | ||
| donate_code | string | ||
| last_used | InvoiceType |
Money
| Field | Type | Label | Description |
|---|---|---|---|
| currency | Currency | 交易貨幣 | |
| price | int64 | 交易金額 | |
| display_currency | Currency | 顯示貨幣 | |
| display_price | int64 | 顯示金額 | |
| payment_currency | Currency | optional | 付款貨幣,如果有設定且跟交易貨幣的值不同,會自動依據 JPay 系統設定匯率轉換 |
| payment_amount | int64 | optional | 在某些場合,有設定此值代表實際金流交易的 payment currency 金額 |
PaymentCode
付款代碼提供 DisplayInfoUrl, CodeInfo
| Field | Type | Label | Description |
|---|---|---|---|
| display_info_url | PaymentCode.DisplayInfoUrl | optional | 付款網址,如果有提供,則以這個網址為主 |
| atm_info | PaymentCode.AtmInfo | ||
| cvs_info | PaymentCode.CvsInfo |
PaymentCode.AtmInfo
| Field | Type | Label | Description |
|---|---|---|---|
| bank_code | string | ||
| bank_account | string | ||
| expire_date | google.protobuf.Timestamp | ||
| atm_option_value | string |
PaymentCode.CvsInfo
| Field | Type | Label | Description |
|---|---|---|---|
| cvs_name | string | ||
| cvs_code | string | ||
| payment_url | string | optional | |
| expire_date | google.protobuf.Timestamp | ||
| cvs_type | PaymentCode.CvsInfo.CvsType | ||
| cvs_option_value | string |
PaymentCode.DisplayInfoUrl
| Field | Type | Label | Description |
|---|---|---|---|
| url | string | ||
| method | PaymentCode.DisplayInfoUrl.Method | ||
| data | FormData | repeated |
PaymentMethod
| Field | Type | Label | Description |
|---|---|---|---|
| payment_method_id | string | ||
| type | PaymentType | method creditcard | |
| payment_channel | PaymentChannel | ||
| bound_credit_card | CreditCard | repeated | only response data on channel = creditcard |
| is_allow_new_credit_card | bool | ||
| is_form_post | bool | 是否為 form post | |
| form_post_url | string | ||
| form_post_data | FormData | repeated | |
| ecpay_inpay_token | string | ||
| last_used | bool | ||
| invoice_status | InvoiceStatus | ||
| upstream_app_id | string | ||
| upstream_app_key | string | ||
| payment_code | PaymentCode | optional | 付款代碼,例如 ATM 繳費代碼、 CVS 繳費代碼 |
PaymentParamsOfCreditCard
| Field | Type | Label | Description |
|---|---|---|---|
| creditcard_id | string |
PaymentParamsOfEcpayInpay
| Field | Type | Label | Description |
|---|---|---|---|
| pay_token | string |
PaymentParamsOfHappypay
| Field | Type | Label | Description |
|---|---|---|---|
| creditcard_id | string |
PaymentParamsOfJkopayAuthPay
| Field | Type | Label | Description |
|---|---|---|---|
| auth_no | string | optional | |
| creditcard_id | string | optional |
PaymentParamsOfTapPay
| Field | Type | Label | Description |
|---|---|---|---|
| creditcard_id | string | ||
| prime_token | string | ||
| remember_card | bool | ||
| creditcard_holder | string | ||
| creditcard_phone | string |
PurchaseRecord
| Field | Type | Label | Description |
|---|---|---|---|
| trade_id | string | ||
| product_name | string | ||
| received_amount | int64 | ||
| currency | Currency | ||
| completed_at | google.protobuf.Timestamp | ||
| received_jpoint | int64 | ||
| application_name | string |
QueryTransactionReq
| Field | Type | Label | Description |
|---|---|---|---|
| app_id | string | ||
| transc_id | string | trade_id | |
| check_code | string |
QueryTransactionRes
| Field | Type | Label | Description |
|---|---|---|---|
| transc_id | string | ||
| order_id | string | ||
| product_name | string | ||
| currency | Currency | ||
| price | int64 | 總價 | |
| received_amount | int64 | 實收金額 | |
| received_jpoint | int64 | 實收 JPoints | |
| created_at | google.protobuf.Timestamp | ||
| completed_at | google.protobuf.Timestamp | ||
| status | TransactionStatus | ||
| pay_at | google.protobuf.Timestamp |
RefundTransactionReq
| Field | Type | Label | Description |
|---|---|---|---|
| app_id | string | ||
| transc_id | string | trade_id | |
| check_code | string | ||
| refund_fee | double | 退款金額 | |
| refund_reason | string | 退款原因 |
RefundTransactionRes
| Field | Type | Label | Description |
|---|---|---|---|
| status | RefundTransactionStatus |
SetPaymentMethodReq
| Field | Type | Label | Description |
|---|---|---|---|
| payment_method_id | string | ||
| transaction_token | string |
SetPaymentMethodRes
SetTransactionInvoiceReq
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string | ||
| invoice_type | InvoiceType | ||
| invoice_data | string | ||
| reference_trade_id | string | optional, 可以將此筆訂設定為某筆訂單的開發票方式 |
SetTransactionInvoiceRes
SubscriptionInfo
| Field | Type | Label | Description |
|---|---|---|---|
| period | SubscriptionPeriod.Code | ||
| period_interval | int32 |
SubscriptionPeriod
TransactionTokenInfoReq
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string |
TransactionTokenInfoRes
| Field | Type | Label | Description |
|---|---|---|---|
| product_name | string | ||
| money | Money | ||
| jpoint_discount | int64 | ||
| jpoint_description | string | ||
| platform | string | ||
| required_apea_twid | bool | ||
| payment_selection_expired_at | google.protobuf.Timestamp | 付款選擇過期時間 | |
| payment_process_expired_at | google.protobuf.Timestamp | 付款處理過期時間 | |
| selected_payment_method_id | string | optional | 使用者已選擇的付款方式 |
| selected_invoice_setting | InvoiceSetting | optional | 使用者已選擇的發票設定 |
| transasction_status | TranscStatus | 目前訂單狀態 | |
| subscription_info | SubscriptionInfo | optional | 產品端設定的訂閱資訊 |
| transaction_verbose_status | TranscStatus | 訂單詳細狀態,包含付款錯誤時的狀態 | |
| transaction_failed_message | string | optional | 訂單錯誤訊息 |
CreditCard.Status.Value
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| Temporary | 1 |
Currency
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| TWD | 1 | |
| USD | 2 | |
| USDCENTS | 4 |
ErrBase
| Name | Number | Description |
|---|---|---|
| ErrBaseNone | 0 | |
| ErrTokenExpired | 1001 | |
| ErrTokenInvalid | 1002 |
ErrCTCode
| Name | Number | Description |
|---|---|---|
| ErrCTCNotSet | 0 | |
| ErrCTCCardExpired | 11001 | the creditcard is expired |
| ErrCTCPaymentFailed | 11002 | failed to pay via the gateway |
| ErrCTCCardInfoIncorrect | 11003 | the creditcard number does not exist |
| ErrCTCCardInsufficientBalance | 11004 | the balance of the creditcard is insufficient |
| ErrCTCCardBankDeclined | 11005 | the creditcard was declined by the bank, please contact the bank |
| ErrCTCRetryLater | 11006 | please retry the payment later |
| ErrCTCCardExistsWithToken | 11007 | the creditcard has been bound with the user with the card token |
| ErrCTCCard3DFailed | 11008 | the creditcard did not pass 3D verification |
| ErrCTCContactTicketCenter | 11009 | please contact our customer service or submit a ticket |
InvoiceStatus
| Name | Number | Description |
|---|---|---|
| Invoice | 0 | |
| Receipt | 1 | |
| ReceiptPdf | 2 |
InvoiceType
| Name | Number | Description |
|---|---|---|
| NotSet | 0 | |
| 1 | ||
| Phone | 2 | |
| ID | 3 | |
| Donate | 4 | |
| 5 |
PaymentChannel
| Name | Number | Description |
|---|---|---|
| Creditcard | 0 | 通用-信用卡-串接模式 |
| ECPAY_INPAY | 4 | 綠界-INPAY |
| ATM | 5 | ATM |
| CVS | 6 | 便利商店 |
| HAPPYPAY_OVERSEAS | 7 | HappyPay-信用卡-串接模式 |
| CreditcardTapPay | 8 | TapPay-信用卡-串接模式 |
| NOT_SET | 9 | |
| Jpoint | 10 | JPoints 全額折抵 |
| Cash | 11 | 現金 |
| JkopayOnlinePay | 12 | 街口支付-線上支付 |
| JkopayAuthorizedPaymentRegular | 13 | 街口支付-定期定額 |
| JkopayAuthorizedPaymentLimited | 14 | 街口支付-不定期不定額 |
PaymentCode.CvsInfo.CvsType
| Name | Number | Description |
|---|---|---|
| NONE | 0 | |
| FAMILY | 1 | 全家超商 |
| OKC | 2 | OK 超商 |
| SEVEN | 3 | 7-11 |
| HILIFE | 4 | 萊爾富超商 |
PaymentCode.DisplayInfoUrl.Method
| Name | Number | Description |
|---|---|---|
| NONE | 0 | |
| POST | 1 | |
| GET | 2 |
PaymentType
| Name | Number | Description |
|---|---|---|
| Domestic_Type | 0 | |
| Foreign_Type | 1 | |
| ATM_Type | 3 | |
| CSV_Type | 4 | |
| NOT_SET_Type | 5 | |
| Jpoint_Type | 6 | |
| Cash_Type | 7 | |
| Jkopay_Type | 8 | |
| Jkopay_Authpay_Type | 9 |
RefundTransactionStatus
| Name | Number | Description |
|---|---|---|
| RTS_FAILED | 0 | 取消訂單失敗 |
| RTS_REFUNDED_WITHOUT_WITHDRAWAL | 1 | 取消訂單成功,金流未退款 |
| RTS_REFUNDED | 2 | 取消訂單成功,金流已退款 |
SubscriptionPeriod.Code
| Name | Number | Description |
|---|---|---|
| NONE | 0 | |
| MONTHLY | 1 | |
| YEARLY | 2 | |
| DAY | 3 |
TransactionStatus
| Name | Number | Description |
|---|---|---|
| TS_NOTSET | 0 | 狀態異常 |
| TS_REFUNDED | 1 | 已退款 |
| TS_FAILED | 2 | 訂單失敗, 逾期未付 |
| TS_CREATED | 3 | 尚未付款 |
| TS_SUCCEEDED | 4 | 訂單成功 |
| TS_REFUNDED_WITHOUT_WITHDRAWAL | 5 | 訂單已取消,金流未退款 |
TranscStatus
| Name | Number | Description |
|---|---|---|
| TranscStatus_Created | 0 | 訂單已建立 |
| TranscStatus_Succeeded | 1 | 訂單完成 |
| TranscStatus_CallbackCompleted | 2 | 訂單完成且回調完成 |
| TranscStatus_InvoiceCompleted | 3 | 訂單已開立發票 |
| TranscStatus_SetPayment | 4 | 訂單已設定付款方式 |
| TranscStatus_SetPaymentCompleted | 5 | 訂單已設定付款方式且回調完成 |
| TranscStatus_Failed | -1 | 訂單失敗 |
| TranscStatus_FailedCallbackCompleted | -2 | 訂單失敗且回調完成 |
| TranscStatus_Refund | -3 | 訂單已退款 |
| TranscStatus_RefundWithoutWithdrawal | -5 | 訂單已申請退款 |
| TranscStatus_Overdue | -4 | 金流逾期未處理 |
| TranscStatus_OverdueCallbackCompleted | -6 | 金流逾期未處理且完成回調 |
| TranscStatus_PaymentNotSetOverdue | -7 | 訂單逾期未處理 |
| TranscStatus_PaymentNotSetOverdueCallbackCompleted | -8 | 訂單逾期未處理且完成回調 |
TransactionService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreateTransactionToken | CreateTransactionTokenReq | CreateTransactionTokenRes | 後端呼叫 生成一個可以付款的 transaction token |
| GetTransactionToken | GetTransactionTokenReq | GetTransactionTokenRes | 使用trade_id 產生 transaction token |
| QueryTransaction | QueryTransactionReq | QueryTransactionRes | 查詢訂單狀態 |
| RefundTransaction | RefundTransactionReq | RefundTransactionRes | 訂單退款 |
| TransactionTokenInfo | TransactionTokenInfoReq | TransactionTokenInfoRes | 取得交易資訊 |
| DiscountTransaction | DiscountTransactionReq | DiscountTransactionRes | 用戶使用jpoint 折抵 |
| GetPaymentInfo | GetPaymentInfoReq | GetPaymentInfoRes | 取得 transaction token 的付款資訊 |
| SetPaymentMethod | SetPaymentMethodReq | SetPaymentMethodRes | 設定訂單付費方式,前端於付費FORM POST前呼叫,記錄訂單付費方式,若在金流端發生異常沒有返回,要查單時才知去哪家金流查 |
| CompleteTransaction | CompleteTransactionReq | CompleteTransactionRes | 完成 transaction token 付款 |
| SetTransactionInvoice | SetTransactionInvoiceReq | SetTransactionInvoiceRes | 設定訂單的發票資訊 |
| GetPurchaseRecord | GetPurchaseRecordReq | GetPurchaseRecordRes | 取得購買紀錄 |
| GetExchangeRate | GetExchangeRateReq | GetExchangeRateRes | other |
jkfpay/transaction_api/transaction_api.proto
ChangeSubscriptionStatusReq
ChangeSubscriptionStatusReq 變更訂閱狀態的請求參數
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | app_token - 應用程式認證 token | |
| subsc_id | string | subsc_id - 系統內部訂閱識別碼 | |
| status | SubscriptionStatus.Code | status - 欲變更的訂閱狀態 |
ChangeSubscriptionStatusRes
ChangeSubscriptionStatusRes 變更訂閱狀態的回應結果(空回應)
CreateSubscriptionTokenReq
CreateSubscriptionTokenReq 建立訂閱 token 的請求參數
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | app_token - 應用程式認證 token | |
| product_name | string | product_name - 訂閱商品名稱 | |
| money | transaction.Money | money - 貨幣金額的交易(結帳)與顯示設定 | |
| callback_url | string | callback_url - 交易狀態回呼網址 | |
| object_id | string | object_id - PAN 使用者系統物件識別碼,用於關聯用戶身份 | |
| redirect_url | string | redirect_url - 交易完成後重導向網址 | |
| invoice_remark | string | optional | invoice_remark: optional, 發票備註 - 發票備註,只能由產品端設定 |
| payment_channels | transaction.PaymentChannel | repeated | payment_channels: optional, 指定訂單付款方式 - 限制可用的付款管道 |
| payment_period | PaymentPeriod | optional | payment_period: 指定付款方式的最短、最長期間 - 各付款方式的時間限制設定 |
| period | SubscriptionPeriod.Code | period - 訂閱週期類型(月、年、日) | |
| period_interval | int32 | period_interval - 訂閱週期間隔數(例如:每2個月為2,每3個月為3) | |
| order_id | string | order_id - 平台自訂訂單編號 | |
| subscription_callback_url | string | subscription_callback_url - 訂閱狀態更新專用回呼網址 | |
| downstream_subscription_id | string | downstream_subscription_id - 平台自訂訂閱識別碼 |
CreateSubscriptionTokenRes
CreateSubscriptionTokenRes 建立訂閱 token 的回應結果
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string | transaction_token - 交易 token,用於前端發起首次付款 | |
| subsc_id | string | subsc_id - 系統內部訂閱識別碼 | |
| transc_id | string | transc_id - 系統內部交易識別碼 |
CreateTransactionTokenReq
CreateTransactionTokenReq 建立交易 token 的請求參數
| Field | Type | Label | Description |
|---|---|---|---|
| app_id | string | jpay application id - 應用程式識別碼 | |
| order_id | string | platform custom order ID - 平台自訂訂單編號 | |
| product_name | string | platform product name for transaction - 交易商品名稱 | |
| money | transaction.Money | 貨幣金額相關設定 money.currency: transaction currency - 交易幣別 money.price: transaction price - 交易金額 money.display_currency: display currency on page - 頁面顯示幣別 money.display_price: display price on page - 頁面顯示金額 money.payment_currency: Payment to Bank with Specified Currency - 實際付款幣別 | |
| callback_url | string | platform callback_url - 交易狀態回呼網址 | |
| object_id | string | pan object_id - PAN 使用者系統物件識別碼,用於關聯用戶身份 | |
| jpoint_discount | int64 | Deprecated. jpoint_discount is deprecated - 已棄用預先 JPOINTS 點數折扣欄位 | |
| check_code | string | check_code generated by platform with transaction information - 平台生成的交易驗證碼 | |
| redirect_url | string | platform redirect_url - 交易完成後重導向網址 | |
| require_apea_twid | bool | require_apea_twid - 是否需要 APEA TWID 驗證 | |
| invoice_remark | string | invoice_remark: optional, 發票備註 - 發票備註,只能由產品端設定 | |
| payment_channels | transaction.PaymentChannel | repeated | payment_channels: optional, 指定訂單付款方式 - 限制可用的付款管道 |
| payment_period | PaymentPeriod | optional | payment_period: 指定付款方式的最短、最長期間 - 各付款方式的時間限制設定 |
| subscription_period | SubscriptionPeriod.Code | optional | subscription_period: 通常由訂閱系統指定續費週期 - 訂閱週期類型 |
| subscription_period_interval | int32 | optional | subscription_period_interval: 通常由訂閱系統指定週期間隔 - 訂閱週期間隔數 |
CreateTransactionTokenRes
CreateTransactionTokenRes 建立交易 token 的回應結果
| Field | Type | Label | Description |
|---|---|---|---|
| transaction_token | string | transaction_token - 交易 token,用於前端發起交易 | |
| transc_id | string | transc_id - 系統內部交易識別碼 |
DurationMinMax
DurationMinMax 定義時間期間的最小值與最大值範圍
| Field | Type | Label | Description |
|---|---|---|---|
| min | google.protobuf.Duration | min - 最短時間期間 | |
| max | google.protobuf.Duration | max - 最長時間期間 |
PaymentPeriod
PaymentPeriod 定義各種付款方式的時間期間限制
| Field | Type | Label | Description |
|---|---|---|---|
| selection_period | DurationMinMax | optional | selection_period: 指定第一階段(待選擇付款方式)的最短、最長期間 不同訂單可以接受的期間有所不同,會儘量在 min~max 之間 如果該訂單無法符合 min~max 則無法建立 Transaction 並回傳錯誤 |
| process_cvs_period | DurationMinMax | optional | process_cvs_period: 指定第二階段(付款處理)的便利商店付款最短、最長期間 因為金流差異可以接受的期間有所不同,會儘量在 min~max 之間 如果該金流無法符合 min~max 則無法建立 Transaction 並回傳錯誤 |
| process_atm_period | DurationMinMax | optional | process_atm_period: 指定第二階段(付款處理)的 ATM 轉帳最短、最長期間 因為金流差異可以接受的期間有所不同,會儘量在 min~max 之間 如果該金流無法符合 min~max 則無法建立 Transaction 並回傳錯誤 |
| process_creditcard_period | DurationMinMax | optional | process_creditcard_period: 指定第二階段(付款處理)的信用卡付款最短、最長期間 因為金流差異可以接受的期間有所不同,會儘量在 min~max 之間 如果該金流無法符合 min~max 則無法建立 Transaction 並回傳錯誤 |
| process_jkopay_period | DurationMinMax | optional | process_jkopay_period: 指定第二階段(付款處理)的街口支付最短、最長期間 因為金流差異可以接受的期間有所不同,會儘量在 min~max 之間 如果該金流無法符合 min~max 則無法建立 Transaction 並回傳錯誤 |
QuerySubscriptionPaymentRecordReq
QuerySubscriptionPaymentRecordReq 查詢訂閱付款記錄的請求參數
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | app_token - 應用程式認證 token | |
| subsc_id | string | ||
| page | int64 | page - 分頁頁碼(從 1 開始) | |
| page_size | int64 | page_size - 每頁記錄數量, 最多 100 |
QuerySubscriptionPaymentRecordRes
QuerySubscriptionPaymentRecordRes 查詢訂閱付款記錄的回應結果
| Field | Type | Label | Description |
|---|---|---|---|
| records | SubscriptionPaymentRecord | repeated | records - 訂閱付款記錄列表 |
| total | int64 | total - 符合條件的記錄總數 | |
| total_amount | int64 | total_amount - 所有記錄的總金額 |
QuerySubscriptionReq
QuerySubscriptionReq 查詢訂閱資訊的請求參數
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | app_token - 應用程式認證 token | |
| subsc_id | string | subsc_id - 系統內部訂閱識別碼 |
QuerySubscriptionRes
QuerySubscriptionRes 查詢訂閱資訊的回應結果
| Field | Type | Label | Description |
|---|---|---|---|
| subsc_id | string | subsc_id - 系統內部訂閱識別碼 | |
| payment_method_id | string | payment_method_id - 用戶綁定的付款方式識別碼 | |
| payment_creditcard_id | string | payment_creditcard_id - 用戶綁定的信用卡識別碼 | |
| status | SubscriptionStatus.Code | status - 目前訂閱狀態 | |
| next_renew_at | google.protobuf.Timestamp | next_renew_at - 預定下次續費扣款時間 | |
| renewing_at | google.protobuf.Timestamp | renewing_at - 目前續費處理的開始時間(處理中狀態) | |
| trial_start_at | google.protobuf.Timestamp | trial_start_at - 試用期開始時間 | |
| trial_end_at | google.protobuf.Timestamp | trial_end_at - 試用期結束時間(之後開始正式扣款) | |
| period | SubscriptionPeriod.Code | period - 訂閱週期類型 |
SubscriptionPaymentRecord
SubscriptionPaymentRecord 訂閱付款記錄(用於記錄每次續費的詳細資訊)
| Field | Type | Label | Description |
|---|---|---|---|
| id | string | id - 付款記錄唯一識別碼 | |
| transc_id | string | transc_id - 對應的系統交易識別碼 | |
| payment_method_id | string | payment_method_id - 此次續費使用的付款方式識別碼 | |
| payment_creditcard_id | string | payment_creditcard_id - 此次續費使用的信用卡識別碼 | |
| amount | transaction.Money | amount - 此次續費的付款金額與幣別資訊 | |
| created_at | google.protobuf.Timestamp | created_at - 付款記錄建立時間 | |
| subscription_callback_status | string | subscription_callback_status - 訂閱回調處理狀態 | |
| transaction_status | transaction.TranscStatus |
SubscriptionPeriod
SubscriptionPeriod 定義訂閱的週期類型
SubscriptionStatus
SubscriptionStatus 定義訂閱的各種狀態
TransactionApiError
TransactionApiError 定義交易 API 的錯誤代碼
SubscriptionPeriod.Code
| Name | Number | Description |
|---|---|---|
| NONE | 0 | NONE - 無週期/未設定 |
| MONTHLY | 1 | MONTHLY - 月付制 |
| YEARLY | 2 | YEARLY - 年付制 |
| DAY | 3 | DAY - 日付制 |
SubscriptionStatus.Code
| Name | Number | Description |
|---|---|---|
| NONE | 0 | NONE - 無狀態/未知狀態 |
| CREATED | 1 | CREATED - 已建立(尚未進行首次付款) |
| TRIAL | 2 | TRIAL - 試用期中 |
| ACTIVE | 3 | ACTIVE - 啟用中(正常續費扣款) |
| CANCELLED | 4 | CANCELLED - 已取消(用戶主動取消,不再續費) |
| EXPIRED | 5 | EXPIRED - 已過期(到期後未續費) |
| PAUSED | 6 | PAUSED - 已暫停(臨時停止續費,可恢復) |
| PAYMENT_FAILED | 7 | PAYMENT_FAILED - 付款失敗(續費扣款失敗) |
TransactionApiError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | None - 無錯誤 |
| PAYMENT_SELECTION_PERIOD_NOT_SUPPORTED | 1001 | PAYMENT_SELECTION_PERIOD_NOT_SUPPORTED - 付款選擇期間不支援 |
| PAYMENT_PROCESS_CVS_PERIOD_NOT_SUPPORTED | 1002 | PAYMENT_PROCESS_CVS_PERIOD_NOT_SUPPORTED - 便利商店付款處理期間不支援 |
| PAYMENT_PROCESS_ATM_PERIOD_NOT_SUPPORTED | 1003 | PAYMENT_PROCESS_ATM_PERIOD_NOT_SUPPORTED - ATM 付款處理期間不支援 |
| PAYMENT_PROCESS_CREDITCARD_PERIOD_NOT_SUPPORTED | 1004 | PAYMENT_PROCESS_CREDITCARD_PERIOD_NOT_SUPPORTED - 信用卡付款處理期間不支援 |
| SET_PAYMENT_METHOD_ABOVE_ONCE | 1005 | SET_PAYMENT_METHOD_ABOVE_ONCE - 交易只允許設定付款方式一次 |
| SUBSCRIPTION_CHANGE_STATUS_FAILED | 1006 | SUBSCRIPTION_CHANGE_STATUS_FAILED - 訂閱狀態變更失敗 |
| PAYMENT_PROCESS_JKOPAY_PERIOD_NOT_SUPPORTED | 1007 | PAYMENT_PROCESS_JKOPAY_PERIOD_NOT_SUPPORTED - 街口支付處理期間不支援 |
TransactionApiService
TransactionApiService 提供交易與訂閱相關的 API 服務
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreateTransactionToken | CreateTransactionTokenReq | CreateTransactionTokenRes | CreateTransactionToken 生成一次性交易 token |
| CreateSubscriptionToken | CreateSubscriptionTokenReq | CreateSubscriptionTokenRes | CreateSubscriptionToken 生成訂閱制交易 token |
| ChangeSubscriptionStatus | ChangeSubscriptionStatusReq | ChangeSubscriptionStatusRes | ChangeSubscriptionStatus 變更訂閱狀態(暫停、取消、恢復等) |
| QuerySubscription | QuerySubscriptionReq | QuerySubscriptionRes | QuerySubscription 查詢訂閱詳細資訊與狀態 |
| QuerySubscriptionPaymentRecord | QuerySubscriptionPaymentRecordReq | QuerySubscriptionPaymentRecordRes | QuerySubscriptionPaymentRecord 查詢訂閱付款紀錄 |
model/data_config.proto
model/model.proto
AdminAppPsg
group by app_id, type
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | ||
| app_id | string | ||
| psg_id | string | ||
| psg_method_id | string | ||
| type | transaction.PaymentType | ||
| status | PsgMethodStatus | ||
| priority | int64 |
Ga4Parameter
Ga4Parameter : Ga4參數
| Field | Type | Label | Description |
|---|---|---|---|
| ga4_client_id | string | ||
| ga4_page_title | string | ||
| ga4_page_path | string | ||
| ga4_session_id | string | ||
| ga4_engagement_time_msec | string |
Psg
| Field | Type | Label | Description |
|---|---|---|---|
| id | string | ||
| name | string | ||
| provider | string | ||
| merchant_id | string | ||
| data_config | string | ||
| status | int64 | ||
| invoice_status | int64 | ||
| create_at | google.protobuf.Timestamp |
PsgMethod
| Field | Type | Label | Description |
|---|---|---|---|
| id | string | ||
| name | string | ||
| psg | Psg | ||
| channel | transaction.PaymentChannel | ||
| type | transaction.PaymentType | oneof data_config | |
| status | PsgMethodStatus |
PsgMethodStatus
| Name | Number | Description |
|---|---|---|
| Close | 0 | |
| Open | 1 |
payadmin/admin.proto
AppListReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string |
AppListRes
| Field | Type | Label | Description |
|---|---|---|---|
| application | Application | repeated |
Application
| Field | Type | Label | Description |
|---|---|---|---|
| app_id | string | ||
| app_name | string | ||
| status | int64 | ||
| jpoint_app_name | string | ||
| jpoint_app_secret_key | string |
CancelSubscriptionReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| subscription_id | string | ||
| reason | string | optional |
CancelSubscriptionRes
CancelSubscriptionRes.Error
CheckTransactionReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| trade_id | string |
CheckTransactionRes
| Field | Type | Label | Description |
|---|---|---|---|
| result | string |
CreateAppPaymentReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| app_psg | CreateAppPaymentReq.CreateAppPsg |
CreateAppPaymentReq.CreateAppPsg
| Field | Type | Label | Description |
|---|---|---|---|
| app_id | string | ||
| psg_id | string | ||
| psg_method_id | string |
CreateAppPaymentRes
CreateAppReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| status | int64 | ||
| app_name | string | ||
| jpoint_app_name | string | ||
| jpoint_app_secret_key | string |
CreateAppRes
| Field | Type | Label | Description |
|---|---|---|---|
| app_id | string |
CreatePaymentMethodReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| psg_method | model.PsgMethod |
CreatePaymentMethodRes
| Field | Type | Label | Description |
|---|---|---|---|
| psg_method_id | string |
CreatePaymentServiceGatewayReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| psg | model.Psg |
CreatePaymentServiceGatewayRes
CreateSystemInfoReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| usd_twd_exchange_rate | double | ||
| status | SystemInfoStatus |
CreateSystemInfoRes
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 |
CreditCard
| Field | Type | Label | Description |
|---|---|---|---|
| id | string | ||
| phone_id | string | ||
| l4 | string | ||
| created_at | google.protobuf.Timestamp | ||
| psg | model.Psg |
DeleteSystemInfoReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| id | int64 |
DeleteSystemInfoRes
GetAppPaymentsReq
app psg
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| app_id | string |
GetAppPaymentsRes
| Field | Type | Label | Description |
|---|---|---|---|
| app_psg | model.AdminAppPsg | repeated |
GetAppReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| app_id | string |
GetAppRes
| Field | Type | Label | Description |
|---|---|---|---|
| application | Application |
GetBindCreditcardListReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| page | int64 | ||
| limit | int64 | ||
| phone_id | string | optional |
GetBindCreditcardListRes
| Field | Type | Label | Description |
|---|---|---|---|
| creditcards | CreditCard | repeated | |
| total | int64 |
GetChannelsReq
channel
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| app_id | string |
GetChannelsRes
| Field | Type | Label | Description |
|---|---|---|---|
| channels | transaction.PaymentChannel | repeated |
GetPaymentMethodListReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string |
GetPaymentMethodListRes
| Field | Type | Label | Description |
|---|---|---|---|
| psg_methods | model.PsgMethod | repeated |
GetPaymentMethodReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| psg_method_id | string |
GetPaymentMethodRes
| Field | Type | Label | Description |
|---|---|---|---|
| psg_method | model.PsgMethod |
GetPaymentServiceGatewayReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| psg_id | string |
GetPaymentServiceGatewayRes
| Field | Type | Label | Description |
|---|---|---|---|
| psg | model.Psg |
GetPaymentServiceGatewaysReq
psg
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| app_id | string | optional | |
| channels | transaction.PaymentChannel | optional |
GetPaymentServiceGatewaysRes
| Field | Type | Label | Description |
|---|---|---|---|
| psgs | model.Psg | repeated |
GetSubscriptionListReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| page | int64 | ||
| limit | int64 | ||
| status | int32 | optional | |
| user_object_id | string | optional | |
| start_at | google.protobuf.Timestamp | optional | |
| end_at | google.protobuf.Timestamp | optional | |
| phone_number | string | optional | |
| app_id | string | optional | |
| subscription_id | string | optional |
GetSubscriptionListRes
| Field | Type | Label | Description |
|---|---|---|---|
| records | SubscriptionRecord | repeated | |
| total | int64 | ||
| totalAmount | int64 |
GetTransactionGatewayLogReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| trade_id | string | trade_id 可以擇一帶入 | |
| subscription_id | string | subscription_id 可以擇一帶入 |
GetTransactionGatewayLogRes
| Field | Type | Label | Description |
|---|---|---|---|
| records | SystemLogRecord | repeated |
GetTranscRecordListReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| page | int64 | ||
| limit | int64 | ||
| user_object_id | string | optional | |
| trade_id | string | optional | |
| upstream_trade_id | string | optional | |
| downstream_trade_id | string | optional | |
| start_at | google.protobuf.Timestamp | optional | |
| end_at | google.protobuf.Timestamp | optional | |
| start_completed_at | google.protobuf.Timestamp | optional | |
| end_completed_at | google.protobuf.Timestamp | optional | |
| phone_number | string | optional | |
| currency | Currency | optional | |
| app_id | string | optional | |
| payment_type | transaction.PaymentType | optional | |
| status | int32 | optional | |
| creditcard_id | string | optional | |
| product_name_fuzzy | string | optional |
GetTranscRecordListRes
| Field | Type | Label | Description |
|---|---|---|---|
| records | TranscRecord | repeated | |
| total | int64 | ||
| totalAmount | int64 |
QueryGatewayTransactionReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| trade_id | string |
QueryGatewayTransactionRes
| Field | Type | Label | Description |
|---|---|---|---|
| result | string |
QuerySubscriptionPaymentRecordReq
QuerySubscriptionPaymentRecordReq 查詢訂閱付款記錄的請求參數
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | admin_token - JKFC 認證 token | |
| subsc_id | string | ||
| page | int64 | page - 分頁頁碼(從 1 開始) | |
| page_size | int64 | page_size - 每頁記錄數量, 最多 100 |
QuerySubscriptionPaymentRecordRes
QuerySubscriptionPaymentRecordRes 查詢訂閱付款記錄的回應結果
| Field | Type | Label | Description |
|---|---|---|---|
| records | jkfpay.transaction_api.SubscriptionPaymentRecord | repeated | records - 訂閱付款記錄列表 |
| total | int64 | total - 符合條件的記錄總數 | |
| total_amount | int64 | total_amount - 所有記錄的總金額 |
QuerySystemInfoListReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| page | int64 | ||
| page_size | int64 | ||
| status | SystemInfoStatus | optional |
QuerySystemInfoListRes
| Field | Type | Label | Description |
|---|---|---|---|
| system_infos | SystemInfo | repeated | |
| total | int64 |
RenewSubscriptionReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| subscription_id | string | ||
| force_renew | bool |
RenewSubscriptionRes
RenewSubscriptionRes.Error
RevokeOrderReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| trade_id | string |
RevokeOrderRes
SubscriptionRecord
| Field | Type | Label | Description |
|---|---|---|---|
| id | string | ||
| app_id | string | ||
| subscription_token | string | optional | |
| object_id | string | ||
| phone_id | string | ||
| product_name | string | ||
| money | transaction.Money | ||
| display_money | transaction.Money | ||
| callback_url | string | ||
| redirect_url | string | ||
| status | int32 | ||
| period | int32 | ||
| period_interval | int32 | ||
| payment_method_id | string | ||
| payment_creditcard_id | string | ||
| next_renew_at | google.protobuf.Timestamp | optional | |
| renewing_at | google.protobuf.Timestamp | optional | |
| trial_start_at | google.protobuf.Timestamp | optional | |
| trial_end_at | google.protobuf.Timestamp | optional | |
| invoice_remark | string | ||
| invoice_type | string | ||
| invoice_data | string | ||
| subscription_callback_url | string | ||
| downstream_subscription_id | string | ||
| require_apea_twid | bool | ||
| payment_channels | transaction.PaymentChannel | repeated | |
| display_exchange_rate | float | ||
| payment_period | jkfpay.transaction_api.PaymentPeriod | optional | payment_period: 指定付款方式的最短、最長期間,因為訂單條件與金流差異而系統可以接受的期間有所不同, |
| created_at | google.protobuf.Timestamp | ||
| updated_at | google.protobuf.Timestamp |
SystemInfo
SystemInfo related messages
| Field | Type | Label | Description |
|---|---|---|---|
| id | int64 | ||
| usd_twd_exchange_rate | double | ||
| status | SystemInfoStatus | ||
| created_at | google.protobuf.Timestamp | ||
| updated_at | google.protobuf.Timestamp | ||
| deleted_at | google.protobuf.Timestamp |
SystemLogRecord
| Field | Type | Label | Description |
|---|---|---|---|
| id | string | ||
| name | string | ||
| data | string | ||
| created_at | google.protobuf.Timestamp |
TranscRecord
| Field | Type | Label | Description |
|---|---|---|---|
| user_object_id | string | Pan Object ID | |
| trade_id | string | JPay 訂單號 | |
| downstream_trade_id | string | 平台端的訂單號 | |
| upstream_trade_id | string | 金流端訂單號 | |
| product_name | string | 商品名稱 | |
| required_amount | int64 | 應收金額, 幣別跟著 payment_currency 走 | |
| received_amount | int64 | 實收金額, 幣別跟著 payment_currency 走 | |
| currency | string | 交易幣別 | |
| created_at | google.protobuf.Timestamp | 訂單建立時間 | |
| phone | string | 付款人手機號碼 | |
| redirect_url | string | 平台端前端返回位址 | |
| completed_at | google.protobuf.Timestamp | 訂單完成時間 | |
| ip | string | 訂單操作 IP 紀錄 | |
| received_jpoint | int64 | 實收 JPoints | |
| phone_id | string | Phone ID is renamed to JPass ID | |
| application_name | string | 平台端應用名稱 | |
| psg_provider | string | 金流閘道提供者 | |
| psg_merchant_id | string | 金流閘道商家號碼 | |
| psg_method_channel | string | 金流扣款通道 | |
| paymentType | transaction.PaymentType | JPay 付款類型 | |
| failed_message | string | 交易錯誤訊息 | |
| status | int32 | 訂單狀態 | |
| transaction_amount | int64 | 交易金額 | |
| payment_currency | string | 扣款幣別 | |
| payment_amount | int64 | 扣款金額 | |
| creditcard_id | string | 信用卡 ID | |
| set_payment_at | google.protobuf.Timestamp | 已設定付款方式的時間 | |
| payment_expire | google.protobuf.Timestamp | 付款處理的到期時間 | |
| selection_expire | google.protobuf.Timestamp | 待選擇付款方式的到期時間 | |
| callback_url | string | 回調平台端提供的後端位址 | |
| method_info | string | 付款方式的額外資訊 | |
| payment_code | string | 付款代碼, ex., ATM Code, CVS Code | |
| renewal_subscription_id | string | 訂閱續費 ID |
UnbindCreditcardReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| creditcard_id | string |
UnbindCreditcardRes
UpdateAppPaymentPriorityReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| ids | int64 | repeated |
UpdateAppPaymentPriorityRes
UpdateAppPaymentStatusReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| id | int64 | ||
| status | model.PsgMethodStatus |
UpdateAppPaymentStatusRes
UpdateAppReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| app_id | string | ||
| app_name | string | ||
| status | int64 | ||
| jpoint_app_name | string | ||
| jpoint_app_secret_key | string |
UpdateAppRes
UpdateAppStatusReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| app_id | string | ||
| status | int64 |
UpdateAppStatusRes
UpdatePaymentMethodReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| psg_method | model.PsgMethod |
UpdatePaymentMethodRes
UpdatePaymentMethodStatusReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| psg_method_id | string | ||
| status | int64 |
UpdatePaymentMethodStatusRes
UpdatePaymentServiceGatewayReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| psg | model.Psg |
UpdatePaymentServiceGatewayRes
UpdatePaymentServiceGatewayStatusReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| psg_id | string | ||
| status | int64 |
UpdatePaymentServiceGatewayStatusRes
UpdateSystemInfoReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| id | int64 | ||
| usd_twd_exchange_rate | double | optional | |
| status | SystemInfoStatus | optional |
UpdateSystemInfoRes
WithdrawOrderReq
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| trade_id | string |
WithdrawOrderRes
CancelSubscriptionRes.Error.Code
| Name | Number | Description |
|---|---|---|
| NONE | 0 | |
| FAILED | 1001 |
Currency
| Name | Number | Description |
|---|---|---|
| CURRENCY_NOT_SET | 0 | |
| CURRENCY_TWD | 1 | |
| CURRENCY_USD | 2 | |
| CURRENCY_USD_CENTS | 4 |
RenewSubscriptionRes.Error.Code
| Name | Number | Description |
|---|---|---|
| NONE | 0 | |
| FAILED | 1001 | |
| PAYMENT_FAILED | 1002 |
SystemInfoStatus
| Name | Number | Description |
|---|---|---|
| SYSTEM_INFO_STATUS_UNSPECIFIED | 0 | |
| SYSTEM_INFO_STATUS_ACTIVE | 1 | |
| SYSTEM_INFO_STATUS_INACTIVE | 2 |