測試
PROD
閘道
直接
管理預設設定
在 JSFiddle 中開啟
提示:按一下任何選填欄位標籤 (游標懸停時會顯示底線),即可在 JSON 中啟用或停用該欄位。
設定 JSON
{ "payment_handlers": { "meta_type": "object", "meta_required": true, "meta_documentation": "https://developers.google.com/pay/api/universal-commerce-protocol/reference/config", "com.google.pay": [ { "meta_type": "object", "meta_required": true, "meta_documentation": "https://developers.google.com/pay/api/universal-commerce-protocol/reference/config", "meta_addButtonText": "Add payment handler", "id": { "meta_type": "text", "meta_required": true, "meta_hoverText": "A unique identifier for this handler configuration instance (typically a UUIDv4)." }, "version": { "meta_type": "text", "meta_required": true, "meta_editable": false }, "spec": { "meta_type": "text", "meta_required": true, "meta_editable": false }, "schema": { "meta_type": "text", "meta_required": true, "meta_editable": false }, "config": { "meta_type": "object", "meta_required": true, "meta_documentation": "https://pay.google.com/gp/p/ucp/2026-01-23/schemas/config.json", "api_version": { "meta_type": "number", "meta_required": true, "meta_editable": false, "meta_hoverText": "Google Pay API 主要版本。目前必須是 2。" }, "api_version_minor": { "meta_type": "number", "meta_required": true, "meta_editable": false, "meta_hoverText": "Google Pay API 次要版本。目前必須為 0。" }, "environment": { "meta_type": "select", "meta_required": true, "meta_options": ["TEST", "PRODUCTION"], "meta_hoverText": "Google Pay 環境。" }, "merchant_info": { "meta_type": "object", "meta_required": true, "meta_documentation": "https://developers.google.com/pay/api/web/reference/request-objects#MerchantInfo", "meta_hoverText": "Identity details for the merchant as required by the Google Pay UCP handler.", "merchant_name": { "meta_type": "text", "meta_hoverText": "面向使用者的商家名稱,會顯示在 Google Pay 付款畫面。" }, "merchant_id": { "meta_type": "text", "meta_required": true, "meta_hoverText": "Google Pay 商家 ID。請根據處理常式設定,在測試環境中使用虛擬值或「TEST」;在正式環境中使用實際的商家 ID。}, "merchant_origin": { "meta_type": "text", "meta_hoverText": "結帳時使用的完整網域名稱。" }, "auth_jwt": { "meta_type": "text", "meta_hoverText": "特定整合情境的選用授權 JWT。" } }, "allowed_payment_methods": [ { "meta_type": "object", "meta_required": true, "meta_documentation": "https://developers.google.com/pay/api/web/reference/request-objects#PaymentMethod", "meta_hoverText": "Configuration options for an allowed payment method and its tokenization or processing specifications.", "meta_addButtonText": "新增付款方式", "type": { "meta_type": "select", "meta_required": true, "meta_options": ["CARD"], "meta_hoverText": "支援付款方式類型的 ID。CARD 是唯一支援的值。" }, "parameters": { "meta_type": "object", "meta_required": true, "meta_documentation": "https://developers.google.com/pay/api/web/reference/request-objects#CardParameters", "meta_hoverText": "Parameters required to configure the provided payment method type. 如果是 CARD 類型,請使用 CardParameters。", "allowed_auth_methods": { "meta_type": "select", "meta_required": true, "meta_multiple": true, "meta_options": ["PAN_ONLY"], "meta_hoverText": "Fields supported to authenticate a card transaction. PAN_ONLY 會傳回使用者 Google 帳戶中已登錄卡片的主帳號和到期日。" }, "allowed_card_networks": { "meta_type": "select", "meta_required": true, "meta_multiple": true, "meta_options": [ "AMEX", "DISCOVER", "ELECTRON", "ELO", "ELO_DEBIT", "INTERAC", "JCB", "MAESTRO", "MASTERCARD", "VISA" ], "meta_hoverText": "商家和 Google Pay API 支援的卡片聯名組織。" }, "allow_prepaid_cards": { "meta_type": "checkbox", "meta_hoverText": "Set to false if you don't support prepaid cards. 預設值為 true。}, "allow_credit_cards": { "meta_type": "checkbox", "meta_hoverText": "如果不支援信用卡,請設為 false。預設值為 true。}, "billing_address_required": { "meta_type": "checkbox", "meta_hoverText": "如需帳單地址,請設為 true。" }, "billing_address_parameters": { "meta_type": "object", "meta_documentation": "https://developers.google.com/pay/api/web/reference/request-objects#BillingAddressParameters", "meta_hoverText": "The expected fields returned if billing_address_required is set to true.", "format": { "meta_type": "select", "meta_options": ["MIN", "FULL", "FULL-ISO3166"], "meta_hoverText": "Billing address format required to complete the transaction." }, "phone_number_required": { "meta_type": "checkbox", "meta_hoverText": "Set to true if a phone number is required to process the transaction." } } }, "tokenization_specification": { "meta_type": "object", "meta_required": true, "meta_documentation": "https://developers.google.com/pay/api/web/reference/request-objects#PaymentMethodTokenizationSpecification", "meta_hoverText": "Configure an account or decryption provider to receive payment information. CARD 付款方式必須提供這項屬性。", "type": { "meta_type": "select", "meta_required": true, "meta_options": ["PAYMENT_GATEWAY", "DIRECT"], "meta_hide_children": { "PAYMENT_GATEWAY": ["parameters.protocolVersion", "parameters.publicKey"], "DIRECT": ["parameters.gateway", "parameters.gatewayMerchantId"] }, "meta_hoverText": "A payment method tokenization type is supported for the given PaymentMethod. 如要使用 CARD 付款方式,請使用 PAYMENT_GATEWAY 或 DIRECT。」 }, "parameters": { "meta_type": "object", "meta_hoverText": "Parameters specific to the selected payment method tokenization type.", "gateway": { "meta_type": "text", "meta_documentation": "https://developers.google.com/pay/api/web/guides/tutorial#tokenization" }, "gatewayMerchantId": { "meta_type": "text" }, "protocolVersion": { "meta_type": "text" }, "publicKey": { "meta_type": "text" } } } } ] } } ] } }
{ "payment_handlers": { "com.google.pay": [ { "id": "8c9202bd-63cc-4241-8d24-d57ce69ea31c", "version": "2026-01-23", "spec": "https://pay.google.com/gp/p/ucp/2026-01-23/", "schema": "https://pay.google.com/gp/p/ucp/2026-01-23/schemas/config.json", "config": { "api_version": 2, "api_version_minor": 0, "environment": "TEST", "merchant_info": { "merchant_name": "Example Merchant", "merchant_id": "KWMZPRLQFTYNXSDB", "merchant_origin": "checkout.merchant.com" }, "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA" ] }, "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "example", "gatewayMerchantId": "exampleGatewayMerchantId" } } } ] } } ] } }
{ "payment_handlers": { "com.google.pay": [ { "id": "8c9202bd-63cc-4241-8d24-d57ce69ea31c", "version": "2026-01-23", "spec": "https://pay.google.com/gp/p/ucp/2026-01-23/", "schema": "https://pay.google.com/gp/p/ucp/2026-01-23/schemas/config.json", "config": { "api_version": 2, "api_version_minor": 0, "environment": "TEST", "merchant_info": { "merchant_name": "Example Merchant", "merchant_id": "KWMZPRLQFTYNXSDB", "merchant_origin": "checkout.merchant.com" }, "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA" ] }, "tokenization_specification": { "type": "DIRECT", "parameters": { "protocolVersion": "ECv2", "publicKey": "BOdoXP+96CFr24tD6MRHJgdqbhxlV79Sp4t8jiFHgZT71nJIHPM+/REv7b1V5A52u1WjC4m6Z4wG4/k7g8A=" } } } ] } } ] } }
×
管理預設設定
尚未儲存變更
您的變更尚未儲存。確定要載入這項預設設定,並捨棄變更嗎?
取消
捨棄變更