mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
- Интеграция рекурентов от Юкассы
- Багфикс личного кабинета
This commit is contained in:
@@ -6,6 +6,7 @@ import type {
|
||||
PaginatedResponse,
|
||||
PendingPayment,
|
||||
ManualCheckResponse,
|
||||
SavedCard,
|
||||
} from '../types';
|
||||
|
||||
export const balanceApi = {
|
||||
@@ -121,4 +122,17 @@ export const balanceApi = {
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Get saved payment methods (cards) for recurrent payments
|
||||
getSavedCards: async (): Promise<{ cards: SavedCard[]; recurrent_enabled: boolean }> => {
|
||||
const response = await apiClient.get<{ cards: SavedCard[]; recurrent_enabled: boolean }>(
|
||||
'/cabinet/balance/saved-cards',
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Unlink (delete) a saved payment method
|
||||
deleteSavedCard: async (id: number): Promise<void> => {
|
||||
await apiClient.delete(`/cabinet/balance/saved-cards/${id}`);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user