manifold/web/lib/service/stripe.ts
2022-03-07 15:43:26 -08:00

14 lines
385 B
TypeScript

import { PROJECT_ID } from '../../../common/access'
export const checkoutURL = (
userId: string,
manticDollarQuantity: number,
referer = ''
) => {
const endpoint = `https://us-central1-${PROJECT_ID}.cloudfunctions.net/createCheckoutSession`
return `${endpoint}?userId=${userId}&manticDollarQuantity=${manticDollarQuantity}&referer=${encodeURIComponent(
referer
)}`
}