@flowpay-io/shared
v1.0.3
Published
Flowpay SDK shared types and utilities
Readme
@flowpay-io/shared
Shared TypeScript type definitions and utilities for Flowpay SDK packages.
Installation
pnpm add @flowpay-io/sharedUsage
import type { FlowpayLaunchPayload } from "@flowpay-io/shared/types";
import { IsoCountryCode } from "@flowpay-io/shared/types";
const payload: FlowpayLaunchPayload = {
country: IsoCountryCode.CZ,
merchantId: "merchant-123",
partnerCode: "partner-abc",
userId: "user-456",
regNum: "12345678",
email: "[email protected]",
phone: "+420123456789",
createdAt: new Date().toISOString(),
};Utilities
The package also provides utility functions:
import { getCanonicalPayloadString } from "@flowpay-io/shared/utils";
// Get canonicalized JSON payload string for embedded login request launch
const canonicalPayload = getCanonicalPayloadString(payload);Links
- Homepage: https://www.flowpay.io
- Documentation: https://developers.flowpay.io