ShippingRate
Source:
src/Stripe/ShippingRate.ts
A Stripe Shipping Rate — the price of shipping presented to customers
and applied to a purchase. Amount, currency, display name, delivery
estimate, and tax code are immutable (changing them replaces the
rate). active, metadata, taxBehavior, and per-currency
currencyOptions update in place. Shipping rates cannot be deleted;
destroy deactivates them (active=false).
Creating a Shipping Rate
Section titled “Creating a Shipping Rate”Fixed-amount USD rate
const ground = yield* Stripe.ShippingRate("ground", { displayName: "Ground", amount: 500, currency: "usd",});Rate with a delivery estimate
const express = yield* Stripe.ShippingRate("express", { displayName: "Express", amount: 1500, currency: "usd", deliveryEstimate: { minimum: { unit: "business_day", value: 1 }, maximum: { unit: "business_day", value: 3 }, },});Updating a Shipping Rate
Section titled “Updating a Shipping Rate”const ground = yield* Stripe.ShippingRate("ground", { displayName: "Ground", amount: 500, currency: "usd", active: false, metadata: { region: "us" },});Deactivating a Shipping Rate
Section titled “Deactivating a Shipping Rate”// stack.destroy() / resource removal sets active: falseconst ground = yield* Stripe.ShippingRate("ground", { displayName: "Ground", amount: 500, currency: "usd",});