---
updatedAt: 2025-08-13T13:14:23.000Z
agentTools:
  projectIndex: https://partner.getpliant.com/llms.txt
---

# PCI Widget Mobile

In addition to the [PCI widget for web](./pci-widget-web), we offer a mobile version with the same core functionality.

<Image align="center" src="https://files.readme.io/88b71b2-7af9936-Screenshot_2024-02-01_at_14.33.49.png" />

# Implementation Guide

The PCI widget integrates into your mobile application via an `iframe` + `WebView` combination, displaying card data for approximately 45 seconds. After this period, the card details are automatically hidden for security purposes.

You'll need two parameters for implementation:

* `traceId`: A random UUIDv4 that you generate when making the request. This ID helps trace the request through all related systems and must remain consistent throughout the PCI widget request. Use the same ID in both the iFrame URL and the OTP request (see [endpoint](https://partner.getpliant.com/reference/get-otp-for-pci-widget)).
* `widgetConfig`: The configuration object for the widget, containing elements like the `cardId` (the Pliant identifier for the specific card) and design parameters. Full configuration details are available in the [widget config section](./pci-widget-web#widget-config).

## Base Information

For core functionality details, refer to the following sections:

* [Data Flow](./pci-widget-web#data-flow)
* [Environments](./pci-widget-web#environments)
* [Widget Config](./pci-widget-web#widget-config)

## Styling via CSS File

### CSS File Creation and Testing

To customize the widget appearance:

1. Create a new `<file_name>.css` file
2. Create a companion `test.html` file with content copied from [the iframe HTML structure](./pci-widget-web#iframe-html-structure)
3. Use these files to experiment with CSS and achieve your desired presentation

The static CSS file (`<link crossorigin="" href="./widget/static/pci-widget.css" rel="stylesheet" type="text/css">`) is available at <https://pci-api.getpliant.com/card-details/widget/static/pci-widget.css>.

#### Example CSS File Content:

```css
@font-face {
    font-family: 'MaisonNeue';
    src: url('https://example.com/fonts/MaisonNeue-Book.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
  }
  
  html,
  body {
    height: 100vh;
    width: 100vw;
    background-color: transparent;
  }
  
  .wrapper {
    width: 100vw;
    height: 100vh;
    background: transparent;
  }
  
  .pliant-pci-widget {
    width: 100vw;
    height: 100vh;
    padding: 0px;
    margin: 0px;
    padding-left: 12vw;
    background: transparent;
  }
  .pliant-pci-widget-container {
    row-gap: 0;
  }
  
  .pliant-expiry-cvv-result {
    margin-top: 3.797vh;
  }
  
  .pliant-cvv-result,
  .pliant-expiry-result {
    width: 50%;
  }
  
  .pliant-cardholder-result {
    display: none;
  }
  
  .pliant-copy-btn {
    display: none;
  }
  
  /**
  * Card number: mono font is default for it
  */
  .mono {
    font-family: 'MaisonNeue', sans-serif;
  }
  
  .pliant-field-value {
    font: 400 5vh/5vh 'MaisonNeue', sans-serif;
    letter-spacing: 0.25px;
  }
  
  .pliant-field-name {
    font: 400 3.79vh/3.8vh 'MaisonNeue', sans-serif;
    letter-spacing: 0.5px;
  }
  
  /**
  * Physical Card
  */
  
  .physical-card .pliant-pan-result {
    margin-top: 50.949vh;
  }
  
  .physical-card .pliant-field-value {
    color: rgba(255, 255, 255, 1);
  }
  
  .physical-card .pliant-field-name {
    color: rgba(255, 255, 255, 1);
  }
  
  /**
  * Virtual Card
  */
  
  .virtual-card .pliant-pan-result {
    margin-top: 63.924vh;
  }
  
  .virtual-card .pliant-field-value {
    color: rgba(0, 0, 0, 0.87);
  }
  
  .virtual-card .pliant-field-name {
    color: rgba(0, 0, 0, 0.87);
  }
```

Note the `.physical-card` and `.virtual-card` CSS classes. These can be specified as the `cssClass` value in the [Widget Config](./pci-widget-web#widget-config), allowing for more refined customization based on card type. For example:

* `.physical-card .pliant-field-value {color: #AAAAAA}`
* `.virtual-card .pliant-field-value {color: #BBBBBB}`

By passing `cssClass=virtual-card` in your configuration, the second CSS block will be applied to your widget.

### Hosting Your CSS File

Host your customized CSS file at a publicly accessible URL, then reference this URL in the `styleUrl` parameter of your [Widget Config](./pci-widget-web#widget-config) when setting up the iframe.

## Getting an OTP for the PCI Widget

For details on obtaining the one-time password needed for widget initialization, see the [OTP documentation](https://partner.getpliant.com/reference/get-otp-for-pci-widget).

# Platform-Specific Implementation

For platform-specific integration guides, refer to:

* [iOS Implementation Guide](./ios-specific-mobile-widget)

* [Android Implementation Guide](./android-specific-mobile-widget)

* [React Native Implementation Guide](./react-native-mobile-widget)