add_payment_info
The add_payment_info event fires when a user completes the payment step of checkout. The key parameter here is payment_type — which payment method did they select? Credit card, PayPal, Klarna, Apple Pay? This data helps you understand payment method preferences and whether certain payment options correlate with higher checkout completion rates.
When to fire
Section titled “When to fire”Fire add_payment_info when:
- The user selects a payment method and clicks “Continue” or “Place Order”
- The payment step is completed in a single-page checkout
- The user confirms their payment method selection
Do not fire it when the payment step loads — fire when the user completes the step and advances.
Complete dataLayer push
Section titled “Complete dataLayer push”// Always clear previous ecommerce data firstdataLayer.push({ ecommerce: null });
dataLayer.push({ event: 'add_payment_info', ecommerce: { currency: 'USD', value: 174.47, coupon: 'SUMMER15', payment_type: 'credit_card', items: [ { item_id: 'SKU-001-BLK-L', item_name: 'Classic Leather Jacket', item_brand: 'Heritage Co.', item_category: 'Apparel', item_category2: 'Outerwear', item_variant: 'Black / Large', price: 89.99, quantity: 1, coupon: 'SUMMER15', discount: 13.50, affiliation: 'Online Store' }, { item_id: 'SKU-047-WHT-M', item_name: 'Cotton Crew T-Shirt', item_brand: 'Heritage Co.', item_category: 'Apparel', item_category2: 'Tops', item_variant: 'White / Medium', price: 24.99, quantity: 2, coupon: '', discount: 0, affiliation: 'Online Store' }, { item_id: 'SKU-112-TAN-34', item_name: 'Woven Leather Belt', item_brand: 'Heritage Co.', item_category: 'Accessories', item_category2: 'Belts', item_variant: 'Tan / 34', price: 34.50, quantity: 1, coupon: '', discount: 0, affiliation: 'Online Store' } ] }});Event schema
Section titled “Event schema”| Parameter | Type | Required | Description |
|---|---|---|---|
| event | string | Required | Must be "add_payment_info" |
| ecommerce.currency | string | Required | ISO 4217 currency code. |
| ecommerce.value | number | Required | Cart subtotal (before tax and shipping). |
| ecommerce.coupon | string | Optional | Order-level coupon code if applied. |
| ecommerce.payment_type | string | Optional | The selected payment method. Standardize values across your implementation. |
| ecommerce.items[] | Array<Item> | Required | All items in the cart at payment step. |
| items[].item_id | string | Required | SKU or variant-level product identifier. |
| items[].item_name | string | Required | Product name. |
| items[].price | number | Optional | Unit price. |
| items[].quantity | number | Optional | Quantity. |
| items[].coupon | string | Optional | Item-level coupon. |
| items[].discount | number | Optional | Item-level discount. |
Payment type values
Section titled “Payment type values”Use consistent, lowercase values for payment_type. These are the recommended values:
payment_type: 'credit_card' // Visa, Mastercard, Amexpayment_type: 'debit_card'payment_type: 'paypal'payment_type: 'apple_pay'payment_type: 'google_pay'payment_type: 'klarna'payment_type: 'afterpay'payment_type: 'bank_transfer'payment_type: 'gift_card'payment_type: 'store_credit'If you need to distinguish credit card brands (Visa vs. Amex), you can include the brand: payment_type: 'visa', payment_type: 'amex'.
GTM configuration
Section titled “GTM configuration”-
Create a Custom Event trigger. Event name:
add_payment_info. Name itCE - add_payment_info. -
Create Data Layer Variables for
ecommerce.currency,ecommerce.value,ecommerce.coupon,ecommerce.payment_type, andecommerce.items. -
Create the GA4 Event tag. Event name:
add_payment_info. Enable Send Ecommerce data. Addcurrency,value,coupon, andpayment_typeas explicit event parameters. -
Test in Preview mode. Select different payment methods and advance through the checkout. Confirm
payment_typechanges correctly for each selection.
Common mistakes
Section titled “Common mistakes”Not capturing the actual payment method. If your payment step has multiple options (credit card, PayPal, Klarna) but you always push payment_type: 'credit_card', you’re losing the distribution data. Dynamically read the selected payment option from the checkout form state.
Firing before the user selects a method. If the payment step auto-selects a default payment method and you fire on step load, you’re capturing the default — not the user’s actual choice if they change it before advancing.