type alias SessionMetadata

Metadata attached to a validated payment session.

All fields are guaranteed to be strings after extraction. Empty string ("") is the canonical representation for "not provided" — payment providers store metadata as string key-value pairs, so null/undefined are normalized to "" by extractSessionMetadata. Domain types (e.g. RegistrationIntent.date) may use null for "not provided"; conversion between "" and null happens at the extraction boundary.

This is the logical shape. On the Square wire, several small fields are collapsed into a single packed entry to fit its 10-entry metadata cap (see packMetadata); Stripe/SumUp store the fields top-level. extractSessionMetadata unpacks the Square form back to this shape, so no consumer beyond that boundary needs to know which form was used.

Definition

ContactInfo & { _origin: string; items: string; date: string; day_count: string; answer_ids: string; text_answer_ids: string; site_token_index: string; balance_attendee_id: string; reservation_amount: string; modifiers: string; thank_you_url: string; allocations: string; price_proof: string; }

Usage

import { type SessionMetadata } from "doc.ts";