# API Basics
source: https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/api-basics/index.md

## Supported Protocols {#supported-protocols}

Mastercard Gateway supports two integration styles:

### 1. REST (JSON) {#1-rest-json}

* Uses HTTP methods: `GET`, `POST`, `PUT`
* Data sent in **JSON format**
* Best for **complex systems** like web apps and servers
* Authentication included in **HTTP headers**

### 2. NVP (Name-Value Pair) {#2-nvp-name-value-pair}

* Uses only `POST`
* Data sent as **key-value pairs**
* Best for **simple setups** like form submissions
* Authentication included in the **request body**

### Core Mastercard Gateway API Components {#core-mastercard-gateway-api-components}

|                                                                                                  Operation                                                                                                  |                              Description                               |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Authentication](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Authentication:%20%20Authenticate%20Payer.html?locale=en_US)                         | Verifies the identity of the consumer                                  |
| [Session](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Session:%20Create%20Session.html?locale=en_US)                                              | Securely collects and stores payment details                           |
| [Transaction](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction:%20%20Authorize.html?locale=en_US)                                          | Processes payments (for example, Pay, Authorize, Capture, Refund)      |
| [Tokenization](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Tokenization:%20%20Create%20or%20Update%20Browser%20Payment%20Token.html?locale=en_US) | Replaces fund data with a reusable token                               |
| [Agreement](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Agreement:%20Retrieve%20Agreement.html?locale=en_US)                                      | Allows merchants to charge customers later without re-entering details |
| [Batch](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Batch:%20Close%20Batch.html?locale=en_US)                                                     | Submits multiple operations (like refunds) at once                     |
| [Hosted Checkout](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Hosted%20Checkout:%20Initiate%20Checkout.html?locale=en_US)                         | Redirects customers to a Mastercard-hosted payment page                |
| [Browser Payment](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Browser%20Payment:%20%20Confirm.html?locale=en_US)                                  | Supports PayPal, Click to Pay, and other browser-based methods         |
| [Payment Plan](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Payment%20Plan:%20%20Plan%20Offers%20Inquiry.html?locale=en_US)                        | Displays installment or financing options                              |
| [Wallet](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Wallet:%20Open%20Wallet.html?locale=en_US)                                                   | Lets customers store and manage payment details                        |
| [Gateway](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Gateway:%20%20Check%20Gateway.html?locale=en_US) Operations                                 | Provides system status and available payment options                   |

