
Getting a session token
Create a customer session on the server, where the organization access token remains private. Send only its one-hour, customer-scoped token to the browser.Server
Build sequence
Open a modal
Browser
Mount inline
Browser
React
Initialize from HTML
Localization
Pass a BCP 47 value such asfr-FR through locale. The setting applies to both embed copy and Stripe Elements. See checkout localization for supported languages.
Events
Every signal is a cancelableCustomEvent on the embed instance.
Redirect-based payment methods
Amazon Pay, Klarna, and other off-site authorization methods navigate the complete tab to the provider and back toreturnUrl. Read the returned status once the page loads again:
Browser
usePaymentMethodRedirectResult. Both routes remove the status query parameter after reading it, preventing a refresh from replaying an old result. Card 3DS stays inside the modal and does not use this return path.
Configure behavior
HTML triggers use the same settings through
data-ruba-payment-method-theme, data-ruba-payment-method-set-as-default, data-ruba-payment-method-return-url, and data-ruba-payment-method-locale.