Interface
An interface defines a contract that implementing types agree to satisfy. It focuses primarily on what an object can do rather than how it stores or implements that behavior. Interfaces are valuable for loose coupling, dependency injection, multiple capabilities, testability and substituting implementations. For example, an application can depend on a PaymentGateway interface while different implementations support Stripe, Razorpay, a bank gateway or a test fake.
Defines a contract or capability.
Reduces dependency on concrete implementations.
Supports multiple implementations.
Works naturally with dependency injection.
Improves unit testing by allowing test doubles.
The exact capabilities of interfaces vary between languages.