Skip to content

v0.1.73

jkf-pay-proto

transaction/transaction.proto

CompleteTransactionReq

FieldTypeLabelDescription
transaction_tokenstring
creditcard_paramPaymentParamsOfCreditCard
ecpay_inpay_paramPaymentParamsOfEcpayInpay站內付
happy_pay_paramPaymentParamsOfHappypayHappypay oversea
tap_pay_paramPaymentParamsOfTapPay
jpoint_pay_paramgoogle.protobuf.Empty
cash_paramgoogle.protobuf.Empty
jkopay_onlinepay_paramgoogle.protobuf.Empty
jkopay_authpay_regular_paramPaymentParamsOfJkopayAuthPay
jkopay_authpay_limited_paramPaymentParamsOfJkopayAuthPay

CompleteTransactionRes

FieldTypeLabelDescription
three_d_urlstringoptional

CreateTransactionTokenReq

FieldTypeLabelDescription
app_idstring
order_idstring
product_namestring
moneyMoney
check_codestring
callback_urlstring
redirect_urlstring
access_tokenstring
jpoint_discountint64
payment_channelsPaymentChannelrepeatedoptional 指定訂單付款方式
require_apea_twidbool

CreateTransactionTokenRes

FieldTypeLabelDescription
transaction_tokenstring
transc_idstring

CreditCard

FieldTypeLabelDescription
card_idstring
last_four_numstring
issuing_networkstring發卡機構
last_usedbool

CreditCard.Status

DiscountTransactionReq

FieldTypeLabelDescription
transaction_tokenstring
jpoint_discountint64

DiscountTransactionRes

FormData

FieldTypeLabelDescription
keystring
valuestring
optionsFormDataOptionsrepeated

FormDataOptions

FieldTypeLabelDescription
valuestring
textstring

GetExchangeRateReq

GetExchangeRateRes

FieldTypeLabelDescription
usd_to_twddouble

GetPaymentInfoReq

FieldTypeLabelDescription
transaction_tokenstringtranasaction token
jpoint_discountint64optional

GetPaymentInfoRes

FieldTypeLabelDescription
payment_methodsPaymentMethodrepeated
invoice_settingInvoiceSetting

GetPurchaseRecordReq

FieldTypeLabelDescription
access_tokenstring
pageint64
limitint64
start_completed_atgoogle.protobuf.Timestamp
end_completed_atgoogle.protobuf.Timestamp
currencyCurrency
app_idstringoptional

GetPurchaseRecordRes

FieldTypeLabelDescription
recordsPurchaseRecordrepeated
totalint64

GetTransactionTokenReq

FieldTypeLabelDescription
app_idstring
transc_idstring
check_codestring

GetTransactionTokenRes

FieldTypeLabelDescription
transaction_tokenstring

InvoiceSetting

FieldTypeLabelDescription
emailstring
phone_carrierstring
id_carrierstring
donate_codestring
last_usedInvoiceType

Money

FieldTypeLabelDescription
currencyCurrency交易貨幣
priceint64交易金額
display_currencyCurrency顯示貨幣
display_priceint64顯示金額
payment_currencyCurrencyoptional付款貨幣,如果有設定且跟交易貨幣的值不同,會自動依據 JPay 系統設定匯率轉換
payment_amountint64optional在某些場合,有設定此值代表實際金流交易的 payment currency 金額

PaymentCode

付款代碼提供 DisplayInfoUrl, CodeInfo

FieldTypeLabelDescription
display_info_urlPaymentCode.DisplayInfoUrloptional付款網址,如果有提供,則以這個網址為主
atm_infoPaymentCode.AtmInfo
cvs_infoPaymentCode.CvsInfo

PaymentCode.AtmInfo

FieldTypeLabelDescription
bank_codestring
bank_accountstring
expire_dategoogle.protobuf.Timestamp
atm_option_valuestring

PaymentCode.CvsInfo

FieldTypeLabelDescription
cvs_namestring
cvs_codestring
payment_urlstringoptional
expire_dategoogle.protobuf.Timestamp
cvs_typePaymentCode.CvsInfo.CvsType
cvs_option_valuestring

PaymentCode.DisplayInfoUrl

FieldTypeLabelDescription
urlstring
methodPaymentCode.DisplayInfoUrl.Method
dataFormDatarepeated

PaymentMethod

FieldTypeLabelDescription
payment_method_idstring
typePaymentTypemethod creditcard
payment_channelPaymentChannel
bound_credit_cardCreditCardrepeatedonly response data on channel = creditcard
is_allow_new_credit_cardbool
is_form_postbool是否為 form post
form_post_urlstring
form_post_dataFormDatarepeated
ecpay_inpay_tokenstring
last_usedbool
invoice_statusInvoiceStatus
upstream_app_idstring
upstream_app_keystring
payment_codePaymentCodeoptional付款代碼,例如 ATM 繳費代碼、 CVS 繳費代碼

PaymentParamsOfCreditCard

FieldTypeLabelDescription
creditcard_idstring

PaymentParamsOfEcpayInpay

FieldTypeLabelDescription
pay_tokenstring

PaymentParamsOfHappypay

FieldTypeLabelDescription
creditcard_idstring

PaymentParamsOfJkopayAuthPay

