The old Embed Code will be deprecated on Monday November 17th, 2025.
The new Embed Code 2.0
The HEAD script
The BODY script
This part is unchanged from before.
Upgrading to the Embed Code 2.0
1
Grab the new embed code
Copy the 
<HEAD> script from above.2
Replace the old embed code with the new one
In your website or web app, look for a script element (likely in the 
<HEAD> of your page) that starts with <script>const SAVVY_PRELOAD_IDS=....This is the part to replace with the new script. Make sure that when you’re done, the new one is sandwiched inside two <script> tags.Make sure to do this on a staging URL/environment first, so that you can QA your Stripe changes (described below) on both the old and new embed code.3
Make any Stripe changes that you need to
See the Stripe section below for a list of things to watch out for and update before
pushing your changes live.
If you’re on the Embeddables Pro Plan, your Primary Contact will do this part for you.
4
Test your changes thoroughly
Run some end-to-end tests, including testing any payments and promo codes, to make sure that everything is working as expected.Then push live!
Upgrading Stripe components
The Embed Code 2.0 comes with the latest version of Stripe’s JS SDK, which
includes certain breaking changes to account for.See below for a list of things to watch out for and update before upgrading to the new embed code.
- The default layout for Stripe components has changed from ‘Tabs’ to ‘Accordion’. (Step 1 below)
- The create_element_optionssettings structure has changed. (Step 2 below)
- The applyPromotionCoderesponse structure has changed. (Steps 3-4 below)
1
Set any unset Stripe component 'layout' settings to 'Tabs'
In Stripe’s latest version, the default layout is switching from ‘Tabs’ to ‘Accordion’. Therefore, if you have any Stripe components with the ‘layout’ setting unset, you’ll need to set it to ‘Tabs’ before upgrading to the Embed Code 2.0.
- Select your Stripe component in the Web App editor. In the right sidebar under Options, find the Layout setting.
- Select the Tabs option (only if no option is currently selected).
2
Update create_element_options if applicable
This step only applies if you’ve customized the 
create_element_options settings in your Stripe component.create_element_options key exists. If it contains a billingDetails property with multiple keys set to never, update create_element_options.fields.billingDetails to never.3
Update your applyPromotionCode function logic to handle both 'success' and 'session' response formats
Stripe’s latest SDK version has changed the response schema of 
applyPromotionCode: instead of response.success it now returns response.session, which contains a new object format.Make sure your function logic handles both formats, so that you can smoothly upgrade to the new embed code.If you prefer, you can get your changes ready on the latest version of each Embeddable, and then push all of those versions live at the same time that you push the new embed code live. That way, you can avoid the additional logic of handling both old and new formats in your code.However, the risk here is that there is a window of time when one is live and not the other, or that you later need to roll back for some reason, so take this approach at your own risk!
- 
Find all references to applyPromotionCodein your custom code.
- 
Replace conditional checks that use response.type === 'success'with a structure that supports both formats (see the next step for details on the new format):
- Ensure there are no early returnstatements orthrowerrors that would prevent reaching thesessionbranch.
Once you’ve upgrade to the new embed code, and are confident that you won’t need to revert to the old one, you can safely simplify the logic to stop handling the old 
response.success format.4
Copy and adapt logic for the new response schema
Copy all logic from inside the 
response.success branch into the response.session branch.Update field accesses to use the new structure:- Replace response.success.totalwithresponse.session.total.
- Access numeric values through minorUnitsAmount:- total:- response.session.total.total.minorUnitsAmount
- subtotal:- response.session.total.subtotal.minorUnitsAmount
- discount:- response.session.total.discount.minorUnitsAmount
- appliedBalance:- response.session.total.appliedBalance.minorUnitsAmount
- shippingRate:- response.session.total.shippingRate.minorUnitsAmount
- taxExclusive:- response.session.total.taxExclusive.minorUnitsAmount
- taxInclusive:- response.session.total.taxInclusive.minorUnitsAmount
 
For other keys not listed here, refer to the Stripe Custom Checkout Session object documentation.
5
Add error handling
You can access errors via 
response.error?.message. See the
Stripe applyPromotionCode documentation
for details.6
Test your changes
Test the modified logic thoroughly:
- With old Stripe component: Apply a promo code and verify it’s reflected in the UI, applied to the amount, and that payment completes successfully.
- With updated Stripe component: Repeat the same tests.

