GA4 - How To Validate Add Payment Info

Parameters to validate add_payment_info

Required Parameters

currency (string) - Required when value is set

  • Must be 3-letter ISO 4217 format: USD, EUR, GBP
  • Without currency, revenue metrics won’t calculate
  • Common mistake: “usd” instead of “USD”

value (number) - Required for revenue tracking

  • Must be number, not string
  • Sum of (price × quantity) for all items
  • Do NOT include tax or shipping
  • Common mistake: “30.03” as string instead of 30.03 number

items - Required

  • Must be array, even for single item
  • Cannot be empty
  • Each item needs item_id OR item_name
  • Common mistake: empty array or object instead of array

item_id OR item_name (string) - At least one required per item

  • Every item must have one of these
  • item_id preferred for tracking
  • Common mistake: providing neither

Optional Parameters

payment_type (string)

  • Examples: “Credit Card”, “PayPal”, “Apple Pay”, “Debit Card”

Validate add_payment_info using AH Debugger

1

Install and Enable AH Debugger

  1. Install AH Debugger extension from Chrome Web Store ,

  2. Click on the puzzle Icon on the top right of your browser,

  3. Optionally pin the AH Debugger extension for easy access.

  4. Click on the extension icon

  5. Enable the debugger clicking on red toggle

Get Selector button
Enable Debugger
2

View Event in Console Tab

  1. Open Chrome DevTools by pressing F12 or right-clicking anywhere and selecting Inspect.

  2. Click the Console tab in DevTools and trigger the event on your website.

  3. Check for the event name you want to validate, and click to expand it and check the hit parameters

3

View Event in AH Debugger Panel

  1. Open Chrome DevTools by pressing F12 or right-clicking anywhere and selecting Inspect.

  2. Click on AH Debugger panel. If not present, click on the double-arrow on the right and from the dropdown click on AH Debugger.

  3. Use Global and Local search to find the or specific parameters you want to validate.

  4. Start validating the parameters to ensure they match with what GA4 expects to receive for that event.

  • Built-in Tests: If any is present, you will see on the right side the results. Click on the number and a modal with the results will show up.

Validate add_payment_info using Chrome DevTools

1

Open Chrome DevTools Network

  1. Navigate to your checkout payment page, then press F12 (Windows/Linux) or Cmd+Option+I (Mac). Alternatively, right-click anywhere on the page and select Inspect.

  2. Click the Network tab in the DevTools panel.

2

Setup Network Tab

  1. In the filter box, type: collect to show only GA4 requests or the event name.
  2. Select the Network Request to debug
  3. Inspect and Validate parameters existence and values

Click the Payload tab.

Find “Query String Parameters” section.

Look for these key parameters:

en=add_payment_info           ← Event name
v=2                          ← Protocol version
tid=G-XXXXXXXXXX             ← Your Measurement ID
epn.value=77.97              ← Value (number type)
epc.currency=USD             ← Currency
ep.payment_type=Credit%20Card ← Payment type
pr1id=TSHIRT001              ← First item ID
pr1nm=Blue%20T-Shirt         ← First item name
pr1pr=29.99                  ← First item price
pr1qt=2                      ← First item quantity
pr2id=SHORTS001              ← Second item ID
pr2pr=17.99                  ← Second item price
pr2qt=1                      ← Second item quantity
3

Validate Request Status

Look at the Status column:

  • 2xx (shown in green) = Success
  • 4xx (red) = Bad request
  • 5xx (red) = Bad request
  • Failed (red) = Network error, ad blocker, Google Ads account suspended. Usually with error code “-1”

Automated Validation for GA4 add_payment_info

Manual validation can be time-consuming and error-prone. Consider using AssertionHub Automated to set up automated tests that continuously monitor your GA4 implementation, including the add_payment_info event.

Discover more about AssertionHub Automated for your GA4 and other events here.

Automated Validation for GA4 Events
Powered by beluacode Logo