FieldTypeLabelDescription
auth_nostringoptional
creditcard_idstringoptional

PaymentParamsOfTapPay

FieldTypeLabelDescription
creditcard_idstring
prime_tokenstring
remember_cardbool
creditcard_holderstring
creditcard_phonestring

PurchaseRecord

FieldTypeLabelDescription
trade_idstring
product_namestring
received_amountint64
currencyCurrency
completed_atgoogle.protobuf.Timestamp
received_jpointint64
application_namestring

QueryTransactionReq

FieldTypeLabelDescription
app_idstring
transc_idstringtrade_id
check_codestring

QueryTransactionRes

FieldTypeLabelDescription
transc_idstring
order_idstring
product_namestring
currencyCurrency
priceint64總價
received_amountint64實收金額
received_jpointint64實收 JPoints
created_atgoogle.protobuf.Timestamp
completed_atgoogle.protobuf.Timestamp
statusTransactionStatus
pay_atgoogle.protobuf.Timestamp

RefundTransactionReq

FieldTypeLabelDescription
app_idstring
transc_idstringtrade_id
check_codestring
refund_feedouble退款金額
refund_reasonstring退款原因

RefundTransactionRes

FieldTypeLabelDescription
statusRefundTransactionStatus

SetPaymentMethodReq

FieldTypeLabelDescription
payment_method_idstring
transaction_tokenstring

SetPaymentMethodRes

SetTransactionInvoiceReq

FieldTypeLabelDescription
transaction_tokenstring
invoice_typeInvoiceType
invoice_datastring
reference_trade_idstringoptional, 可以將此筆訂設定為某筆訂單的開發票方式

SetTransactionInvoiceRes

SubscriptionInfo

FieldTypeLabelDescription
periodSubscriptionPeriod.Code
period_intervalint32

SubscriptionPeriod

TransactionTokenInfoReq

FieldTypeLabelDescription
transaction_tokenstring

TransactionTokenInfoRes

FieldTypeLabelDescription
product_namestring
moneyMoney
jpoint_discountint64
jpoint_descriptionstring
platformstring
required_apea_twidbool
payment_selection_expired_atgoogle.protobuf.Timestamp付款選擇過期時間
payment_process_expired_atgoogle.protobuf.Timestamp付款處理過期時間
selected_payment_method_idstringoptional使用者已選擇的付款方式
selected_invoice_settingInvoiceSettingoptional使用者已選擇的發票設定
transasction_statusTranscStatus目前訂單狀態
subscription_infoSubscriptionInfooptional產品端設定的訂閱資訊
transaction_verbose_statusTranscStatus訂單詳細狀態,包含付款錯誤時的狀態
transaction_failed_messagestringoptional訂單錯誤訊息

CreditCard.Status.Value

NameNumberDescription
None0
Temporary1

Currency

NameNumberDescription
None0
TWD1
USD2
USDCENTS4

ErrBase

NameNumberDescription
ErrBaseNone0
ErrTokenExpired1001
ErrTokenInvalid1002

ErrCTCode

NameNumberDescription
ErrCTCNotSet0
ErrCTCCardExpired11001the creditcard is expired
ErrCTCPaymentFailed11002failed to pay via the gateway
ErrCTCCardInfoIncorrect11003the creditcard number does not exist
ErrCTCCardInsufficientBalance11004the balance of the creditcard is insufficient
ErrCTCCardBankDeclined11005the creditcard was declined by the bank, please contact the bank
ErrCTCRetryLater11006please retry the payment later
ErrCTCCardExistsWithToken11007the creditcard has been bound with the user with the card token
ErrCTCCard3DFailed11008the creditcard did not pass 3D verification
ErrCTCContactTicketCenter11009please contact our customer service or submit a ticket

InvoiceStatus

NameNumberDescription
Invoice0
Receipt1
ReceiptPdf2

InvoiceType

NameNumberDescription
NotSet0
Email1
Phone2
ID3
Donate4
Pdf5

PaymentChannel

NameNumberDescription
Creditcard0通用-信用卡-串接模式
ECPAY_INPAY4綠界-INPAY
ATM5ATM
CVS6便利商店
HAPPYPAY_OVERSEAS7HappyPay-信用卡-串接模式
CreditcardTapPay8TapPay-信用卡-串接模式
NOT_SET9
Jpoint10JPoints 全額折抵
Cash11現金
JkopayOnlinePay12街口支付-線上支付
JkopayAuthorizedPaymentRegular13街口支付-定期定額
JkopayAuthorizedPaymentLimited14街口支付-不定期不定額

PaymentCode.CvsInfo.CvsType

NameNumberDescription
NONE0
FAMILY1全家超商
OKC2OK 超商
SEVEN37-11
HILIFE4萊爾富超商

PaymentCode.DisplayInfoUrl.Method

NameNumberDescription
NONE0
POST1
GET2

PaymentType

NameNumberDescription
Domestic_Type0
Foreign_Type1
ATM_Type3
CSV_Type4
NOT_SET_Type5
Jpoint_Type6
Cash_Type7
Jkopay_Type8
Jkopay_Authpay_Type9

RefundTransactionStatus

NameNumberDescription
RTS_FAILED0取消訂單失敗
RTS_REFUNDED_WITHOUT_WITHDRAWAL1取消訂單成功,金流未退款
RTS_REFUNDED2取消訂單成功,金流已退款

