export type DepositIntentInput = {
  userId: string;
  amount: string;
  currency: string;
  idempotencyKey: string;
  returnUrl: string;
};

export type DepositIntent = {
  provider: string;
  providerRef: string;
  redirectUrl: string;
  status: "PENDING";
};

export type WithdrawalInput = {
  userId: string;
  amount: string;
  currency: string;
  destination: unknown;
  idempotencyKey: string;
};

export interface PaymentProvider {
  key: string;
  createDepositIntent(input: DepositIntentInput): Promise<DepositIntent>;
  requestWithdrawal(input: WithdrawalInput): Promise<{ providerRef: string; status: "PENDING" }>;
  healthCheck(): Promise<{ ok: boolean; latencyMs: number; message?: string }>;
}
