# API Basics
source: https://developer.mastercard.com/currency-conversion-calculator/documentation/api-basics/index.md

The Standard Currency Converter Calculator API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). Our API returns [JSON-encoded](https://www.json.org/json-en.html) responses and uses standard HTTP response codes, authentication, and verbs.

## Authentication {#authentication}

The Standard Currency Converter Calculator API requires all requests to be signed using [OAuth 1.0a](https://oauth.net/core/1.0a/).

### Overview {#overview}

* Mastercard uses [OAuth 1.0a](https://oauth.net/core/1.0a/) for authenticating client applications

* Requests with a body must be signed using the Google Request Body Hash extension for OAuth

* OAuth Keys for your project can be set up in your dashboard

* Client authentication libraries can be found on GitHub, with how-to information provided in README.md files

  For further details, see [Using OAuth 1.0a to Access Mastercard APIs](https://developer.mastercard.com/platform/documentation/security-and-authentication/using-oauth-1a-to-access-mastercard-apis/)

## API Host {#api-host}

The following are the Mastercard environments:

* Sandbox: Sandbox environment is where you access API stubs that return simulated, static responses.
* Production: Production environment is where you complete testing and launch your solution.

| Environment |                                     URL                                      |
|-------------|------------------------------------------------------------------------------|
| Sandbox     | <https://sandbox.api.mastercard.com/settlement/currencyrate/conversion-rate> |
| Production  | <https://api.mastercard.com/settlement/currencyrate/conversion-rate>         |

## API Keys {#api-keys}

* Mastercard authenticates API requests using your account's API keys. If you do not include your key when making an API request, or use one that is incorrect or outdated, Mastercard returns an error.
* Your API keys are available in your project dashboard on [Mastercard Developers](https://developer.mastercard.com).
* To renew your project keys, go to **My Project** **dashboard** , click **Actions** , and then click **Renew** . For more details, see [How To Renew Your Project Keys](https://developer.mastercard.com/platform/documentation/getting-started-with-mastercard-apis/renewing-your-keys/)

Warning: All keys created in the Mastercard Developer Portal account expire after one year and must be renewed, otherwise they will be revoked.

<br />

The following table outlines the key management activities. Once generated, most of these keys and their certificates are accessible from the API project dashboard, except for the private keys generated offline.

|    Category    |                                                                                                                                                                                               Description                                                                                                                                                                                               |
|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Sandbox Key    | Private keys used for API authentication with the Sandbox environments. Mastercard generates the initial set of keys when creating your project (download the Signing Key via browser). The project dashboard displays the Consumer Key. If you want to generate and use your own keys, you can discard the Mastercard-generated keys and renew them using your Certificate Signing Request (CSR) file. |
| Production Key | Private keys used for API authentication with the Production environment. Mastercard can generate this key set for you when you request Production access (download the Signing Key via browser). The project dashboard displays the Consumer Key.                                                                                                                                                      |

## Conventions {#conventions}

To ensure best experience when integrating with Standard Currency Converter API, familiarize yourself with the following conventions:

|                                                                           Category                                                                            |                     Description                      |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|
| [Parameters](https://developer.mastercard.com/currency-conversion-calculator/documentation/parameters/index.md)                                               | A glossary that explains input and output responses. |
| [HTTP Response codes](https://developer.mastercard.com/currency-conversion-calculator/documentation/code-and-formats/index.md#http-response-and-reason-codes) | Detailed descriptions on HTTP codes and messages.    |
| [ISO Currency Codes](https://developer.mastercard.com/currency-conversion-calculator/documentation/code-and-formats/index.md#iso-currency-codes)              | List of currencies available via the API.            |

