Simply put, an application programming interface (API) allows one piece of software to make use of the functionality of, or data available to, another. It provides a consistent, programmatic method for accessing a resource. Put another way, it is simply a structured way of exposing functionality.
An API, in the context of Java, is a collection of prewritten packages, classes, and interfaces with their respective methods, fields and constructors. An interface is a collection of abstract methods that a class implements by defining the behavior/state of an object. Similar to a user interface, which facilitates interaction between humans and computers, an API serves as a software program interface facilitating interaction between the partner app and Samsung Pay.