Overview
Partners who are not PCI DSS compliant can display sensitive card data to end-users using a Contro-hosted HTML widget embedded in an iframe. Sensitive data never reaches your servers - reducing PCI scope to SAQ-A.If your organization is PCI DSS compliant and you prefer full UI control, use the direct API method instead.
Prerequisites
- A Contro partner account with API keys
- Configure your allowed origins in the partner dashboard https://partner.contro.me/settings - this controls which domains can embed the iframe
Step 1: Generate a reveal URL
Call the reveal-html endpoint to get a short-lived, single-use signed URL:Step 2: Embed the iframe
clipboard-write permission allows users to copy card fields to their clipboard.
Step 3: Custom styling (optional)
Pass astylesheetUrl in the request body to apply custom CSS. The stylesheet must be served over HTTPS.
The widget exposes these DOM IDs for styling:
Sandbox testing
Usesk_test_ API keys to generate sandbox URLs. The widget displays test data with a visible SANDBOX badge:
Security
- CSP headers: The widget sets strict
Content-Security-Policyheaders includingframe-ancestorsrestricted to your configured allowed origins - Allowed origins (iframe): Configure via dashboard Settings. These control which domains can embed the card widget iframe — separate from the API allowed origins that enforce CORS. In production, unconfigured origins result in
frame-ancestors 'none'(iframe blocked) - Single-use tokens: Each URL can only be loaded once - replay attacks are rejected
- 60-second expiry: Tokens expire quickly to minimize the attack window