Skip to main content

payment_info_submitted
interface

The payment_info_submitted event logs an instance of a customer submitting their payment information. This event is available on the checkout page.

string

The client-side ID of the customer, provided by Shopify

string

The ID of the customer event

string

The name of the customer event

number

The sequence index number of the event.

string

The timestamp of when the customer event occurred, in ISO 8601 format

.Standard
Was this section helpful?

Accessing Standard Events

import {register} from '@shopify/web-pixels-extension';

register(({analytics}) => {
analytics.subscribe('payment_info_submitted', (event) => {
// Example for accessing event data
const checkout = event.data.checkout;

const checkoutTotalPrice = checkout.totalPrice?.amount;

const firstDiscountType = checkout.discountApplications[0]?.type;

const discountCode =
firstDiscountType === 'DISCOUNT_CODE'
? checkout.discountApplications[0]?.title
: null;

const payload = {
event_name: event.name,
event_data: {
totalPrice: checkoutTotalPrice,
firstDiscountCode: discountCode,
},
};

// Example for sending event to third party servers
fetch('https://example.com/pixel', {
method: 'POST',
body: JSON.stringify(payload),
keepalive: true,
});
});
});