import { inject, Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class DepositService { private http: HttpClient = inject(HttpClient); handleDeposit(amount: number): Observable<{ sessionId: string }> { return this.http.post<{sessionId: string}>('/backend/deposit/checkout', {amount}); } }