# 

## What are electronic payments

Electronic payments are financial transactions conducted through digital systems rather than physical cash or checks. When a person purchases a product online or taps a card at a terminal, an electronic payment moves funds from their account to the merchant's account through a chain of intermediaries.

These intermediaries — payment gateways, processors, card networks, and banks — each play a specific role in authorizing, clearing, and settling the transaction.

## How a payment transaction works

A typical card payment follows this sequence.

![image](https://files.modern-mermaid.live/images/1776271440287-mermaid-diagram-1776271440136.png)

1. **Initiation**: The person submits payment details (card number, expiration, CVV) through the merchant's checkout.
2. **Encryption and routing**: The payment gateway encrypts the data and forwards it to a payment processor.
3. **Authorization**: The processor routes the request through the card network to the issuing bank, which checks the account for available funds and fraud signals.
4. **Response**: The issuing bank approves or declines the transaction. The response travels back through the chain to the merchant in milliseconds.
5. **Settlement**: At the end of the business day, approved transactions are batched and settled. The issuing bank transfers funds through the card network to the merchant's acquiring bank.


## Types of electronic payments

| Payment type | Description | Example |
|  --- | --- | --- |
| Credit and debit cards | Card credentials authorize a transfer from the cardholder's account | Visa, Mastercard |
| ACH / bank transfers | Funds move directly between bank accounts through the Automated Clearing House network | Payroll direct deposits, bill payments |
| Digital wallets | Card or bank credentials stored in a mobile device for contactless payments | Apple Pay, Google Pay |
| Contactless payments | Near Field Communication (NFC) or QR codes enable tap-to-pay at terminals | Tap-to-pay cards, mobile NFC |


## Key entities in a payment transaction

| Entity | Role |
|  --- | --- |
| Person (cardholder) | Initiates the purchase |
| Merchant | Sells goods or services and accepts payment |
| Payment gateway | Encrypts payment data and routes it between the merchant and processor |
| Payment processor | Communicates with card networks and banks to authorize transactions |
| Card network | Provides the infrastructure connecting issuing and acquiring banks (Visa, Mastercard, etc.) |
| Issuing bank | The person's bank; holds their funds and approves or declines transactions |
| Acquiring bank | The merchant's bank; receives settled funds |


## Why this matters for integration

As a developer integrating with Reefpay, you interact primarily with the **gateway layer**. Reefpay handles encryption, processor routing, and response normalization so your application does not need direct connections to processors or banks.

Understanding the full transaction flow helps you:

* Design correct authorization and capture workflows
* Handle declines and errors with appropriate person-facing messages
* Implement settlement reconciliation against batch reports


## Further reading

* [About the evolution of payments](/docs/concepts/payment-industry/evolution)
* [About the role of gateways](/docs/concepts/payment-industry/role-of-gateways)
* [About card networks and interchange](/docs/concepts/payment-industry/networks-and-interchange)
* [About Reefpay](/docs/get-started)