CheckoutCustomer
Runtime Schema for customer facts copied into an accepted checkout request.
The external customer ID is merchant-owned. SAPA validates the email address and non-empty display name before accepting the checkout command.
Declaration
Section titled “Declaration”const CheckoutCustomer: Schema.Struct<{ externalId: Schema.brand<Schema.String, "ExternalCustomerId">; email: Schema.brand<Schema.String, "EmailAddress">; name: Schema.NonEmptyString;}>;Example
Section titled “Example”import { CheckoutCustomer } from "@byfungsi/sapa";import { Schema } from "effect";
const customer = yield* Schema.decodeEffect(CheckoutCustomer)({ externalId: "customer-42", email: "customer@example.com", name: "Example Customer",});