manifold/web/lib/service/stripe.ts

14 lines
393 B
TypeScript
Raw Normal View History

2022-03-08 04:52:10 +00:00
import { PROJECT_ID } from '../../../common/envs/constants'
export const checkoutURL = (
userId: string,
manticDollarQuantity: number,
referer = ''
) => {
2022-03-07 23:43:26 +00:00
const endpoint = `https://us-central1-${PROJECT_ID}.cloudfunctions.net/createCheckoutSession`
return `${endpoint}?userId=${userId}&manticDollarQuantity=${manticDollarQuantity}&referer=${encodeURIComponent(
referer
)}`
}