---
source: https://carbone.io/examples/insurance-member-id-card/
title: "CCM Software for Health Plans: Member ID Cards | Carbone"
description: "Customer communication management for health plans: an SVG template turns enrollment data into member ID cards, front and back, in a print-ready PDF."
generated_at: "2026-11-17"
---

# Health insurance member ID card

Member ID cards, front and back, from your enrollment system

[![Health insurance member ID card: PDF generated from an SVG template and JSON data](/examples/insurance-member-id-card/thumb-result.webp)](/examples/insurance-member-id-card/result.pdf "Download the generated document")

[Download template](/examples/insurance-member-id-card/template.svg)

[Sample data](/examples/insurance-member-id-card/data.json)

[Download the generated PDF](/examples/insurance-member-id-card/result.pdf)

- **Template:** SVG
- **Export as:** PDF, PNG, SVG, WebP [+24 more](/documentation/developer/http-api/generate-reports.md#output-file-type)
- **Carbone:** 5.18+

Features

-   [SVG](/documentation/design/template-formats/svg.md)
-   [Loop](/documentation/design/repetitions/with-arrays.md)
-   [Condition](/documentation/design/conditions/overview.md)
-   [Set](/documentation/design/computation/store-and-transform.md)
-   [Image](/documentation/design/advanced-features/pictures.md)
-   [Currency](/documentation/design/formatters/currency.md)
-   [Date](/documentation/design/formatters/date.md)

## Generate member ID cards from your enrollment system

Health plans, third-party administrators and pharmacy benefit managers issue an ID card to every member at enrollment, at each plan year, and each time a plan, a network or a dependent changes. The enrollment or core administration system sends the members of a household to the Carbone API as JSON, and an SVG template returns a US Letter PDF with the card of each member, front and back, at true size. The same PDF goes to the mail house as the card carrier, and to the member portal as the digital card. In this example, Elmstead Health Plan issues the 2027 cards of a subscriber, her spouse and their daughter, who lives outside the service area.

In this example, you will:

-   Repeat the card, front and back, for each member of the household
-   Print the name of the member as the industry guides ask, on one line
-   Show the copays of the plan, or the terms of a high-deductible plan
-   Show the network logo of each member
-   Print the in-network and out-of-network deductibles and out-of-pocket maximums
-   Add the PDF417 barcode from your data

## Card layout

The card follows the layout of the WEDI Health Identification Card Implementation Guide for combined medical and pharmacy cards, with the pharmacy fields of the [NCPDP ID card guide](https://www.ncpdp.org/NCPDP/media/pdf/NCPDP_pharmacy_id_card_fact_sheet.pdf). The back carries the amounts that section 107 of the No Surprises Act requires on every physical or electronic ID card, as explained in the [FAQs Part 49 of the Departments of Labor, HHS and the Treasury](https://www.dol.gov/agencies/ebsa/about-ebsa/our-activities/resource-center/faqs/aca-part-49).

| Area | Content | Rule |
| --- | --- | --- |
| Card size | 3.375 x 2.125 in, corners of 1/8 in | The CR80 size of ISO/IEC 7810 ID-1, the size of a credit card |
| Front, top | Issuer name and logo, plan name, plan type, effective date | The card issuer name sits at the top of the front |
| Member | Name, ID, suffix (SFX) and card issuer identifier, labeled Issuer (80840) | Left-justified, with nothing in between, in capital letters of 8 pt or more |
| Group and pharmacy | Group, RxBIN, RxPCN, RxGrp, RxID | RxBIN, RxPCN and RxGrp left-justified, in this order |
| Copays | Office visit, specialist, urgent care, emergency room | From the plan. A high-deductible plan shows its terms instead |
| Network | Logo of the network of the member | Elmstead Select in the service area, Crossway National Network outside |
| Back, top | Deductible and out-of-pocket maximum, in-network and out-of-network, individual / family | Required by the No Surprises Act |
| Contacts | Member services, provider services, pharmacy help desk, website | A phone number and a website for consumer assistance, also required by the No Surprises Act |
| Claims | Claims address, payer ID, PDF417 barcode, issue date | The claims address sits at the bottom of the back, near the phone numbers |

The phone numbers use the 555-01xx range kept for fiction, the website uses the `.example` domain, and the card issuer identifier fails its check digit, so the specimen cards cannot be used.

## How to generate member ID cards from JSON

Follow these steps to build the ID card template with Carbone:

### 1\. Design the cards on a US Letter artboard

-   Set the page size on the `svg` element: `width="8.5in" height="11in" viewBox="0 0 612 792"`. One unit is one point, and Carbone gives the PDF page this size, so each card prints at 243 x 153 points, 3.375 x 2.125 in.
-   The front and the back of a card share a fold line. The member cuts out the pair, folds it, and the back reads the right way up.
-   Set the fonts once, on the `svg` element: `font-family="Roboto, Helvetica Neue, Arial, sans-serif"`. Roboto is available on Carbone Cloud. On premise, install it on the server. The logos are drawn as paths, so they need no font.
-   Print the values in 8 pt or more, the minimum of the WEDI and NCPDP guides, and the labels in 6 pt. Leave out the letters O and I in your IDs: they read like 0 and 1.
-   Write the tags in text elements, and in attributes for sizes and positions. See [SVG templates](/documentation/design/template-formats/svg.md#best-practices).

### 2\. Repeat the card for each member

Group the front and the back of the card, and move each copy one row down with the [loop index](/documentation/design/repetitions/with-arrays.md#access-the-loop-iterator-value):

```xml
<g id="cards" transform="translate(0 183)">
  <g id="member" transform="translate(0 {d.members[i].suffix:print(.i):mul(186)})">
```

-   A row is 186 points high: the card, then 33 points for the caption of the next member.
-   A second group after it, with `{d.members[i+1].suffix}`, closes the [loop](/documentation/design/template-formats/svg.md#loops).
-   The page holds three members. For a larger household, send the members in groups of three, one request each.
-   The plan, the payer and the subscriber are outside the `members` array, so every card reads them with their full path, like `{d.plan.rx.bin}`.

### 3\. Print the name of the member

The WEDI and NCPDP guides print the name in the order first name, middle initial, last name, in capital letters, without punctuation, on one line. A comment at the top of the template builds it with [:append](/documentation/design/formatters/text.md#append-texttoappend), [:upperCase](/documentation/design/formatters/text.md#uppercase) and [:set](/documentation/design/computation/store-and-transform.md), before the layout:

```text
{d.members[].firstName:append(' '):append(.middleInitial):append(' '):append(.lastName):upperCase:set(.printedName)}
```

SVG text does not wrap, so the size of the name follows its number of letters, given by [:len](/documentation/design/formatters/text.md#len):

```text
font-size="{d.members[i].printedName:len:ifLTE(28):show(11):ifLTE(32):show(10):ifLTE(36):show(9):elseShow(8)}"
```

-   This [switch case](/documentation/design/conditions/inline-conditions.md#switch-case) prints the first size whose condition is true: JAMES T WHITFIELD prints at 11 pt, ALEXANDRA M CASTELLANOS-WHITFIELD at 9 pt.
-   At 8 pt, the line holds about 42 capital letters. Truncate longer names in your system, as the WEDI guide describes: the middle name first, then the first name down to its initial.

### 4\. Show the copays and the network of each member

[Conditional blocks](/documentation/design/conditions/conditional-blocks.md) keep the copays of the plan, or replace them with the terms of a high-deductible plan:

```xml
{d.plan.type:ifNE('HDHP'):showBegin}
<g id="copays"> ... </g>
{d.plan.type:showEnd}
{d.plan.type:ifEQ('HDHP'):showBegin}
<g id="hdhp"> ... </g>
{d.plan.type:showEnd}
```

-   Each copay prints in dollars with [:formatC](/documentation/design/formatters/currency.md): `{d.plan.benefits[0].amount:formatC(0)}` prints $25 with `"lang": "en-us"`.
-   The high-deductible block prints preventive care at $0 and `{d.plan.coinsurance}%` after the deductible.
-   The network logo follows each member: `{d.members[i].network:ifEQ('crossway'):showBegin}` keeps the Crossway National Network logo on the card of the daughter, and the Elmstead Select logo stays on the other cards.
-   The caption of the row explains it: `{d.members[i].network:ifEQ('crossway'):show(' · Out of area: Crossway National Network'):elseShow('')}`.

### 5\. Print the deductibles and out-of-pocket maximums

The back shows each amount for an individual and for a family, in-network and out-of-network:

```text
{d.plan.deductible.inNetwork.individual:formatC(0)} / {d.plan.deductible.inNetwork.family:formatC(0)}
```

-   With `"lang": "en-us"`, the line prints $1,500 / $3,000.
-   The FAQs Part 49 accept the major medical deductible and out-of-pocket maximum on the card, with a phone number and a website for the other amounts. A physical card can add a QR code to that page, and a digital card a link.
-   [:formatD](/documentation/design/formatters/date.md) prints the dates in the US format: `{d.members[i].effectiveDate:formatD('MM/DD/YYYY')}` prints 01/01/2027. The back also prints the issue date of the card, which the NCPDP guide recommends.

### 6\. Add the PDF417 barcode

Your enrollment system creates the barcode of each member and sends it as an SVG data URI in `barcode`. The `href` of an [image](/documentation/design/template-formats/svg.md#images) displays it:

```xml
<image x="138" y="100.5" width="93" height="30.34" preserveAspectRatio="none" xlink:href="{d.members[i].barcode}"/>
```

-   The barcode holds the machine-readable data of the WEDI guide, which the provider's software reads to request the eligibility of the member: `%WH`, the card issuer identifier, the member ID with its suffix, `^`, the name as `SURNAME/GIVEN NAME/MIDDLE INITIAL`, `^?` and a check character. For the subscriber: `%WH9140271836ELM83027419601^CASTELLANOS-WHITFIELD/MARIA/E^?`.
-   The modules are about 0.23 mm wide, the rows three modules high, with a quiet zone of two modules. Give the image the proportions of the barcode.
-   The PDF keeps the barcode as vector shapes: it stays sharp on any printer.

### 7\. Generate the PDF

Send the data with these options:

```json
{
  "data": { ... },
  "convertTo": "pdf",
  "converter": "C",
  "lang": "en-us"
}
```

-   `"converter": "C"` draws the SVG with Chrome. The PDF has one US Letter page with selectable text, and prints the cards at true size at 100%.
-   Call the API after each change in the enrollment system, in a nightly batch, or on demand when a member asks for a new card in the portal.
-   For the digital card of a mobile app, ask for a PNG: `"convertTo": { "formatName": "png", "formatOptions": { "Scale": 2 } }`. See [Convert SVG to PNG or PDF](/documentation/design/template-formats/svg.md#convert-svg-to-png-or-pdf).

> ℹ️ **Note:** SVG templates require Carbone v5. The conversion of an SVG to PDF with Chrome requires Carbone v5.17.0 or later.

## Related Examples

- [Insurance premium bordereau](/examples/insurance-premium-bordereau/index.md): XLSX template to XLSX.
- [Event badge with QR code](/examples/event-badge/index.md): SVG template to PDF.
- [Prescription with medication schedule](/examples/prescription/index.md): DOCX template to PDF.

## Related topics

- [Airline boarding pass](/examples/boarding-pass/index.md)
- [Event badge with QR code](/examples/event-badge/index.md)
- [Training certificates](/examples/certificat/index.md)
- [Flight e-ticket](/examples/eticket/index.md)
- [Certificate of completion](/examples/s-certificate-completion/index.md)
- [Train e-tickets with QR codes](/examples/ticket/index.md)
