refund and delayed charge
This commit is contained in:
@@ -84,6 +84,9 @@ export const rentalAPI = {
|
||||
api.post(`/rentals/${id}/review-renter`, data),
|
||||
reviewItem: (id: string, data: any) =>
|
||||
api.post(`/rentals/${id}/review-item`, data),
|
||||
getRefundPreview: (id: string) => api.get(`/rentals/${id}/refund-preview`),
|
||||
cancelRental: (id: string, reason?: string) =>
|
||||
api.post(`/rentals/${id}/cancel`, { reason }),
|
||||
};
|
||||
|
||||
export const messageAPI = {
|
||||
@@ -110,18 +113,15 @@ export const itemRequestAPI = {
|
||||
};
|
||||
|
||||
export const stripeAPI = {
|
||||
createCheckoutSession: (data: {
|
||||
itemName: string;
|
||||
total: number;
|
||||
return_url: string;
|
||||
rentalData?: any;
|
||||
}) => api.post("/stripe/create-checkout-session", data),
|
||||
getCheckoutSession: (sessionId: string) =>
|
||||
api.get(`/stripe/checkout-session/${sessionId}`),
|
||||
createConnectedAccount: () => api.post("/stripe/accounts"),
|
||||
createAccountLink: (data: { refreshUrl: string; returnUrl: string }) =>
|
||||
api.post("/stripe/account-links", data),
|
||||
getAccountStatus: () => api.get("/stripe/account-status"),
|
||||
createSetupCheckoutSession: (data: {
|
||||
rentalData?: any;
|
||||
}) => api.post("/stripe/create-setup-checkout-session", data),
|
||||
};
|
||||
|
||||
export default api;
|
||||
|
||||
Reference in New Issue
Block a user