Buy Button
Use this method for Stripe’s actual stripe-buy-button embed. A custom checkout button is not a Stripe Buy Button; for an anchor or form calling your backend, use Server-Side Checkout.
Install the ordered scripts
Section titled “Install the ordered scripts”- Open Settings → Website integration → Buy Button.
- Copy your merchant’s installation snippet, which contains LiftVector first at
https://static.liftvector.app/script/liftvector.js, then Stripe’shttps://js.stripe.com/v3/buy-button.jsloader, both usingdefer. Preserve the merchant, provider, and method attributes. - Replace Stripe’s default
asyncloader with that ordered pair. Load each script only once, with LiftVector on referral landing pages and pages that hand off to checkout. - Keep your existing
stripe-buy-buttonelements, theirbuy-button-id, and theirpublishable-keyfrom Stripe.
LiftVector supplies the captured token through the element’s client-reference-id before Stripe initializes the component. Stripe carries it into the Checkout Session’s client_reference_id. No checkout backend change or data-liftvector attribute on the embed is required.
Existing references and dynamic buttons
Section titled “Existing references and dynamic buttons”Leave client-reference-id absent so LiftVector can supply it. Existing merchant references are preserved, including empty or equal values. Resolve conflicts with any order or customer reference; do not concatenate it with the token.
Buttons added later or updated with a different ID or publishable key are supported in the ordinary document. Updates are asynchronous: wait for the component to finish loading before activating it. Do not insert or change a button and trigger checkout immediately in the same JavaScript task. Embeds inside another iframe or a shadow root are outside this integration’s scope.
Only script-owned references are refreshed or cleared as the captured candidate changes or expires. If LiftVector is blocked, Stripe can still load and checkout proceeds without a LiftVector candidate.
Verify the actual button
Section titled “Verify the actual button”Follow a current affiliate link and activate the real button, including a dynamically inserted button if your website uses one. For a sandbox-connected merchant, complete a sandbox purchase. Inspect the resulting Session’s reference and collected payment, then check the sale, affiliate attribution, and expected commission in LiftVector. Seeing an element attribute is not sufficient proof.
Record merchant confirmation after setup, and use troubleshooting if the provider or financial result is missing.
