Skip to content

Stripe.Terminal reference

Source: src/Stripe/CreateTerminalReader.ts

Create a Stripe Terminal Reader over HTTP. Account-scoped — binds the API key onto the host, not a specific reader resource.

CreateTerminalReader: Creating a Reader at runtime

Section titled “CreateTerminalReader: Creating a Reader at runtime”
const create = yield* Stripe.CreateTerminalReader();
const reader = yield* create({
registration_code: "simulated-wpe",
label: "Front counter",
location: locationId,
});

Source: src/Stripe/CreateTerminalReaderHttp.ts Kind: Layer · Provides: Stripe.CreateTerminalReader

HTTP implementation of CreateTerminalReader. Provide it on the Function or Worker Effect.

Source: src/Stripe/RetrieveTerminalConfiguration.ts

Retrieve a bound Stripe Terminal Configuration over HTTP.

RetrieveTerminalConfiguration: Reading a Terminal Configuration

Section titled “RetrieveTerminalConfiguration: Reading a Terminal Configuration”
const retrieve = yield* Stripe.RetrieveTerminalConfiguration(config);
const live = yield* retrieve();

Source: src/Stripe/RetrieveTerminalConfigurationHttp.ts Kind: Layer · Provides: Stripe.RetrieveTerminalConfiguration

HTTP implementation of RetrieveTerminalConfiguration. Provide it on the Function or Worker Effect.

Source: src/Stripe/RetrieveTerminalLocation.ts

Retrieve a bound Stripe Terminal Location over HTTP.

RetrieveTerminalLocation: Reading a Terminal Location

Section titled “RetrieveTerminalLocation: Reading a Terminal Location”
const retrieve = yield* Stripe.RetrieveTerminalLocation(store);
const live = yield* retrieve();

Source: src/Stripe/RetrieveTerminalLocationHttp.ts Kind: Layer · Provides: Stripe.RetrieveTerminalLocation

HTTP implementation of RetrieveTerminalLocation. Provide it on the Function or Worker Effect.

Source: src/Stripe/RetrieveTerminalReader.ts

Retrieve a bound Stripe Terminal Reader over HTTP.

const retrieve = yield* Stripe.RetrieveTerminalReader(reader);
const live = yield* retrieve();

Source: src/Stripe/RetrieveTerminalReaderHttp.ts Kind: Layer · Provides: Stripe.RetrieveTerminalReader

HTTP implementation of RetrieveTerminalReader. Provide it on the Function or Worker Effect.

Source: src/Stripe/TerminalConfiguration.ts

A Stripe Terminal Configuration — splash screens, tipping, offline mode, reboot window, cellular, and Wi-Fi for smart readers. Name and nested settings update in place. Destroy hard-deletes the configuration. The account default configuration is never adopted or listed.

Terminal configurations have no metadata field. Identity is the Stripe id plus the unique name. Account-wide list() (nuke) enumerates every non-default configuration on the account.

TerminalConfiguration: Creating a Configuration

Section titled “TerminalConfiguration: Creating a Configuration”

Named configuration with USD tipping

const config = yield* Stripe.TerminalConfiguration("storefront", {
name: "Storefront",
offline: { enabled: true },
tipping: {
usd: {
fixedAmounts: [100, 200, 300],
percentages: [15, 20, 25],
smartTipThreshold: 1000,
},
},
});

Reboot window

const config = yield* Stripe.TerminalConfiguration("storefront", {
name: "Storefront",
rebootWindow: { startHour: 2, endHour: 4 },
});

TerminalConfiguration: Updating a Configuration

Section titled “TerminalConfiguration: Updating a Configuration”
const config = yield* Stripe.TerminalConfiguration("storefront", {
name: "Storefront (updated)",
offline: { enabled: false },
tipping: {
usd: {
fixedAmounts: [200, 300, 400],
percentages: [10, 15, 20],
smartTipThreshold: 2000,
},
},
});

TerminalConfiguration: Deleting a Configuration

Section titled “TerminalConfiguration: Deleting a Configuration”
// stack.destroy() / resource removal hard-deletes the configuration
const config = yield* Stripe.TerminalConfiguration("storefront", {
name: "Storefront",
});

Source: src/Stripe/TerminalLocation.ts

A Stripe Terminal Location — a grouping of Terminal readers at a physical site. Display name, phone, metadata, configuration overrides, and address fields other than country update in place. Changing address.country replaces the location; re-register readers on the new one.

Destroy hard-deletes the location.

US storefront

const store = yield* Stripe.TerminalLocation("storefront", {
displayName: "Market Street",
address: {
line1: "123 Market Street",
city: "San Francisco",
state: "CA",
postalCode: "94105",
country: "US",
},
});

Generated name with phone and metadata

const kiosk = yield* Stripe.TerminalLocation("kiosk", {
address: {
line1: "1 Infinite Loop",
city: "Cupertino",
state: "CA",
postalCode: "95014",
country: "US",
},
phone: "+14085551234",
metadata: { region: "west" },
});
const store = yield* Stripe.TerminalLocation("storefront", {
displayName: "Market Street Annex",
address: {
line1: "125 Market Street",
city: "San Francisco",
state: "CA",
postalCode: "94105",
country: "US",
},
metadata: { region: "west" },
});
// stack.destroy() / resource removal calls DELETE
const store = yield* Stripe.TerminalLocation("storefront", {
address: {
line1: "123 Market Street",
city: "San Francisco",
state: "CA",
postalCode: "94105",
country: "US",
},
});

Source: src/Stripe/TerminalReader.ts

A Stripe Terminal Reader — a physical or simulated card reader that accepts in-person payments. registrationCode and location are create-only; changing location replaces the reader. label and metadata update in place. Destroy deletes the reader.

In test mode, register a simulated WisePOS E with registrationCode: "simulated-wpe" (or "simulated-s700" / "simulated-s710"). Simulated readers typically need a Terminal Location.

Simulated WisePOS E

const reader = yield* Stripe.TerminalReader("front-counter", {
registrationCode: "simulated-wpe",
label: "Front counter",
location: locationId,
});

Physical reader with metadata

const reader = yield* Stripe.TerminalReader("pos-1", {
registrationCode: pairingCode,
label: "POS 1",
location: location.id,
metadata: { station: "1" },
});
const reader = yield* Stripe.TerminalReader("front-counter", {
registrationCode: "simulated-wpe",
label: "Front counter (updated)",
location: locationId,
metadata: { station: "1", floor: "lobby" },
});
const reader = yield* Stripe.TerminalReader("front-counter", {
registrationCode: "simulated-wpe",
location: locationId,
});
// stack.destroy() deletes the reader

Source: src/Stripe/UpdateTerminalReader.ts

Update a bound Stripe Terminal Reader over HTTP.

const update = yield* Stripe.UpdateTerminalReader(reader);
const live = yield* update({ label: "Front counter (updated)" });

Source: src/Stripe/UpdateTerminalReaderHttp.ts Kind: Layer · Provides: Stripe.UpdateTerminalReader

HTTP implementation of UpdateTerminalReader. Provide it on the Function or Worker Effect.