Skip to content

QR code and PDF payloads

Each payslip has two copies of the payload. The QR code contains a scan URL. The XMP metadata of the PDF contains a pipe-delimited payload. The two copies contain the same three parts. This table shows one example payload in the two copies.

PartQR codePDF metadata
Full texthttps://v.verifiabl.io/v/n5waC35dPCoRtMXW5_gJqw#2.JVSWY3DPO5XXE3DE2|n5waC35dPCoRtMXW5_gJqw|JVSWY3DPO5XXE3DE
Format version2, after #2, first field
Verifiabl referencen5waC35dPCoRtMXW5_gJqw, path after /v/n5waC35dPCoRtMXW5_gJqw, second field
Encrypted PII in base32JVSWY3DPO5XXE3DE, after 2.JVSWY3DPO5XXE3DE, third field
Hostv.verifiabl.io in production. v.sandbox.verifiabl.io in sandbox.None

Each payslip has a Verifiabl reference. The QR code contains this reference, and a verifier uses it during verification. There are two methods to make a reference.

Verifiabl-generated. If you omit the reference from registerNonPII, Verifiabl makes one and returns it. The registerAndBuildBarcode endpoint always makes and returns the reference.

Issuer-generated. Send a reference to registerNonPII or registerNonPIIBatch. The official Node, .NET and Ruby SDKs generate and send one automatically for single registration. They reuse it for automatic retries. Batch registration always requires a reference from the issuer. Generate and store one yourself when a later call or a process restart must use the same idempotency key.

A Verifiabl reference is 22 base64url characters. It is a 128-bit value with the characters A-Z, a-z, 0-9, - and _, and no padding. A reference from Verifiabl and a reference from an issuer have the same format.

Make each reference from 16 random bytes from a CSPRNG. Encode the bytes as base64url with no padding. The result is 22 characters. A reference must have no pattern, and a person cannot calculate it. With 128 bits of entropy, two equal references are not probable. Registration rejects an existing reference if the content is different. Each reference is unique.

  • ✓ Use one Verifiabl reference for each payslip, and send the same reference again after a failure. The reference is your idempotency key. A new reference in a second request makes a second record.
  • ✓ Do not use a reference again for a different payslip. If you send a reference with different data, the API rejects the request with 409 CONFLICT. Verifiabl does not overwrite a record.

Example reference:

Issuer-generated Verifiabl reference
K3mXq8Rt2pLz9wQv1AYb_w

V2 is the current barcode format. The QR code contains a Verifiabl scan URL. A phone opens the URL; a verifier integration sends the full URL to the verification API without opening it.

Scan URL encoded in the QR
https://v.verifiabl.io/v/<verifiabl_reference>#2.<BASE32>

For its parts, refer to Payload copies.

Put the encrypted PII in the fragment only.

The official Node, .NET and Ruby SDKs make the scan URL and the Verifiabl QR code. They support SVG and PNG output. On a different platform, make the scan URL in your system. Obey these three rules:

  • ✓ Put the reference in the path, then add #2. and the base32 encrypted PII. Do not put the pipe-delimited payload in the path.
  • ✓ Do not percent-encode the URL. The reference and the base32 encrypted PII use URL-safe characters.
  • ✓ Do not add a space, a line break, or a query string. A QR scanner shows a link only if the full text is a valid URL. If the text has an unsafe character, the phone shows plain text, and the person cannot open the link.

Then make the QR code with a supported QR library.

The official SDKs need no extra package install for PNG output.

Embedding: make the QR code at a high resolution. It must stay readable after you print it. Then scan the QR code on the PDF as a test.

Write the pipe-delimited payload into the XMP metadata of the payslip PDF. For its fields, refer to Payload copies.

XMP namespacehttps://verifiabl.io/ns/ (prefix verifiabl)
Propertyverifiabl:payload
Value2|<verifiabl_reference>|<BASE32>

One payslip contains one payload. Write the payload with the tool that makes your PDF: a PDF library or your own code. The XMP packet is XML in the document. Use the namespace and property in the table above.

XMP packet (excerpt)
<rdf:Description rdf:about=""
xmlns:verifiabl="https://verifiabl.io/ns/">
<verifiabl:payload>2|n5waC35dPCoRtMXW5_gJqw|JVSWY3DPO5XXE3DE</verifiabl:payload>
</rdf:Description>

The metadata never contains plaintext PII. Do not put the pipe-delimited payload in the QR code.