# API Reference
source: https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/index.md

## Mastercard Gateway API Reference Documentation {#mastercard-gateway-api-reference-documentation}

The Mastercard Gateway provides a number of [APIs](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/index.md) and [JavaScript libraries](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/js-libraries/index.md) that allow you to connect to the gateway and manage payments using the different [integration methods](https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/choosing-int-method/index.md).

You can learn to use the APIs by understanding the following basics:

* To understand how to send a request and handle a response, see [Making a Server API Request](https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/make-server-api-req/index.md).
* To authenticate yourself so that the gateway accepts your incoming requests, you have to implement one of two available authentication solutions. For more information, see [Authentication Options](https://developer.mastercard.com/mastercard-gateway/documentation/concepts/authentication-options/index.md).
* To understand how the gateway handles a situation where multiple payment sources are provided for a single transaction, see [Using Multiple Payment Sources](https://developer.mastercard.com/mastercard-gateway/documentation/tutorials-and-guides/guides/multiple-payment-sources/index.md).
* To identify the source of the problem and take appropriate remedial actions when receiving an error response, see [API Error Handling](https://developer.mastercard.com/mastercard-gateway/documentation/testing/api-error-handling/index.md).

### When to use this reference {#when-to-use-this-reference}

Use the API Reference when you need:

* Endpoint details
* Request and response fields
* Error handling behavior

For conceptual orientation, start with:

* [Getting Started](https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/index.md)
* [API basics](https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/api-basics/index.md)

### API Reference formats {#api-reference-formats}

The Mastercard Gateway API is available in two formats. Choose the one that fits your integration model:

* **REST (JSON)** for modern server and web app integrations. See [Mastercard Gateway API Reference Documentation - REST](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/index.md).
* **NVP (Name-Value Pair)** for batch processing and simpler key-value integrations. See [Mastercard Gateway API Reference Documentation - NVP](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/nvp/index.md).

### Versions {#versions}

Integrate with **version 100** for full compatibility.

## Ready to redefine your payment experience? {#ready-to-redefine-your-payment-experience}

Join Gateway today and unlock a world where getting paid is not a hurdle but a seamless, simple process.

##### Gateway API Reference Documentation - REST {#gateway-api-reference-documentation---rest}

View Documentation

##### Gateway API Reference Documentation - NVP {#gateway-api-reference-documentation---nvp}

View Documentation

## FAQs {#faqs}

This section contains suggestions and solutions to the problems that may occur with your API Reference.
Yes, it's safe to resubmit a request with the exact same details because the gateway supports idempotent operations. Idempotent operations produce the same result when invoked repeatedly. If the gateway has already received your request, it will return the original response; otherwise, it will process the request and return the response. Typically, you can match up requests to responses using order.id and transaction.id fields as these are provided in the requests and returned in the responses. However, if your application does not support a synchronous integration model or your source and target for a request differ, you can use the field correlationId to identify the request and its matching response. correlationId is a transient identifier, the value for which does not persist in the gateway and is returned as provided in the response to the request. You can use the correlationId with all API requests.