SubscriptionPeriod.Code

NameNumberDescription
NONE0
MONTHLY1
YEARLY2
DAY3

TransactionStatus

NameNumberDescription
TS_NOTSET0狀態異常
TS_REFUNDED1已退款
TS_FAILED2訂單失敗, 逾期未付
TS_CREATED3尚未付款
TS_SUCCEEDED4訂單成功
TS_REFUNDED_WITHOUT_WITHDRAWAL5訂單已取消,金流未退款

TranscStatus

NameNumberDescription
TranscStatus_Created0訂單已建立
TranscStatus_Succeeded1訂單完成
TranscStatus_CallbackCompleted2訂單完成且回調完成
TranscStatus_InvoiceCompleted3訂單已開立發票
TranscStatus_SetPayment4訂單已設定付款方式
TranscStatus_SetPaymentCompleted5訂單已設定付款方式且回調完成
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 NameRequest TypeResponse TypeDescription
CreateTransactionTokenCreateTransactionTokenReqCreateTransactionTokenRes後端呼叫 生成一個可以付款的 transaction token
GetTransactionTokenGetTransactionTokenReqGetTransactionTokenRes使用trade_id 產生 transaction token
QueryTransactionQueryTransactionReqQueryTransactionRes查詢訂單狀態
RefundTransactionRefundTransactionReqRefundTransactionRes訂單退款
TransactionTokenInfoTransactionTokenInfoReqTransactionTokenInfoRes取得交易資訊
DiscountTransactionDiscountTransactionReqDiscountTransactionRes用戶使用jpoint 折抵
GetPaymentInfoGetPaymentInfoReqGetPaymentInfoRes取得 transaction token 的付款資訊
SetPaymentMethodSetPaymentMethodReqSetPaymentMethodRes設定訂單付費方式,前端於付費FORM POST前呼叫,記錄訂單付費方式,若在金流端發生異常沒有返回,要查單時才知去哪家金流查
CompleteTransactionCompleteTransactionReqCompleteTransactionRes完成 transaction token 付款
SetTransactionInvoiceSetTransactionInvoiceReqSetTransactionInvoiceRes設定訂單的發票資訊
GetPurchaseRecordGetPurchaseRecordReqGetPurchaseRecordRes取得購買紀錄
GetExchangeRateGetExchangeRateReqGetExchangeRateResother

jkfpay/transaction_api/transaction_api.proto

ChangeSubscriptionStatusReq

ChangeSubscriptionStatusReq 變更訂閱狀態的請求參數

FieldTypeLabelDescription
app_tokenstringapp_token - 應用程式認證 token
subsc_idstringsubsc_id - 系統內部訂閱識別碼
statusSubscriptionStatus.Codestatus - 欲變更的訂閱狀態

ChangeSubscriptionStatusRes

ChangeSubscriptionStatusRes 變更訂閱狀態的回應結果(空回應)

CreateSubscriptionTokenReq

CreateSubscriptionTokenReq 建立訂閱 token 的請求參數

FieldTypeLabelDescription
app_tokenstringapp_token - 應用程式認證 token
product_namestringproduct_name - 訂閱商品名稱
moneytransaction.Moneymoney - 貨幣金額的交易(結帳)與顯示設定
callback_urlstringcallback_url - 交易狀態回呼網址
object_idstringobject_id - PAN 使用者系統物件識別碼,用於關聯用戶身份
redirect_urlstringredirect_url - 交易完成後重導向網址
invoice_remarkstringoptionalinvoice_remark: optional, 發票備註 - 發票備註,只能由產品端設定
payment_channelstransaction.PaymentChannelrepeatedpayment_channels: optional, 指定訂單付款方式 - 限制可用的付款管道
payment_periodPaymentPeriodoptionalpayment_period: 指定付款方式的最短、最長期間 - 各付款方式的時間限制設定
periodSubscriptionPeriod.Codeperiod - 訂閱週期類型(月、年、日)
period_intervalint32period_interval - 訂閱週期間隔數(例如:每2個月為2,每3個月為3)
order_idstringorder_id - 平台自訂訂單編號
subscription_callback_urlstringsubscription_callback_url - 訂閱狀態更新專用回呼網址
downstream_subscription_idstringdownstream_subscription_id - 平台自訂訂閱識別碼

CreateSubscriptionTokenRes

CreateSubscriptionTokenRes 建立訂閱 token 的回應結果

FieldTypeLabelDescription
transaction_tokenstringtransaction_token - 交易 token,用於前端發起首次付款
subsc_idstringsubsc_id - 系統內部訂閱識別碼
transc_idstringtransc_id - 系統內部交易識別碼

CreateTransactionTokenReq

CreateTransactionTokenReq 建立交易 token 的請求參數

