The concept
An API is the set of addresses and rules a system publishes so that another system can talk to it. In the context of payments, it is what lets your membership area ask the platform whether a given sale was approved, or lets your CRM create a charge without anyone opening the dashboard.
Communication is usually over HTTP with data in JSON, authenticated by a key that identifies the account. Unlike a webhook, where the platform notifies you when something happens, with an API you are the one asking.
How it shows up in practice
You maintain a membership area on your site and sell courses through a payment platform. Without API, each approved sale required manual email from you to unlock access. With API, your membership area asks the payment platform if each buyer already paid, receives the answer in seconds, and unlocks access automatically. You never send an email, the buyer starts watching classes while the transaction is still being processed.
Content is where I expect much of the real money will be made on the internet.
This automation cuts support operating cost and eliminates the classic complaint of product not delivered. When the sale is canceled or becomes chargeback later, the API undoes access the same way, keeping everything synced without you touching anything.