MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / createCheckoutUrl

Function createCheckoutUrl

packages/server/src/lib/polar.ts:57–69  ·  view source on GitHub ↗
({
  customerExternalId,
  requestUrl,
}: CreateCheckoutUrlParams)

Source from the content-addressed store, hash-verified

55};
56
57export async function createCheckoutUrl({
58 customerExternalId,
59 requestUrl,
60}: CreateCheckoutUrlParams) {
61 const result = await polar.checkouts.create({
62 products: [getPolarProductId()],
63 successUrl: new URL("/billing/success", requestUrl).toString(),
64 externalCustomerId: customerExternalId,
65 metadata: { source: "nightcode-cli" },
66 });
67
68 return result.url;
69};
70
71export async function createCustomerPortalUrl({
72 customerExternalId,

Callers 1

billing.tsFile · 0.90

Calls 1

getPolarProductIdFunction · 0.85

Tested by

no test coverage detected