FieldTypeLabelDescription
app_idstringjpay application id - 應用程式識別碼
order_idstringplatform custom order ID - 平台自訂訂單編號
product_namestringplatform product name for transaction - 交易商品名稱
moneytransaction.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_urlstringplatform callback_url - 交易狀態回呼網址
object_idstringpan object_id - PAN 使用者系統物件識別碼,用於關聯用戶身份
jpoint_discountint64Deprecated. jpoint_discount is deprecated - 已棄用預先 JPOINTS 點數折扣欄位
check_codestringcheck_code generated by platform with transaction information - 平台生成的交易驗證碼
redirect_urlstringplatform redirect_url - 交易完成後重導向網址
require_apea_twidboolrequire_apea_twid - 是否需要 APEA TWID 驗證
invoice_remarkstringinvoice_remark: optional, 發票備註 - 發票備註,只能由產品端設定
payment_channelstransaction.PaymentChannelrepeatedpayment_channels: optional, 指定訂單付款方式 - 限制可用的付款管道
payment_periodPaymentPeriodoptionalpayment_period: 指定付款方式的最短、最長期間 - 各付款方式的時間限制設定
subscription_periodSubscriptionPeriod.Codeoptionalsubscription_period: 通常由訂閱系統指定續費週期 - 訂閱週期類型
subscription_period_intervalint32optionalsubscription_period_interval: 通常由訂閱系統指定週期間隔 - 訂閱週期間隔數

CreateTransactionTokenRes

CreateTransactionTokenRes 建立交易 token 的回應結果

FieldTypeLabelDescription
transaction_tokenstringtransaction_token - 交易 token,用於前端發起交易
transc_idstringtransc_id - 系統內部交易識別碼

DurationMinMax

DurationMinMax 定義時間期間的最小值與最大值範圍

FieldTypeLabelDescription
mingoogle.protobuf.Durationmin - 最短時間期間
maxgoogle.protobuf.Durationmax - 最長時間期間

PaymentPeriod

PaymentPeriod 定義各種付款方式的時間期間限制

FieldTypeLabelDescription
selection_periodDurationMinMaxoptionalselection_period: 指定第一階段(待選擇付款方式)的最短、最長期間 不同訂單可以接受的期間有所不同,會儘量在 min~max 之間 如果該訂單無法符合 min~max 則無法建立 Transaction 並回傳錯誤
process_cvs_periodDurationMinMaxoptionalprocess_cvs_period: 指定第二階段(付款處理)的便利商店付款最短、最長期間 因為金流差異可以接受的期間有所不同,會儘量在 min~max 之間 如果該金流無法符合 min~max 則無法建立 Transaction 並回傳錯誤
process_atm_periodDurationMinMaxoptionalprocess_atm_period: 指定第二階段(付款處理)的 ATM 轉帳最短、最長期間 因為金流差異可以接受的期間有所不同,會儘量在 min~max 之間 如果該金流無法符合 min~max 則無法建立 Transaction 並回傳錯誤
process_creditcard_periodDurationMinMaxoptionalprocess_creditcard_period: 指定第二階段(付款處理)的信用卡付款最短、最長期間 因為金流差異可以接受的期間有所不同,會儘量在 min~max 之間 如果該金流無法符合 min~max 則無法建立 Transaction 並回傳錯誤
process_jkopay_periodDurationMinMaxoptionalprocess_jkopay_period: 指定第二階段(付款處理)的街口支付最短、最長期間 因為金流差異可以接受的期間有所不同,會儘量在 min~max 之間 如果該金流無法符合 min~max 則無法建立 Transaction 並回傳錯誤

QuerySubscriptionPaymentRecordReq

QuerySubscriptionPaymentRecordReq 查詢訂閱付款記錄的請求參數

FieldTypeLabelDescription
app_tokenstringapp_token - 應用程式認證 token
subsc_idstring
pageint64page - 分頁頁碼(從 1 開始)
page_sizeint64page_size - 每頁記錄數量, 最多 100

QuerySubscriptionPaymentRecordRes

QuerySubscriptionPaymentRecordRes 查詢訂閱付款記錄的回應結果

FieldTypeLabelDescription
recordsSubscriptionPaymentRecordrepeatedrecords - 訂閱付款記錄列表
totalint64total - 符合條件的記錄總數
total_amountint64total_amount - 所有記錄的總金額

QuerySubscriptionReq

QuerySubscriptionReq 查詢訂閱資訊的請求參數

FieldTypeLabelDescription
app_tokenstringapp_token - 應用程式認證 token
subsc_idstringsubsc_id - 系統內部訂閱識別碼

QuerySubscriptionRes

QuerySubscriptionRes 查詢訂閱資訊的回應結果

FieldTypeLabelDescription
subsc_idstringsubsc_id - 系統內部訂閱識別碼
payment_method_idstringpayment_method_id - 用戶綁定的付款方式識別碼
payment_creditcard_idstringpayment_creditcard_id - 用戶綁定的信用卡識別碼
statusSubscriptionStatus.Codestatus - 目前訂閱狀態
next_renew_atgoogle.protobuf.Timestampnext_renew_at - 預定下次續費扣款時間
renewing_atgoogle.protobuf.Timestamprenewing_at - 目前續費處理的開始時間(處理中狀態)
trial_start_atgoogle.protobuf.Timestamptrial_start_at - 試用期開始時間
trial_end_atgoogle.protobuf.Timestamptrial_end_at - 試用期結束時間(之後開始正式扣款)
periodSubscriptionPeriod.Codeperiod - 訂閱週期類型

SubscriptionPaymentRecord

SubscriptionPaymentRecord 訂閱付款記錄(用於記錄每次續費的詳細資訊)

