The ENGINE_ROOM tier captures cards directly into Revtain’s vault infrastructure at the moment of checkout. Once a card is vaulted, every subsequent recovery for that customer — across any gateway you have configured — runs against a portable token that doesn’t depend on which gateway the original charge ran on. This guide shows your engineering team exactly how to embed the iFrame and tokenise cards securely.Documentation Index
Fetch the complete documentation index at: https://docs.revtain.com/llms.txt
Use this file to discover all available pages before exploring further.
Who this guide is for. ENGINE_ROOM applies to new customer signups going forward — i.e. cards captured through this iFrame at checkout. For your existing customer base (already vaulted in your primary gateway), use the API Integration or a Connector for the FAST_TRACK path. Most established merchants run both: ENGINE_ROOM for new signups, FAST_TRACK for the legacy book.
What You Receive at Onboarding
In addition to your standard credentials (API Key + Webhook Signing Secret), ENGINE_ROOM clients receive:| Credential | Purpose |
|---|---|
| Environment Key | Identifies your sub-vault. Public — exposed to the browser. |
| iFrame Script URL | Loads the Revtain iFrame component on your checkout page. |
| iFrame Init Endpoint | Server-side endpoint that mints signed init parameters for each tokenisation session. |
How It Works (3 Steps)
Server: mint signed init params
Your server calls Revtain’s iFrame init endpoint with your API Key. The response includes a one-time signed nonce that authorises a single tokenisation session. Pass the response down to your checkout page.
Browser: load and render the iFrame
Your checkout page loads Revtain’s iFrame script and initialises with the signed params. The iFrame renders a secure card form. Card data flows directly from the customer’s browser into Revtain’s vault — never through your servers.
Browser: receive the payment method token
On successful tokenisation, the iFrame returns a
paymentMethodToken to your page. Submit that token (not card details) to your server. Use it to charge the customer through your existing gateway, then pass it to Revtain on any future failed payment for cross-gateway recovery.Server-Side: Mint Init Params
Browser: Embed the iFrame
Tokenise the Card
When the customer submits the form, call the tokenisation method:tokenized event with the resulting paymentMethodToken.
What Comes Back
Charge the Card
Use the token directly in a recovery call when a charge fails — no separate “store this card” step is needed:PCI Scope
The iFrame is hosted on Revtain’s vault infrastructure, not yours. Card data flows directly from the customer’s browser into the vault — your servers never see PAN, CVV, or magnetic stripe data. Your application’s PCI scope stays at SAQ A. See Security for full detail.Testing
Use a test gateway during onboarding. Revtain accepts the standard Visa / Mastercard test card numbers documented at docs.revtain.com/guides/testing. Thetokenized event fires identically in test mode; switching to live mode is a credentials change, not a code change.
Common Pitfalls
iFrame fails to render with 'Invalid signature'
iFrame fails to render with 'Invalid signature'
The signed params are time-bounded. If the gap between minting them on your server and using them in the browser exceeds a few minutes (typically because the page sat idle), the signature expires. Mint fresh params on page load or on customer focus, not at server startup.
`Revtain.tokenize()` returns no token
`Revtain.tokenize()` returns no token
Check that the
tokenized and error event listeners are both registered before calling tokenize(). If error is unregistered, validation failures fail silently.Token works in test but not live
Token works in test but not live
The environment key is environment-specific. Make sure your server is using the live
rev_live_xxx API key when minting init params, and your iFrame script URL is the production CDN (cdn.revtain.com/v1/, not a sandbox URL).Cross-gateway cascade isn't happening
Cross-gateway cascade isn't happening
Confirm you have backup gateways configured in your Revtain account. ENGINE_ROOM tokens are universal, but the cascade only routes to gateways you’ve explicitly connected. The admin team can confirm what’s configured.
What Happens Next
Once your iFrame is live and a customer’s card is vaulted:- The customer’s first charge succeeds via your existing gateway flow (you charge the card using
paymentMethodToken) - Future renewal failures trigger Revtain’s recovery engine — see API Integration for the recovery webhook and outcome webhook contract
- Recovery cascades across every gateway you have configured, returning a
recovery.successorrecovery.failedwebhook to your endpoint