UNPKG

business-as-code

Version:

Primitives for expressing business logic and processes as code

21 lines 1.07 kB
/** * Merchant provisioning — the platform/Connect half of the FinanceProvider * port: turn a priced Offer into a sellable product-line under a holdco, and * mint a checkout for it. * * Motivation (added by explore.startups.studio B4, issue #222): the substrate * `FinanceProvider` port modeled CHARGING (`charge`/`refund`/`subscribe`) but * not the upstream provisioning a hosted-checkout flow needs: * 1. provision a Product + Price under a platform account (Stripe Connect: * one platform / holdco, many product-lines), keyed to a caller-supplied * durable id (NOT a name — names are mutable), * 2. open a hosted Checkout session that returns a redirectable URL, * 3. report a payout against the platform balance. * * Stripe ships all three; the gap was only that the port did not EXPRESS them, * so a consumer had to reach past the port into raw Stripe. These types close * that gap so the consumer wires through the port (Stripe / Tempo / x402 are * interchangeable behind it). */ export {}; //# sourceMappingURL=merchant.js.map