Skip to main content
@ai-billing/nextjs
@ai-billing/nextjs / server / createCheckout

Function: createCheckout()

createCheckout(_productId, _userId, _successUrl): Promise<string>
Defined in: packages/nextjs/src/polar/createCheckout.ts:9 Creates a checkout session and returns the URL. (Mocked implementation)

Parameters

_productId

string the credit package product ID

_userId

string the end-user ID

_successUrl

string URL to redirect after successful purchase

Returns

Promise<string>
Last modified on October 29, 2026