diff --git a/clients/apps/web/src/components/Checkout/CheckoutLinkForm.tsx b/clients/apps/web/src/components/Checkout/CheckoutLinkForm.tsx index c03b1042fa..c115c5fed5 100644 --- a/clients/apps/web/src/components/Checkout/CheckoutLinkForm.tsx +++ b/clients/apps/web/src/components/Checkout/CheckoutLinkForm.tsx @@ -35,7 +35,7 @@ import ProductSelect from '../Products/ProductSelect' import { toast } from '../Toast/use-toast' type CheckoutLinkCreateForm = Omit< - schemas['CheckoutLinkCreate'], + schemas['CheckoutLinkCreateProducts'], 'payment_processor' | 'metadata' > & { metadata: { key: string; value: string | number | boolean }[] @@ -155,7 +155,7 @@ export const CheckoutLinkForm = ({ const onSubmit: SubmitHandler = useCallback( async (data) => { - const body: schemas['CheckoutLinkCreate'] = { + const body: schemas['CheckoutLinkCreateProducts'] = { payment_processor: 'stripe', ...data, discount_id: data.discount_id || null, diff --git a/clients/apps/web/src/hooks/queries/checkout_links.ts b/clients/apps/web/src/hooks/queries/checkout_links.ts index c5e3642dc3..ff4bfd5489 100644 --- a/clients/apps/web/src/hooks/queries/checkout_links.ts +++ b/clients/apps/web/src/hooks/queries/checkout_links.ts @@ -29,7 +29,7 @@ export const useCheckoutLinks = ( export const useCreateCheckoutLink = () => useMutation({ - mutationFn: (body: schemas['CheckoutLinkCreate']) => { + mutationFn: (body: schemas['CheckoutLinkCreateProducts']) => { return api.POST('/v1/checkout-links/', { body }) }, onSuccess: (result, _variables, _ctx) => {