The UCP Code Generator lets you quickly customize, validate, and generate the JSON configuration required for the Google Pay payment handler under the Universal Commerce Protocol (UCP).
How to use this tool
- Clicking on the arrow to the right of an object label will open it for editing, or close it if it's already open.
- Clicking on the ⓘ icon to the left of an object label will open documentation for that parameter.
- Clicking on an optional field's label (rendered in dark gray) enables or disables it. Disabled fields are grayed out, collapsed, and excluded from the generated configuration. Editing a disabled field or selecting a value automatically re-enables it.
- Clicking the delete button next to array elements or after complex objects will remove that item from the list.
- Multi-select fields will let you select multiple entries at the same time. Click an option to select or deselect it, and control or command-click to deselect all other options.
- As you edit parameters, the configuration JSON will automatically update based on your settings, and notify you when a configuration is known to be invalid.