import type { PaymentIntent } from './checkout.js';

export interface CheckoutMetrics {
  incSuccess(): void;
  incFailure(): void;
  checkoutCompleted(amountCents: number): void;
}

export interface PaymentProvider {
  createIntent(input: {
    orderId: string;
    amountCents: number;
    currency: 'EUR';
  }): Promise<PaymentIntent>;
}

export interface CheckoutOrderLookup {
  findByIdempotency(
    userId: string,
    idempotencyKey: string,
  ): Promise<{ orderId: string } | undefined>;
}
