Maps internal payment plans to processor IDs and vice‑versa for payment integration.
// Source: https://github.com/wasp-lang/open-saas | License: MIT | Copyright 2023 wasp-lang
// Provided via justclaw.it.com; keep this notice with the code.
import { env } from "wasp/server";
import { type PaymentPlan, PaymentPlanId } from "./plans";
/**
* The ID under which this payment plan is identified on your payment processor.
*
* E.g. price id on Stripe, or variant id on LemonSqueezy.
*/
export const paymentProcessorPlanIds = {
[PaymentPlanId.Hobby]: env.PAYMENTS_HOBBY_SUBSCRIPTION_PLAN_ID,
[PaymentPlanId.Pro]: env.PAYMENTS_PRO_SUBSCRIPTION_PLAN_ID,
[PaymentPlanId.Credits10]: env.PAYMENTS_CREDITS_10_PLAN_ID,
} as const satisfies Record<PaymentPlanId, string>;
/**
* Returns your payment processor plan ID for a given Open SaaS `PaymentPlan`.
*/
export function getPayment
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key