> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vindicia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retain REST API Access and Authentication

Retain provides two distinct environments for testing and production:

* **Staging Environment**: The Staging environment serves as your sandbox and allows you to test your application against the code currently running in Production without affecting your live data ([https://api.staging.us-west.vindicia.coml](https://api.staging.us-west.vindicia.coml/))
* **Production Environment**: The Production environment is for real-world use for actual billing and subscription activity ([https://api.vindicia.com](https://api.vindicia.com/)).

**Note:** The examples in this API reference use the Production URL. Replace with the Staging URL, when needed.

**Authentication** to the API is performed via HTTP Basic Auth using your environment specific API user and key as the username and password. You receive your API credentials from your Vindicia Client Technical Support representative as part of the merchant onboarding process.

**Note:** The Retain REST API credentials are not the same credentials used for Retain Portal access.

We use built-in HTTP features, like HTTP authentication and HTTP verbs. All API requests must be made over HTTPS. Calls made over plain HTTP, and API requests made without authentication, will fail.

**cURL API Key Usage Example**

```
 curl 'https://api.vindicia.com/retain/transactions'
        -u acaff38d462f9430d5cbcbaf:a575771fc679b9de
```

**Javascript API Key Usage Example**

```
 const retain_api_key='acaff38d462f9430d5cbcbaf:a575771fc679b9de';
```

* **[Test Access in Staging Environment](../topics/retainApiAccess#)**

## Test Access in Staging Environment

To test your staging (sandbox) environment, you can download the [OpenAPI Yaml](/portal/apis/retain-api) in this guide to a third-party app such as Postman, or curl. Using basic auth and your API credentials, make calls and receive responses. During your deployment, test your application’s payment processing in a simulated environment to ensure that your transactions behave as expected. For more information, see [Test Data for Payment Providers](https://docs.vindicia.com/bundle/b_howTo/page/topics/r_subscribeTestDataPaymentProcessors.html).

**Parent topic:**[Retain REST API Access and Authentication](../topics/retainApiAccess#)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.