import { init } from "metrifox-js";
const metrifoxClient = init({
apiKey: process.env.METRIFOX_API_KEY
});
// Basic checkout URL generation
const checkoutUrl = await metrifoxClient.checkout.url({
offeringKey: "your_offering_key"
});
// With optional billing interval
const checkoutUrl = await metrifoxClient.checkout.url({
offeringKey: "your_offering_key",
billingInterval: "monthly"
});
// With customer key for pre-filled checkout
const checkoutUrl = await metrifoxClient.checkout.url({
offeringKey: "your_offering_key",
billingInterval: "monthly",
customerKey: "customer_123"
});