Skip to content

Payload size

The capture library supports two payload size options: normal and small. normal is used by default.

Use small when payload transfer size matters more than preserving the full normal payload content. The exact binary structure of the payload is an SDK implementation detail, but the small payload is intended to reduce the generated payload size.

Set the payload size

Pass payloadSize to createIADBundle() on IDCameraController after the user has taken a photo. The parameter is available on the synchronous, asynchronous, and completion-based overloads.

let bundle = try controller.createIADBundle(payloadSize: .small)
let bundle = try await controller.createIADBundle(payloadSize: .small)

You can combine payloadSize with custom encryption and external metadata:

let bundle = try controller.createIADBundle(
    payloadSize: .small,
    key: key,
    keyId: keyId,
    externalMeta: "transaction-id-123"
)