/** The plan id + redirect URLs a checkout needs. */
export declare interface StartCheckoutInput {
readonly plan: string;
readonly successUrl: string;
readonly cancelUrl: string;
}
/**
* The caller injects the rpc binding — the generated client's
* `billing.startCheckout` action. Kept as a plain function type so the web
* subpath has zero dependency on the rpc client package; the app wires its
* generated binding in.
*/
export declare type StartCheckoutRpc = (input: StartCheckoutInput) => Promise<{
readonly url: string;
}>;
/**
* React hook that drives provider-hosted checkout. Pass the generated
* `billing.startCheckout` rpc binding; the hook tracks pending/error and
* performs the redirect on success.
*
* ```tsx
* const { startCheckout, pending } = useStartCheckout(rpc.billing.startCheckout)
*
* ```
*/
export declare const useStartCheckout: (rpc: StartCheckoutRpc) => UseStartCheckoutResult;
export declare interface UseStartCheckoutResult {
/** Kick off checkout: calls the rpc, then redirects to the provider URL. */
readonly startCheckout: (input: StartCheckoutInput) => Promise;
/** True while the rpc is in flight. */
readonly pending: boolean;
/** The last error, or null. */
readonly error: Error | null;
}
export { }