stripe
Implementation of the Stripe API. There is no default interpreter because this plugin requires an API key.
Examples use mocked interpreters to keep all payment node kinds runnable in docs without external side effects.
import { stripe, wrapStripeSdk, createStripeInterpreter } from "@mvfm/plugin-stripe";
import Stripe from "stripe";
// 1. Create a Stripe SDK client
const sdk = new Stripe(process.env.STRIPE_API_KEY);
const client = wrapStripeSdk(sdk);
// 2. Build the interpreter
const stripeInterp = createStripeInterpreter(client);
// 3. Merge and run
const app = mvfm(prelude, stripe);
const baseInterp = defaults(app, { stripe: stripeInterp });
await fold(baseInterp, prog);