--- title: "Step 1: Load Flex Pay Agent Connect" slug: "step-1-load-uplift-agent-connect" updated: 2025-06-24T20:50:37Z published: 2025-06-24T20:50:37Z canonical: "developer.upgrade.com/step-1-load-uplift-agent-connect" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.upgrade.com/llms.txt > Use this file to discover all available pages before exploring further. # Step 1: Load Flex Pay Agent Connect ### Integration Details The first step involves **loading the Flex Pay Agent Library** by executing the **up.js code** snippet included below, in your payment page. The **up.js** is a snippet of javascript code that will retrieve and load the Flex Pay library asynchronously into a window object. #### Production **For production use the below snippet with your production UP-code 'UP-XXXXXXXX-XX'.** `(function (u, p, l, i, f, t, o, b, j) { u['UpLiftPlatformObject'] = f; u[f] = u[f] || function () { (u[f].q = u[f].q || []).push(arguments) }, u[f].l = 1 * new Date(); b = p.createElement(l), j = p.getElementsByTagName(l)[0]; b.async = 1; b.src = i + '?upcode=' + t; j.parentNode.insertBefore(b, j); o = u.location.host.match(/[\w-]+\.\w{2,3}(:\d+)?$/); if (o) o = o[0]; u[f]('create', t, o) })(window, document, 'script', 'https://tag.uplift.com/external/up.js', 'up', 'UP-XXXXXXXX-XX')` #### Pre-Production **For testing use the below snippet with your pre-production UP-code 'UP-XXXXXXXX-XX'.** `(function (u, p, l, i, f, t, o, b, j) { u['UpLiftPlatformObject'] = f; u[f] = u[f] || function () { (u[f].q = u[f].q || []).push(arguments) }, u[f].l = 1 * new Date(); b = p.createElement(l), j = p.getElementsByTagName(l)[0]; b.async = 1; b.src = i + '?upcode=' + t; j.parentNode.insertBefore(b, j); o = u.location.host.match(/[\w-]+\.\w{2,3}(:\d+)?$/); if (o) o = o[0]; u[f]('create', t, o) })(window, document, 'script', 'https://carbon.rc01gw.uplift-platform.com/external/up.js', 'up', 'UP-XXXXXXXX-XX');` Every up.js snippet is unique per partner with a specific UP-code. Customize the code above by **replacing UP-XXXXXXXX-XX** with your **assigned UP-code**. ⚠️ Note that you will be provided a separate UP-code for Testing and for Production prior to development. Also note that using the Testing (Developer) UP-code creates debug messages for your visibility, these will not be shown when using the Production UP-code. Additionally note that if you also have a website integration with Flex Pay, you will have separate UP codes for each channel.