4700ceb14c
* web/lib/firebase/api-call -> common/api, web/lib/firebase/api * Reuse `APIError` type in server code * Reuse `getFunctionUrl` in server code
13 lines
339 B
TypeScript
13 lines
339 B
TypeScript
import { getFunctionUrl } from 'common/api'
|
|
|
|
export const checkoutURL = (
|
|
userId: string,
|
|
manticDollarQuantity: number,
|
|
referer = ''
|
|
) => {
|
|
const endpoint = getFunctionUrl('createcheckoutsession')
|
|
return `${endpoint}?userId=${userId}&manticDollarQuantity=${manticDollarQuantity}&referer=${encodeURIComponent(
|
|
referer
|
|
)}`
|
|
}
|