A payment API connects a payment solution with an existing application. For a payment gateway to work, it needs to be compatible with an eCommerce website or web application.