FieldTypeLabelDescription
idstringid - 付款記錄唯一識別碼
transc_idstringtransc_id - 對應的系統交易識別碼
payment_method_idstringpayment_method_id - 此次續費使用的付款方式識別碼
payment_creditcard_idstringpayment_creditcard_id - 此次續費使用的信用卡識別碼
amounttransaction.Moneyamount - 此次續費的付款金額與幣別資訊
created_atgoogle.protobuf.Timestampcreated_at - 付款記錄建立時間
subscription_callback_statusstringsubscription_callback_status - 訂閱回調處理狀態
transaction_statustransaction.TranscStatus

SubscriptionPeriod

SubscriptionPeriod 定義訂閱的週期類型

SubscriptionStatus

SubscriptionStatus 定義訂閱的各種狀態

TransactionApiError

TransactionApiError 定義交易 API 的錯誤代碼

SubscriptionPeriod.Code

NameNumberDescription
NONE0NONE - 無週期/未設定
MONTHLY1MONTHLY - 月付制
YEARLY2YEARLY - 年付制
DAY3DAY - 日付制

SubscriptionStatus.Code

NameNumberDescription
NONE0NONE - 無狀態/未知狀態
CREATED1CREATED - 已建立(尚未進行首次付款)
TRIAL2TRIAL - 試用期中
ACTIVE3ACTIVE - 啟用中(正常續費扣款)
CANCELLED4CANCELLED - 已取消(用戶主動取消,不再續費)
EXPIRED5EXPIRED - 已過期(到期後未續費)
PAUSED6PAUSED - 已暫停(臨時停止續費,可恢復)
PAYMENT_FAILED7PAYMENT_FAILED - 付款失敗(續費扣款失敗)

TransactionApiError.Code

NameNumberDescription
None0None - 無錯誤
PAYMENT_SELECTION_PERIOD_NOT_SUPPORTED1001PAYMENT_SELECTION_PERIOD_NOT_SUPPORTED - 付款選擇期間不支援
PAYMENT_PROCESS_CVS_PERIOD_NOT_SUPPORTED1002PAYMENT_PROCESS_CVS_PERIOD_NOT_SUPPORTED - 便利商店付款處理期間不支援
PAYMENT_PROCESS_ATM_PERIOD_NOT_SUPPORTED1003PAYMENT_PROCESS_ATM_PERIOD_NOT_SUPPORTED - ATM 付款處理期間不支援
PAYMENT_PROCESS_CREDITCARD_PERIOD_NOT_SUPPORTED1004PAYMENT_PROCESS_CREDITCARD_PERIOD_NOT_SUPPORTED - 信用卡付款處理期間不支援
SET_PAYMENT_METHOD_ABOVE_ONCE1005SET_PAYMENT_METHOD_ABOVE_ONCE - 交易只允許設定付款方式一次
SUBSCRIPTION_CHANGE_STATUS_FAILED1006SUBSCRIPTION_CHANGE_STATUS_FAILED - 訂閱狀態變更失敗
PAYMENT_PROCESS_JKOPAY_PERIOD_NOT_SUPPORTED1007PAYMENT_PROCESS_JKOPAY_PERIOD_NOT_SUPPORTED - 街口支付處理期間不支援

TransactionApiService

TransactionApiService 提供交易與訂閱相關的 API 服務

Method NameRequest TypeResponse TypeDescription
CreateTransactionTokenCreateTransactionTokenReqCreateTransactionTokenResCreateTransactionToken 生成一次性交易 token
CreateSubscriptionTokenCreateSubscriptionTokenReqCreateSubscriptionTokenResCreateSubscriptionToken 生成訂閱制交易 token
ChangeSubscriptionStatusChangeSubscriptionStatusReqChangeSubscriptionStatusResChangeSubscriptionStatus 變更訂閱狀態(暫停、取消、恢復等)
QuerySubscriptionQuerySubscriptionReqQuerySubscriptionResQuerySubscription 查詢訂閱詳細資訊與狀態
QuerySubscriptionPaymentRecordQuerySubscriptionPaymentRecordReqQuerySubscriptionPaymentRecordResQuerySubscriptionPaymentRecord 查詢訂閱付款紀錄

model/data_config.proto

model/model.proto

AdminAppPsg

group by app_id, type

FieldTypeLabelDescription
idint64
app_idstring
psg_idstring
psg_method_idstring
typetransaction.PaymentType
statusPsgMethodStatus
priorityint64

Ga4Parameter

Ga4Parameter : Ga4參數

FieldTypeLabelDescription
ga4_client_idstring
ga4_page_titlestring
ga4_page_pathstring
ga4_session_idstring
ga4_engagement_time_msecstring

Psg

FieldTypeLabelDescription
idstring
namestring
providerstring
merchant_idstring
data_configstring
statusint64
invoice_statusint64
create_atgoogle.protobuf.Timestamp

PsgMethod

FieldTypeLabelDescription
idstring
namestring
psgPsg
channeltransaction.PaymentChannel
typetransaction.PaymentTypeoneof data_config
statusPsgMethodStatus

PsgMethodStatus

NameNumberDescription
Close0
Open1

payadmin/admin.proto

AppListReq

FieldTypeLabelDescription
admin_tokenstring

AppListRes

