Learn how to track sale conversion events with Stripe and CodeQR
sale
event happens when a user purchases your product or service. Examples include:
Find CodeQR on the Stripe App Marketplace
Install the Stripe app
Connect Stripe to your CodeQR workspace
customer.created
: When a new customer is createdcustomer.updated
: When a customer is updatedcheckout.session.completed
: When a customer completes a checkout sessioninvoice.paid
: When an invoice is paid (for tracking recurring subscriptions)charge.refunded
: When a charge is refunded (for tracking refunds and updating payout commissions for CodeQR Partners)?codeqr_client_reference_id=1
query parameter to your Stripe Payment Link when shortening it on CodeQR.
Then, when a user clicks on the shortened link, CodeQR will automatically append the unique click ID as the client_reference_id
query parameter to the payment link.
externalId
with their Stripe customer ID for future reference.
Alternatively, if you have a marketing site that you’re redirecting your users to first, you can do this instead:
cq_id
in the URL and stores it as a first-party cookie on your site.
cq_id
value as the client_reference_id
parameter to the payment links on your pricing page / CTA button (prefixed with codeqr_id_
).
What if I'm using Stripe Pricing Tables?
client-reference-id
attribute instead:What if I'm using Stripe's Checkout Sessions API?
codeqr_id_
) as the client_reference_id
parameter to enable conversion tracking with CodeQR.checkout.sessions.create
API, you’d want to associate the Stripe customer object with the user’s unique ID in your database (which we tracked in the lead conversion tracking step).
This will allow CodeQR to automatically listen for purchase events from Stripe and associate them with the original click event (and by extension, the link that the user came from).
How does this work?
codeqr.track.lead
call?codeqrCustomerId
value in the metadata
field.
cq_id
) in the Stripe customer creation flow.
First, you’ll need to complete the following prerequisites:
codeqrCustomerId
value in the metadata
field.
codeqrCustomerId
and codeqrClickId
values in the metadata
field of the Stripe customer update flow:
USD
. We will
add the ability to customize that in the future.