Bindings overview
Workflows
The kinde.plan binding provides methods to use for various plan related events such as when a customer requests to cancel or change their plan.
export const workflowSettings = { // ...other settings bindings: {"kinde.plan": {}}};denySelection(reason: string, suggestions: string[]): voidPrevent the user from changing their plan.
The Kinde infrastructure library provides a type-safe helper:
import { denyPlanSelection } from "@kinde/infrastructure";
export default async function (event: onPlanSelectionEvent) { if (!canChangePlan()) { denyPlanSelection("You are not allowed to change your plan as you have outstanding payments"); }}If you’re not using the infrastructure library, you can call the underlying API directly:
kinde.plan.denySelection( "You are not allowed to change your plan as you have outstanding payments);denyCancellation(reason: string): voidPrevent the user from cancelling their plan.
The Kinde infrastructure library provides a type-safe helper:
import { denyPlanCancellation } from "@kinde/infrastructure";
export default async function (event: onPlanCancellationRequestEvent) { if (!canChangePlan()) { denyPlanCancellation("You are not allowed to change your plan as you have outstanding payments"); }}If you’re not using the infrastructure library, you can call the underlying API directly:
kinde.plan.denyCancellation( "You are not allowed to cancel your plan as you have outstanding payments);