
Step 1: Create PAN Token
Use the Create PAN Token API with thecard_id parameter.
Request:
- Each token can only be used once
- Token expires after 60 seconds
Step 2: Prepare Styles (Optional)
You can customize the iframe appearance by providing CSS styles as a JSON object. The styles need be URL-encoded and passed as a query parameter.Available CSS Selectors
| Selector | Description | Supported Properties |
|---|---|---|
.uq-card-number | Card number | color, font-size, font-family, font-weight |
.uq-card-expiry | Expiry date | color, font-size, font-family, font-weight |
.uq-card-cvv | CVV | color, font-size, font-family, font-weight |
.uq-card-cardholder | Cardholder name (only rendered when cardholder_name=true) | color, font-size, font-family, font-weight |
.uq-card-container | Container | background-color, padding, border, border-radius, width, height, min-height, max-width, min-width |
.uq-card-row | Row layout (one row per field — label on the left, value on the right) | display, justify-content, align-items, flex-direction, gap |
.uq-card-label | Label text | color, font-size |
.uq-card-button | Copy button | color, background-color, border, border-radius, padding |
.uq-card-button:hover | Button hover state | color, background-color |
.uq-card-button:active | Button active state | color, background-color |
.uq-card-tooltip | Copy tooltip | color, background-color, font-size, border-radius |
.uq-page-background | Iframe page background (default transparent) | background-color |
Supported CSS Properties
Global supported properties:color, background-color, font-size, font-family, font-weight, padding, margin, border, border-radius, text-align, line-height, letter-spacing
Step 3: Construct Iframe URL
Build the iframe source URL using the following pattern:Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
iframe_domain | string | Yes | Iframe service domain | https://embedded-sandbox.uqpaytech.com |
pan_token | string | Yes | PAN token from Step 1 | pan_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 |
card_id | string | Yes | Card identifier (must match token creation) | 7242a504-e43d-4b95-b4c8-f9fc5992d02b |
lang | string | No | Display language (default: en) | en, zh, zh-TW |
styles | string | No | URL-encoded CSS styles JSON | URL-encoded JSON object |
show_data | boolean | No | Reveal card number, expiry, and CVV on load without a user action. Recommended for trusted environments only (default: false) | true |
cardholder_name | boolean | No | Render the cardholder name field. The displayed value is the card’s name_on_card; if not set, the iframe falls back to first_name + last_name from the cardholder. Style via .uq-card-cardholder (default: false) | true |
Environment Domains
- Sandbox:
https://embedded-sandbox.uqpaytech.com - Production:
https://embedded.uqpay.com
Example
Toggle Sensitive Data Visibility
Whenshow_data is not set (or set to false), card number, expiry, and CVV are masked on load. End users can reveal or re-mask the data in two ways:
- Click the eye icon next to the
CVVlabel. The eye icon is persistently visible and toggles all three sensitive fields at once. - Click any masked value directly (
****,**/**,***) to toggle visibility.
show_data=true, the data is shown on load; the eye icon and click-to-toggle behavior remain available for re-masking.
Step 4: Embed Iframe on Your Page
Add the iframe element to your HTML page:Sizing notes:
- The iframe’s internal page has a maximum width of 1280px. If your parent container is wider than 1280px, the rendered card will be capped at 1280px.
- The iframe’s internal container has a minimum height of 400px. Set the iframe
heightto at least400to avoid clipping or scrollbars. - To pin the card to fixed dimensions, set
width/heighton.uq-card-containervia thestylesparameter (see Step 2).

