Summary
Companion to Parse EMV TLV (closed in #11). A Build EMV TLV operation would accept structured tag-value input and emit BER-TLV encoded hex — completing the round-trip.
Use cases
- Constructing DE 55 payloads for test harnesses or ISO 8583 message simulation
- Editing a parsed TLV structure: parse → modify values → re-encode
- Building GPO responses, READ RECORD data, or other ICC response templates for issuer-side or terminal emulation work
Proposed operation: Build EMV TLV
Input: JSON array of tag-value objects, e.g.:
[
{ "tag": "9F26", "value": "A1B2C3D4E5F60708" },
{ "tag": "9F36", "value": "0001" },
{ "tag": "77", "children": [
{ "tag": "82", "value": "5900" },
{ "tag": "94", "value": "08010401" }
]}
]
Output: BER-TLV hex — suitable for piping into Parse EMV TLV for round-trip verification.
Arguments:
- Output format: Hex | Annotated (human-readable with tag names from the dictionary)
Notes
- Constructed/primitive bit should be inferred from the EMV tag dictionary (same dict used by Parse EMV TLV), with a fallback based on whether a
children key is present
- Tag lengths should be computed automatically from the value length
- The JSON input format should round-trip cleanly with the JSON output of Parse EMV TLV
- Lower priority than the parse direction — acquirer flows primarily receive and parse TLV rather than construct it; most valuable for issuer simulation and test tooling
Module
Payment
Summary
Companion to Parse EMV TLV (closed in #11). A Build EMV TLV operation would accept structured tag-value input and emit BER-TLV encoded hex — completing the round-trip.
Use cases
Proposed operation: Build EMV TLV
Input: JSON array of tag-value objects, e.g.:
[ { "tag": "9F26", "value": "A1B2C3D4E5F60708" }, { "tag": "9F36", "value": "0001" }, { "tag": "77", "children": [ { "tag": "82", "value": "5900" }, { "tag": "94", "value": "08010401" } ]} ]Output: BER-TLV hex — suitable for piping into Parse EMV TLV for round-trip verification.
Arguments:
Notes
childrenkey is presentModule
Payment