FieldTypeLabelDescription
applicationApplicationrepeated

Application

FieldTypeLabelDescription
app_idstring
app_namestring
statusint64
jpoint_app_namestring
jpoint_app_secret_keystring

CancelSubscriptionReq

FieldTypeLabelDescription
admin_tokenstring
subscription_idstring
reasonstringoptional

CancelSubscriptionRes

CancelSubscriptionRes.Error

CheckTransactionReq

FieldTypeLabelDescription
admin_tokenstring
trade_idstring

CheckTransactionRes

FieldTypeLabelDescription
resultstring

CreateAppPaymentReq

FieldTypeLabelDescription
admin_tokenstring
app_psgCreateAppPaymentReq.CreateAppPsg

CreateAppPaymentReq.CreateAppPsg

FieldTypeLabelDescription
app_idstring
psg_idstring
psg_method_idstring

CreateAppPaymentRes

CreateAppReq

FieldTypeLabelDescription
admin_tokenstring
statusint64
app_namestring
jpoint_app_namestring
jpoint_app_secret_keystring

CreateAppRes

FieldTypeLabelDescription
app_idstring

CreatePaymentMethodReq

FieldTypeLabelDescription
admin_tokenstring
psg_methodmodel.PsgMethod

CreatePaymentMethodRes

FieldTypeLabelDescription
psg_method_idstring

CreatePaymentServiceGatewayReq

FieldTypeLabelDescription
admin_tokenstring
psgmodel.Psg

CreatePaymentServiceGatewayRes

CreateSystemInfoReq

FieldTypeLabelDescription
admin_tokenstring
usd_twd_exchange_ratedouble
statusSystemInfoStatus

CreateSystemInfoRes

FieldTypeLabelDescription
idint64

CreditCard

FieldTypeLabelDescription
idstring
phone_idstring
l4string
created_atgoogle.protobuf.Timestamp
psgmodel.Psg

DeleteSystemInfoReq

FieldTypeLabelDescription
admin_tokenstring
idint64

DeleteSystemInfoRes

GetAppPaymentsReq

app psg

FieldTypeLabelDescription
admin_tokenstring
app_idstring

GetAppPaymentsRes

FieldTypeLabelDescription
app_psgmodel.AdminAppPsgrepeated

GetAppReq

FieldTypeLabelDescription
admin_tokenstring
app_idstring

GetAppRes

FieldTypeLabelDescription
applicationApplication

GetBindCreditcardListReq

FieldTypeLabelDescription
admin_tokenstring
pageint64
limitint64
phone_idstringoptional

GetBindCreditcardListRes

FieldTypeLabelDescription
creditcardsCreditCardrepeated
totalint64

GetChannelsReq

channel

FieldTypeLabelDescription
admin_tokenstring
app_idstring

GetChannelsRes

FieldTypeLabelDescription
channelstransaction.PaymentChannelrepeated

GetPaymentMethodListReq

FieldTypeLabelDescription
admin_tokenstring

GetPaymentMethodListRes

FieldTypeLabelDescription
psg_methodsmodel.PsgMethodrepeated

GetPaymentMethodReq

FieldTypeLabelDescription
admin_tokenstring
psg_method_idstring

GetPaymentMethodRes

FieldTypeLabelDescription
psg_methodmodel.PsgMethod

GetPaymentServiceGatewayReq

FieldTypeLabelDescription
admin_tokenstring
psg_idstring

GetPaymentServiceGatewayRes

FieldTypeLabelDescription
psgmodel.Psg

GetPaymentServiceGatewaysReq

psg

FieldTypeLabelDescription
admin_tokenstring
app_idstringoptional
channelstransaction.PaymentChanneloptional

GetPaymentServiceGatewaysRes

FieldTypeLabelDescription
psgsmodel.Psgrepeated

GetSubscriptionListReq

FieldTypeLabelDescription
admin_tokenstring
pageint64
limitint64
statusint32optional
user_object_idstringoptional
start_atgoogle.protobuf.Timestampoptional
end_atgoogle.protobuf.Timestampoptional
phone_numberstringoptional
app_idstringoptional
subscription_idstringoptional

GetSubscriptionListRes

FieldTypeLabelDescription
recordsSubscriptionRecordrepeated
totalint64
totalAmountint64

GetTransactionGatewayLogReq

FieldTypeLabelDescription
admin_tokenstring
trade_idstringtrade_id 可以擇一帶入
subscription_idstringsubscription_id 可以擇一帶入

GetTransactionGatewayLogRes

FieldTypeLabelDescription
recordsSystemLogRecordrepeated

GetTranscRecordListReq

FieldTypeLabelDescription
admin_tokenstring
pageint64
limitint64
user_object_idstringoptional
trade_idstringoptional
upstream_trade_idstringoptional
downstream_trade_idstringoptional
start_atgoogle.protobuf.Timestampoptional
end_atgoogle.protobuf.Timestampoptional
start_completed_atgoogle.protobuf.Timestampoptional
end_completed_atgoogle.protobuf.Timestampoptional
phone_numberstringoptional
currencyCurrencyoptional
app_idstringoptional
payment_typetransaction.PaymentTypeoptional
statusint32optional
creditcard_idstringoptional
product_name_fuzzystringoptional

GetTranscRecordListRes

