Barcode and QR Code Presentation

This section describes how to define and configure Barcode and QR Code data for Samsung Wallet cards.

Card Data Format

Barcode and QR Code data are defined using barcode.* fields. These fields determine the value to encode, the presentation, and the barcode or QR format.

The barcode object must be supplied as an escaped JSON string. Dynamic barcode and QR Code features must be enabled in the Samsung Wallet Partners Portal.

Barcode Data Structure

{
  "barcode.generationType": "STATIC",
  "barcode.value": "2723255352",
  "barcode.serialType": "BARCODE",
  "barcode.ptFormat": "BARCODESERIAL",
  "barcode.ptSubFormat": "UPC_A"
}

Field Description

Attribute

Description

barcode.generationType

(Optional)
Barcode operation mode. The effective value is STATIC when omitted. Allowed values: STATIC, TOTP, and INTERVAL.

barcode.value

(Required)
Actual value to encode in the barcode or QR Code.

barcode.serialType

(Required)
Type of data to display, such as barcode, QR Code, or serial number.

barcode.ptFormat

(Required)
Display format, such as barcode only, barcode with serial number, or QR Code only.

barcode.ptSubFormat

(Optional)
Barcode or QR Code encoding format.

barcode.errorCorrectionLevel

(Optional)
QR error-correction level. Applies only to QR Code presentation. Allowed values: L, M, Q, and H.

barcode.interval

(Conditional)
Refresh cadence in milliseconds, provided as a numeric string of up to 11 digits. Required when barcode.generationType is INTERVAL.

barcode.secretKeyEncoding

(Conditional)
Encoding of barcode.secretKey; no default is defined. For example, base16. Required when barcode.generationType is TOTP.

barcode.secretKey

(Conditional)
Shared secret used for TOTP generation. Treat this value as credential material. Required when barcode.generationType is TOTP.

barcode.totpAlgorithm

(Conditional)
TOTP algorithm identifier. When omitted in TOTP mode, TOTP_SHA1 is used. Required when barcode.generationType is TOTP.

barcode.totpDigits

(Conditional)
Number of digits in the generated TOTP value. When omitted in TOTP mode, a zero-padded six-digit value is used. Required when barcode.generationType is TOTP.

barcode.totpPeriodMillis

(Conditional)
TOTP time step in milliseconds. When omitted in TOTP mode, 30000 is used. Required when barcode.generationType is TOTP.

Presentation Types (barcode.serialType)

Code Name

Description

SERIALNUMBER

Displays a serial number.

BARCODE

Displays a 1D barcode.

QRCODE

Displays a QR Code.

SHIPPING

Shipping information (online use only).

CALLORDER

Call-order information (online use only).

URL

URL serial (online use only).

Presentation Formats (barcode.ptFormat)

Code Name

Description

BARCODE

Barcode only.

BARCODESERIAL

Barcode with serial number.

SERIAL

Serial number only.

DUALSERIAL

Dual serial numbers.

DUALBARCODE

Dual barcodes.

DUALBARCODESERIAL

Dual barcodes for each serial number.

BARCODEPIN

Barcode with PIN.

QRCODE

QR Code only.

QRCODESERIAL

QR Code with serial number.

Barcode / QR Formats (barcode.ptSubFormat)

All formats are supported by the ZXing barcode scanning library.

1D Barcode Formats

Code Name

Description

CODABAR

CODABAR 1D format.

CODE_39

Code 39 1D format.

CODE_93

Code 93 1D format.

CODE_128

Code 128 1D format.

EAN_8

EAN-8 1D format.

EAN_13

EAN-13 1D format.

ITF

Interleaved Two of Five.

RSS_14

RSS-14.

RSS_EXPANDED

RSS Expanded.

UPC_A

UPC-A 1D format.

UPC_E

UPC-E 1D format.

UPC_EAN_EXTENSION

UPC/EAN extension (not stand-alone).

2D Barcode / QR Formats

Code Name

Description

QR_CODE

QR Code 2D format.

AZTEC

Aztec 2D barcode format.

DATA_MATRIX

Data Matrix 2D format.

MAXICODE

MaxiCode 2D format.

PDF_417

PDF417 format.

Data Samples

1D Barcode with Serial (UPC-A)

{
  "barcode.value": "www.samsung.com",
  "barcode.serialType": "BARCODE",
  "barcode.ptFormat": "BARCODESERIAL",
  "barcode.ptSubFormat": "UPC_A"
}

Static QR Code

{
  "barcode.value": "www.samsung.com",
  "barcode.serialType": "QRCODE",
  "barcode.ptFormat": "QRCODE",
  "barcode.ptSubFormat": "QR_CODE"
}

Dynamic QR Code (TOTP)

{
  "barcode.generationType": "TOTP",
  "barcode.serialType": "QRCODE",
  "barcode.ptFormat": "QRCODE",
  "barcode.ptSubFormat": "CODE_128",
  "barcode.secretKeyEncoding": "base16",
  "barcode.secretKey": "3132333435363738393031323334353637383930",
  "barcode.totpAlgorithm": "TOTP_SHA1",
  "barcode.totpDigits": 6,
  "barcode.totpPeriodMillis": 30000
}

Dynamic QR Code (INTERVAL)

{
  "barcode.generationType": "INTERVAL",
  "barcode.value": "482913",
  "barcode.serialType": "QRCODE",
  "barcode.ptFormat": "QRCODE",
  "barcode.ptSubFormat": "QR_CODE",
  "barcode.errorCorrectionLevel": "M",
  "barcode.interval": "30000"
}

Serial Number Only

{
  "barcode.value": "1234567890",
  "barcode.serialType": "SERIALNUMBER",
  "barcode.ptFormat": "SERIAL"
}

Developer Notes

  • Ensure that barcode.serialType, barcode.ptFormat, and barcode.ptSubFormat are logically compatible.
  • Use barcode.interval only with INTERVAL mode.
  • Do not expose or log barcode.secretKey.
  • Validate supported formats against ZXing specifications.