测试
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": "The major Google Pay API version. Currently, this must be 2." }, "api_version_minor": { "meta_type": "number", "meta_required": true, "meta_editable": false, "meta_hoverText": "The minor Google Pay API version. Currently, this must be 0." }, "environment": { "meta_type": "select", "meta_required": true, "meta_options": ["TEST", "PRODUCTION"], "meta_hoverText": "The Google Pay environment." }, "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": "The user-facing name of the merchant that will appear on the Google Pay payment sheet." }, "merchant_id": { "meta_type": "text", "meta_required": true, "meta_hoverText": "The Google Pay Merchant ID. Use a dummy value or 'TEST' for the TEST environment as configured in the handler configuration; use the real Merchant ID for PRODUCTION." }, "merchant_origin": { "meta_type": "text", "meta_hoverText": "The fully qualified domain name where the checkout occurs, used for origin validation." }, "auth_jwt": { "meta_type": "text", "meta_hoverText": "An optional authorization JWT for certain integration contexts." } }, "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": "受支持的支付方式类型的标识符。CARD 是唯一支持的值。}, "parameters": { "meta_type": "object", "meta_required": true, "meta_documentation": "https://developers.google.com/pay/api/web/reference/request-objects#CardParameters", "meta_hoverText": "配置提供的支付方式类型所需的参数。For the CARD type use 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 returns PAN and expiration for cards on file with the user's 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": "The card networks supported by the merchant and the Google Pay API." }, "allow_prepaid_cards": { "meta_type": "checkbox", "meta_hoverText": "Set to false if you don't support prepaid cards. Default is true." }, "allow_credit_cards": { "meta_type": "checkbox", "meta_hoverText": "Set to false if you don't support credit cards. Default is true." }, "billing_address_required": { "meta_type": "checkbox", "meta_hoverText": "Set to true if you require a billing address." }, "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 支付信息. 此属性是 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=" } } } ] } } ] } }
×
管理预设内容
未保存的更改
您有未保存的更改。确定要加载此预设内容并丢失所做的更改吗?
取消
舍弃更改