FieldTypeLabelDescription
recordsTranscRecordrepeated
totalint64
totalAmountint64

QueryGatewayTransactionReq

FieldTypeLabelDescription
admin_tokenstring
trade_idstring

QueryGatewayTransactionRes

FieldTypeLabelDescription
resultstring

QuerySubscriptionPaymentRecordReq

QuerySubscriptionPaymentRecordReq 查詢訂閱付款記錄的請求參數

FieldTypeLabelDescription
admin_tokenstringadmin_token - JKFC 認證 token
subsc_idstring
pageint64page - 分頁頁碼(從 1 開始)
page_sizeint64page_size - 每頁記錄數量, 最多 100

QuerySubscriptionPaymentRecordRes

QuerySubscriptionPaymentRecordRes 查詢訂閱付款記錄的回應結果

FieldTypeLabelDescription
recordsjkfpay.transaction_api.SubscriptionPaymentRecordrepeatedrecords - 訂閱付款記錄列表
totalint64total - 符合條件的記錄總數
total_amountint64total_amount - 所有記錄的總金額

QuerySystemInfoListReq

FieldTypeLabelDescription
admin_tokenstring
pageint64
page_sizeint64
statusSystemInfoStatusoptional

QuerySystemInfoListRes

FieldTypeLabelDescription
system_infosSystemInforepeated
totalint64

RenewSubscriptionReq

FieldTypeLabelDescription
admin_tokenstring
subscription_idstring
force_renewbool

RenewSubscriptionRes

RenewSubscriptionRes.Error

RevokeOrderReq

FieldTypeLabelDescription
admin_tokenstring
trade_idstring

RevokeOrderRes

SubscriptionRecord

FieldTypeLabelDescription
idstring
app_idstring
subscription_tokenstringoptional
object_idstring
phone_idstring
product_namestring
moneytransaction.Money
display_moneytransaction.Money
callback_urlstring
redirect_urlstring
statusint32
periodint32
period_intervalint32
payment_method_idstring
payment_creditcard_idstring
next_renew_atgoogle.protobuf.Timestampoptional
renewing_atgoogle.protobuf.Timestampoptional
trial_start_atgoogle.protobuf.Timestampoptional
trial_end_atgoogle.protobuf.Timestampoptional
invoice_remarkstring
invoice_typestring
invoice_datastring
subscription_callback_urlstring
downstream_subscription_idstring
require_apea_twidbool
payment_channelstransaction.PaymentChannelrepeated
display_exchange_ratefloat
payment_periodjkfpay.transaction_api.PaymentPeriodoptionalpayment_period: 指定付款方式的最短、最長期間,因為訂單條件與金流差異而系統可以接受的期間有所不同,
created_atgoogle.protobuf.Timestamp
updated_atgoogle.protobuf.Timestamp

SystemInfo

SystemInfo related messages

FieldTypeLabelDescription
idint64
usd_twd_exchange_ratedouble
statusSystemInfoStatus
created_atgoogle.protobuf.Timestamp
updated_atgoogle.protobuf.Timestamp
deleted_atgoogle.protobuf.Timestamp

SystemLogRecord

FieldTypeLabelDescription
idstring
namestring
datastring
created_atgoogle.protobuf.Timestamp

TranscRecord

FieldTypeLabelDescription
user_object_idstringPan Object ID
trade_idstringJPay 訂單號
downstream_trade_idstring平台端的訂單號
upstream_trade_idstring金流端訂單號
product_namestring商品名稱
required_amountint64應收金額, 幣別跟著 payment_currency 走
received_amountint64實收金額, 幣別跟著 payment_currency 走
currencystring交易幣別
created_atgoogle.protobuf.Timestamp訂單建立時間
phonestring付款人手機號碼
redirect_urlstring平台端前端返回位址
completed_atgoogle.protobuf.Timestamp訂單完成時間
ipstring訂單操作 IP 紀錄
received_jpointint64實收 JPoints
phone_idstringPhone ID is renamed to JPass ID
application_namestring平台端應用名稱
psg_providerstring金流閘道提供者
psg_merchant_idstring金流閘道商家號碼
psg_method_channelstring金流扣款通道
paymentTypetransaction.PaymentTypeJPay 付款類型
failed_messagestring交易錯誤訊息
statusint32訂單狀態
transaction_amountint64交易金額
payment_currencystring扣款幣別
payment_amountint64扣款金額
creditcard_idstring信用卡 ID
set_payment_atgoogle.protobuf.Timestamp已設定付款方式的時間
payment_expiregoogle.protobuf.Timestamp付款處理的到期時間
selection_expiregoogle.protobuf.Timestamp待選擇付款方式的到期時間
callback_urlstring回調平台端提供的後端位址
method_infostring付款方式的額外資訊
payment_codestring付款代碼, ex., ATM Code, CVS Code
renewal_subscription_idstring訂閱續費 ID

UnbindCreditcardReq

FieldTypeLabelDescription
admin_tokenstring
creditcard_idstring

UnbindCreditcardRes

UpdateAppPaymentPriorityReq

FieldTypeLabelDescription
admin_tokenstring
idsint64repeated

UpdateAppPaymentPriorityRes

UpdateAppPaymentStatusReq

