@payabli/component-contracts
v0.1.0
Published
Wire schemas, component registry, and partner-facing types shared by the Payabli embedded components SDK and payhub.
Keywords
Readme
@payabli/component-contracts
Wire schemas, the component registry, and the partner-facing types that the
Payabli embedded components SDK (@payabli/components-web) and the payhub
iframe share. One folder per component under src/<component>/.
Install
pnpm add @payabli/component-contractsWhat is inside
protocol/: the postMessage envelope,parseEnvelope/parseMessage/parsePayload, the base events every component emits, and the messages the SDK sends to the iframe (CONFIG_SET,SESSION_UPDATE,SUBMIT, ...).payin/: the PayIn component. Its options schema, event schemas, and thePAYMENT_METHODS/CARD_BRANDSvocabulary.registry:register(),getComponentDescriptor(), and theComponentDefinitionsdeclaration-merge point.ErrorCodes: the error vocabulary shared by the SDK, payhub, and the API.
Schemas are zod v4 mini and the runtime is bundled. Consumers on zod 3.25 or
later resolve the types through zod/v4/mini.
Versioning
Pre-1.0. A breaking wire change is a minor bump. MESSAGE_VERSION changes
only when old and new sides can no longer talk.
