API integration is the connection of a merchant's or platform's own software to a payment provider or bank through that provider's application programming interface (API), so that payments can be created, confirmed, refunded and reported from within the merchant's systems. Most payment APIs follow the REST style, exchange JSON messages over HTTPS and authenticate each request with secret API keys. Providers report status changes, such as a completed payment or a new chargeback, through a webhook, and offer a test environment for building before going live.
A direct integration gives the most control over checkout design and data, but it needs developer work and must be maintained as the provider releases new API versions. The main alternatives are a hosted payment page or a ready-made plug-in for an e-commerce platform. The choice also affects security duties: a merchant whose servers receive raw card numbers carries a much larger PCI DSS burden than one using provider-hosted fields or client-side tokenisation.