diff --git a/src/service/apiEndpoints.ts b/src/service/apiEndpoints.ts index 290b8b5ab..2b892a82a 100644 --- a/src/service/apiEndpoints.ts +++ b/src/service/apiEndpoints.ts @@ -119,7 +119,7 @@ export const endpoints = { refundStripePayment: (id: string) => { url: `/donation/refund-stripe-payment/${id}`, method: 'POST' }, invalidateStripePayment: (id: string) => - { url: `/donation/invalidate-stripe-payment/${id}`, method: 'POST' }, + { url: `/donation/${id}/invalidate`, method: 'PATCH' }, getDonation: (id: string) => { url: `/donation/${id}`, method: 'GET' }, donationsList: ( campaignId?: string, diff --git a/src/service/donation.ts b/src/service/donation.ts index 4d34407d2..f1dba2b4f 100644 --- a/src/service/donation.ts +++ b/src/service/donation.ts @@ -81,7 +81,7 @@ export const useRefundStripeDonation = () => { export const useInvalidateStripeDonation = () => { const { data: session } = useSession() return async (extPaymentId: string) => { - return await apiClient.post( + return await apiClient.patch( endpoints.donation.invalidateStripePayment(extPaymentId).url, '', authConfig(session?.accessToken),