Skip to main content

Checkout Purchase Flow

Understand what happens after a successful purchase

After a user completes a purchase on your Uscreen storefront, they're directed to a confirmation page that appears for 10 seconds before automatically redirecting them. This brief delay serves two important purposes:

  1. It allows any tracking code or conversion pixels to run

  2. It gives users a moment to see the purchase confirmation


Default Redirect Behavior

After the 10-second delay, users are redirected based on where they started the checkout process.

  • From the Join Us page: Users are redirected to the Catalog (/catalog)

  • From a specific video, collection, or live event: Users are redirected back to that specific content page (/programs/seoURL)

  • From a bundle link: Users are redirected to the Library page if My Library (/library)is enabled or the Catalog, if disabled

To determine where to redirect users, Uscreen uses cookies to track the last viewed content. This ensures a seamless user experience by returning customers to the content they were interested in.

📝 NOTE: If you're testing the checkout flow and clicking around multiple pages before completing a purchase, you might get redirected to an unexpected location. Use an incognito browser or clear the cookies for more predictable testing.


Custom Conversion Tracking

If you need to track conversions for web purchases in platforms outside of Uscreen (like ad platforms or analytics tools), you can use the JSON payload available on the /checkout/success page.

Confirmation Page URL Structure

Legacy

Example: https://yourdomain.com/checkout/success?i=12345678&o=543210&p=543210

Parameter Values:

  • i = refers to the invoice ID

  • o = refers to the order ID (offer ID of subscription/bundles)

  • p = refers to the product ID (for individual one-time purchase content)

ℹ️ INFO: For subscription or bundle purchases, you'll notice that the offer ID and the product ID are identical.

Stripe Billing (Subscription Offer)

Example: https://yourdomain.com/checkout/success?o=543210&subscription=sub_abc123

Stripe Billing (One-time Offer)

Example: https://yourdomain.com/checkout/success?o=543210&payment_intent=pi_abc123

Parameter Values:

  • subscription = the Stripe subscription ID (subscriptions)

  • payment_intent = the Stripe payment intent ID (one-time purchases)

  • o = order ID (offer ID); appears in both Subscription and One-time Offer URLs

Stripe Billing (Free or Added via Signup)

  • o = order ID (offer ID)

  • added_with_signup = true (indicates a free product added via signup and no invoice created)

🔗 Learn more about Stripe Billing

ℹ️ INFO: For free products added via signup, the confirmation URL uses ?o=...&added_with_signup=true and does not include an invoice ID, as no paid invoice is created.

Purchase Payload

When a purchase is completed, Uscreen provides a JSON payload with valuable transaction data that you can access and use.

amount: "0.00"
country_code: ""
customer_email: "user@email.com"
customer_name: "name"
discount: "0.00"
id: "12345678"
ip_address: "192.168.0.0"
offer_id: 543210
title: "Monthly Subscription"
total: "0.00"
transaction_id: ""

Pair this data with any cookies or URL parameters you might have stored to pass conversion data to another platform. You can add code that targets this page in the Purchase Code Snippet section.

⚠️ WARNING: Our support team cannot provide in-depth assistance with setting up the custom tracking code. For specialized help, we recommend consulting with a web developer or analytics professional.


Test the Checkout

You can easily test the checkout and create a mock purchase by using a coupon code. This is a good and simple way to ensure your tracking code is working correctly.

Also, check your third-party application to confirm that the conversion data is being received.

Even with a coupon applied, the successful purchase will generate an invoice, fire the Order Paid webhook and Paid Order trigger, and send the JSON payload.


Custom Redirect after Successful Purchase

If you want to change the default redirect behavior, you can add custom JavaScript to the Purchase Code Snippet.

📝 NOTE: Setting a custom redirect with a timeout shorter than Uscreen's checkout default (4000ms) will override the default redirect logic. Make sure that your tracking code has enough time to execute before the redirect occurs.

<script>
// Replace with your desired URL
let redirectURL = "https://example.com/thank-you";

// Set a shorter timeout than Uscreen's default (4000ms)
setTimeout(function() {
window.location.assign(redirectURL);
}, 4000);
</script>

⚠️ WARNING: If you are unfamiliar or uncomfortable working with JavaScript, please consider consulting a developer for proper implementation.


FAQs

Can I track conversions from mobile app purchases?

The JSON payload is only available for web purchases. Mobile app purchases are processed through the app stores and require different tracking methods.

Why is my tracking code not firing?

The success page only appears for 10 seconds, so your code needs to execute within that time frame. Make sure your code is properly placed in the Purchase Code Snippet section and doesn't have any errors.

Can I completely remove the 10-second delay?

We don't recommend removing the delay entirely, as it ensures tracking pixels have time to fire. However, you can reduce it using the custom redirect code above.

How can I track which marketing campaign led to a conversion?

You can use UTM parameters in your marketing links and store them in cookies or local storage. Then, in your tracking code, retrieve these parameters and include them with your conversion data.

Did this answer your question?