FieldTypeLabelDescription
admin_tokenstring
idint64
statusmodel.PsgMethodStatus

UpdateAppPaymentStatusRes

UpdateAppReq

FieldTypeLabelDescription
admin_tokenstring
app_idstring
app_namestring
statusint64
jpoint_app_namestring
jpoint_app_secret_keystring

UpdateAppRes

UpdateAppStatusReq

FieldTypeLabelDescription
admin_tokenstring
app_idstring
statusint64

UpdateAppStatusRes

UpdatePaymentMethodReq

FieldTypeLabelDescription
admin_tokenstring
psg_methodmodel.PsgMethod

UpdatePaymentMethodRes

UpdatePaymentMethodStatusReq

FieldTypeLabelDescription
admin_tokenstring
psg_method_idstring
statusint64

UpdatePaymentMethodStatusRes

UpdatePaymentServiceGatewayReq

FieldTypeLabelDescription
admin_tokenstring
psgmodel.Psg

UpdatePaymentServiceGatewayRes

UpdatePaymentServiceGatewayStatusReq

FieldTypeLabelDescription
admin_tokenstring
psg_idstring
statusint64

UpdatePaymentServiceGatewayStatusRes

UpdateSystemInfoReq

FieldTypeLabelDescription
admin_tokenstring
idint64
usd_twd_exchange_ratedoubleoptional
statusSystemInfoStatusoptional

UpdateSystemInfoRes

WithdrawOrderReq

FieldTypeLabelDescription
admin_tokenstring
trade_idstring

WithdrawOrderRes

CancelSubscriptionRes.Error.Code

NameNumberDescription
NONE0
FAILED1001

Currency

NameNumberDescription
CURRENCY_NOT_SET0
CURRENCY_TWD1
CURRENCY_USD2
CURRENCY_USD_CENTS4

RenewSubscriptionRes.Error.Code

NameNumberDescription
NONE0
FAILED1001
PAYMENT_FAILED1002

SystemInfoStatus

NameNumberDescription
SYSTEM_INFO_STATUS_UNSPECIFIED0
SYSTEM_INFO_STATUS_ACTIVE1
SYSTEM_INFO_STATUS_INACTIVE2

AdminService

Method NameRequest TypeResponse TypeDescription
CheckTransactionCheckTransactionReqCheckTransactionRes查詢 transaction 結果
QueryGatewayTransactionQueryGatewayTransactionReqQueryGatewayTransactionRes查詢金流端的 transaction 紀錄
GetTranscRecordListGetTranscRecordListReqGetTranscRecordListRes
GetTransactionGatewayLogGetTransactionGatewayLogReqGetTransactionGatewayLogRes查詢訂單與金流端的紀錄
AppListAppListReqAppListResapplication
CreateAppCreateAppReqCreateAppRes
GetAppGetAppReqGetAppRes
UpdateAppUpdateAppReqUpdateAppRes
RevokeOrderRevokeOrderReqRevokeOrderRes退款
WithdrawOrderWithdrawOrderReqWithdrawOrderRes退單
GetBindCreditcardListGetBindCreditcardListReqGetBindCreditcardListRes綁卡資訊
UnbindCreditcardUnbindCreditcardReqUnbindCreditcardRes
CreateSystemInfoCreateSystemInfoReqCreateSystemInfoRessystem info
UpdateSystemInfoUpdateSystemInfoReqUpdateSystemInfoRes
QuerySystemInfoListQuerySystemInfoListReqQuerySystemInfoListRes
DeleteSystemInfoDeleteSystemInfoReqDeleteSystemInfoRes
GetPaymentServiceGatewaysGetPaymentServiceGatewaysReqGetPaymentServiceGatewaysRespsg
CreatePaymentServiceGatewayCreatePaymentServiceGatewayReqCreatePaymentServiceGatewayRes
GetPaymentServiceGatewayGetPaymentServiceGatewayReqGetPaymentServiceGatewayRes
UpdatePaymentServiceGatewayUpdatePaymentServiceGatewayReqUpdatePaymentServiceGatewayRes
GetAppPaymentsGetAppPaymentsReqGetAppPaymentsResapp_psg (對應table app_psg_method, 舊版app_psg廢棄)
CreateAppPaymentCreateAppPaymentReqCreateAppPaymentRes
UpdateAppPaymentStatusUpdateAppPaymentStatusReqUpdateAppPaymentStatusRes
UpdateAppPaymentPriorityUpdateAppPaymentPriorityReqUpdateAppPaymentPriorityRes
CreatePaymentMethodCreatePaymentMethodReqCreatePaymentMethodRespsg_method
GetPaymentMethodGetPaymentMethodReqGetPaymentMethodRes
GetPaymentMethodListGetPaymentMethodListReqGetPaymentMethodListRes
UpdatePaymentMethodUpdatePaymentMethodReqUpdatePaymentMethodRes
GetSubscriptionListGetSubscriptionListReqGetSubscriptionListResList subscriptions
CancelSubscriptionCancelSubscriptionReqCancelSubscriptionResCancel subscription
RenewSubscriptionRenewSubscriptionReqRenewSubscriptionResRenew subscription
QuerySubscriptionPaymentRecordQuerySubscriptionPaymentRecordReqQuerySubscriptionPaymentRecordResQuery subscription payment record

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)