测试
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": "此处理程序配置实例的唯一标识符(通常为 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": "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": "Add payment method", "type": { "meta_type": "select", "meta_required": true, "meta_options": ["CARD"], "meta_hoverText": "An identifier for the type of supported payment method. 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 账号中留存的银行卡的 PAN 和到期日期。” }, "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": "如果您不支持预付卡,请设置为 false。默认值为 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": "如果 billing_address_required 设置为 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": "如果需要电话号码才能处理交易,请设置为 true。" } } }, "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=" } } } ] } } ] } }
×
管理预设
尚未保存更改
您有尚未保存的更改。确定要加载此预设并舍弃您所做的更改吗?
取消
舍弃更改