> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pcibooking.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Stylesheets

> Customize the look and feel of PCI Booking's hosted card forms and card display pages with your own CSS

Stylesheets customize the appearance of PCI Booking's hosted forms (card capture, CVV capture, card display, and Card By Link). Upload your own CSS to match your brand. PCI Booking applies the stylesheet when rendering the form.

## How It Works

1. **Create a stylesheet** with your custom CSS rules.
2. **Give it a unique name** that you will reference in your API requests.
3. **Reference the stylesheet name** when generating a card entry or display form. PCI Booking renders the form with your styles applied.

If no stylesheet is specified, PCI Booking applies default styling - unless you've set one of your own uploaded stylesheets as your account's default via the `IsDefault` flag on [Add/Update CSS](https://developers.pcibooking.net/api-reference/general/add-update-css.md), in which case that stylesheet is used automatically for any request that doesn't explicitly specify a `css` parameter.

> [!NOTE]
>
> Want to customize or hide the "PCI Booking" branding shown in the form? This is possible through your custom stylesheet. The exact selector isn't in the downloadable default CSS reference below at time of writing - contact [support@pcibooking.net](mailto:support@pcibooking.net) if you can't locate it there and need it identified.

## Default Stylesheet

The default CSS applied to the card capture form is available for download: [default-capture-form.css](https://raw.githubusercontent.com/PCI-Booking/documentation-downloads/main/default-capture-form.css).

Use it as the baseline for your own stylesheet - start from the default, adjust the rules you want to change, and upload the result under your own resource name. The file also shows the element classes and IDs the forms use (e.g. `.card-container`, `.form-input`), which you target when writing CSS from scratch - see the [form structure reference](#form-structure-reference) below for the key selectors.

> [!NOTE]
>
> **Field layout is fixed and cannot be reordered.** Custom CSS controls appearance (colors, borders, spacing, hover states) of the existing field structure, not its layout or sequence. A small number of fields can be shown or hidden - e.g. `showOwnerId` and `showCVV` on the [Request Card Entry Form](https://developers.pcibooking.net/api-reference/tokenize-cards/request-card-entry-form.md) - but their position in the form is not configurable.

> [!WARNING]
>
> **Custom fonts are not supported by default**, due to the risk exposure of loading an external font file into the card capture page. Exceptions can be made case-by-case: contact [support@pcibooking.net](mailto:support@pcibooking.net) with your font file, PCI Booking hosts it, and you reference it in your custom CSS. Send the font files with a statement that your licence allows the fonts to be hosted by a third-party service provider.

## Form Structure Reference

The key elements you can target with custom CSS, per hosted form:

**Card entry form** ([Request Card Entry Form](https://developers.pcibooking.net/api-reference/tokenize-cards/request-card-entry-form.md)):

| Selector | Element |
| - | - |
| `#frmCardPayment` | The form element. |
| `.card-container` | Outer container of the form. |
| `#cardType`, `.card-type-container` | Card type selector and its container. |
| `#cardNumber` | Card number input. |
| `#cardNameOnCard` | Cardholder name input. |
| `#cardExpirationMonth`, `#cardExpirationYear` | Expiration selectors (`.form-input.month`, `.form-input.year`). |
| `#cardCvv`, `#cvvContainer` | CVV input and its container. |
| `#cardIssueNumber`, `#card-issue-number-container` | Issue number input (when shown). |
| `#cardOwnerid`, `#card-ownerid-container` | Owner ID input (when shown). |
| `#card-enter`, `#buttonContainer`, `.button` | Submit button and its container. |
| `.form-label`, `.form-input`, `.required` | Field labels and inputs; required-field marker. |
| `#throbber`, `.throbberBox`, `.loader`, `.overlay` | Loading indicator shown during submission. |

**CVV capture form** ([Request CVV Entry Form](https://developers.pcibooking.net/api-reference/manage-tokens/request-cvv-entry-form.md)) uses the same structure with only the CVV field: `#frmCardPayment`, `.card-container`, `#cardCvv`, `#card-enter`, and the loader elements.

**Card display form** ([Request Card Display Form](https://developers.pcibooking.net/api-reference/process-cards/request-card-display-form.md)) renders read-only rows instead of inputs: `.widjet-container` (outer), `.boxed` (card panel), `.row` with `.desc`/`.value` pairs per field (card type, number, name, expiration), `.row.footer`, and `.warning` for virtual card notices.

## Managing Stylesheets via the Portal

1. Log into the [PCI Booking portal](https://users.pcibooking.net).
2. Navigate to **GUI Settings** > **Stylesheet Settings**.
3. Click the plus icon to create a new stylesheet.
4. Provide:
   * **Resource name** - a unique name used to reference this stylesheet in API requests.
   * **Resource description** - a free-text description for your reference.
   * **Resource Content LTR** (required) - CSS rules for left-to-right page layouts.
   * **Resource Content RTL** (required) - CSS rules for right-to-left page layouts (e.g. Arabic, Hebrew).
5. Click **Add stylesheet**. A green confirmation banner appears at the top of the page.

> [!NOTE]
>
> **Both content boxes are required.** The form will not save with either one empty, including when you edit an existing stylesheet - many older stylesheets were created with an empty RTL box and need one filled in before they can be updated. If you do not use right-to-left layouts, put a placeholder comment such as `/* not used */` in the RTL box.

> [!WARNING]
>
> **Known issue with the save validation.** Each content box is validated when you click out of it, and a box that was empty at that moment keeps its error even after you fill both boxes in, blocking the save. If a red message stays on screen when the content is clearly there: click inside the flagged box, press the space bar once, then click anywhere outside the box. The message clears and the save succeeds. The extra space is harmless in CSS. A fix is in progress.

> [!NOTE]
>
> Test stylesheet changes on your sandbox account before applying them to production.

## Managing Stylesheets via the API

> [!WARNING]
>
> The user performing API actions must have the **Resource management** [permission](https://developers.pcibooking.net/account-setup/manage-users.md#permissions). If you are unsure, check with your account administrator or [contact our support team](mailto:support@pcibooking.net).

You can also manage stylesheets programmatically:

| Operation | API Reference | Description |
| - | - | - |
| **Add/Update** | [Add or Update CSS](https://developers.pcibooking.net/api-reference/general/add-update-css.md) | Create a new stylesheet or overwrite an existing one |
| **List** | [List CSS Records](https://developers.pcibooking.net/api-reference/general/list-css-records.md) | Retrieve all stylesheets in your account |
| **Retrieve** | [Retrieve CSS Record](https://developers.pcibooking.net/api-reference/general/retrieve-css-record.md) | Get the content of a specific stylesheet |
| **Delete** | [Delete CSS Record](https://developers.pcibooking.net/api-reference/general/delete-css-record.md) | Remove a stylesheet |

> [!NOTE]
>
> When updating a stylesheet via the API, the new content overwrites the existing content entirely.

## Next Steps

> [card] [Hosted Card Entry Form](https://developers.pcibooking.net/capture-cards/hosted-card-entry-form.md)
>
> Card capture form that uses stylesheets

> [card] [Card Display](https://developers.pcibooking.net/use-tokens/card-display.md)
>
> Card display form that uses stylesheets

> [card] [Custom Translations](https://developers.pcibooking.net/account-setup/custom-translations.md)
>
> Customize form text and labels


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.