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

# Test in the Sandbox Environment

Your Partner Ecosystem Management representative will send you:

* The sandbox environment URL and your login credentials.
* The Partner Ecosystem Management test collection.
* A configuration sheet to complete.

Your representative will also set up the following in your sandbox environment:

* A test product.
* An agreement with a mock Reseller (Service Provider).
* A partnership with a mock Reseller.

Before testing, ensure you have completed the following (as outlined in [Step 2: Technical Access and Setup](technicalAccessAndSetup)):

1. Generated your API key.
2. Set up webhooks if you're using the [Platform-managed product lifecycle](g_platformManagedFlow).

   **Note:** You can find the redemption URL for customer subscription activation in **Platform Settings** > **Activation**.

In this task, you’ll validate your integration by completing a set of test cases using Postman. These test cases simulate real-world scenarios for either the [Platform-managed](g_platformManagedFlow) or [Merchant-managed product lifecycle](g_partnerManagedFlow). You’ll document your results and submit them for verification. This ensures your setup is functioning correctly before going live.

1. Create a Postman account, and download and install the client.

2. Once Postman has finished downloading, sign in to Postman, and open the client.

3. Select the **Import** button and select the test collection.

   The test collection opens in Postman.

4. Complete authentication.

   1. In the **Collections** pane, select the menu (represented by three dots) on the same row as the collection and select **Edit**.

      The **Edit** tab or box appears.

   2. In the **Edit** tab, select the **Variables** tab.

   3. In the same row as **X-API-KEY\_OTT**, enter the API key you generated in the **Current Value** box.

5. Complete the relevant [test cases document](designAndDevelop) (Platform-managed or Merchant-managed, depending on your setup).

   1. To make a request: select the request from the side menu. The request page appears. If a filter is required, provide the required value for the filter. Select the **Send** button.

      The response body is returned.

   2. Enter the information in the relevant field(s) in the test cases document.

6. After you've filled out the test cases document, send it to your Partner Ecosystem Management representative.

7. Perform a [health check](healthCheckEndpointAbout) and [Reconciliation process](m_reconciliationAbout) if you're using the Platform-managed product lifecycle.

   After completing these steps, you will receive certification from Partner Ecosystem Management.

* **[Platform-Managed Test Case API Calls](testingSandbox#platform-managed-test-case-api-calls)**

* **[Merchant-Managed Test Case API Calls](testingSandbox#merchant-managed-test-case-api-calls)**

**Parent topic:**[Step 4: Integrate With the Mock Reseller (Service Provider) in the Sandbox (PDT)](integrationAndCertification)

## Platform-Managed Test Case API Calls

The API calls made during testing with a mock Reseller in a Platform-managed sandbox are as follows:

| API Call | Description |
| - | - |
| `POST /v1/entitlement` | This simulates the request the Reseller (Service Provider) will send to MarketONE when provisioning your specific Merchant product via the Entitlement API. The successful creation of an entitlement will trigger an `AddSubscription` webhook event to the callback you defined. This call is designed to be run multiple times, creating a unique subscription and customer account with each call. |
| `POST /partnersub/v2/partnerSubscription/reprovision` | This call is used by the Reseller (Service Provider) in the event that the original Partner subscription redemption code is expired. This call will trigger a new `AddSubscription` call with the same `PartnerSubscriptionID`. The existing Partner Subscription will be updated with the passed registration code. In scenarios where the Merchant generates the redemption URL, a new URL and code will be returned. |
| `POST /v1/entitlement/terminate` | The Reseller (Service Provider) uses this call to cancel an entitlement. This call will trigger a `DeleteSubscription` callback to the Merchant if the webhook was set up. |
| `POST /v1/entitlement/pause` | The Reseller (Service Provider) uses this call to pause an entitlement. This call will trigger a `PauseSubscription` callback to the Merchant if the webhook was set up. |
| `POST /v1/entitlement/resume` | The Reseller (Service Provider) uses this call to resume a suspended entitlement. This call will trigger a `ResumeSubscription` callback to the Merchant if the webhook was set up. |
| `POST /v1/entitlement/product/update` | This simulates the request the Reseller (Service Provider) will send to MarketONE when updating an existing entitlement with a new product. This will trigger an `UpdateSubscription` callback to the Merchant if the webhook was set up. |
| `GET /partnersub/v3/partnerSubscription?filter=&#123;subscriptionId&#125;` | This call has two uses:- The Reseller (Service Provider) can use this call to get details about the Partner Subscription. In this request, the Partner `subscriptionID` needs to be specified in the filter. You can use this call to see the details of the Partner Subscription you should have received from MarketONE's callbacks. The tests have been set up to assume this call will be made after the initial create call. - The Merchant can use this call to get details about the Partner Subscription. The `subscriptionID` must be specified in the filter. You can also use the filter to search on other parameters such as the `externalPartnerSubscriptionId`. **Note:** The API key you generated in the Partner Ecosystem Management UI (in **Platform Settings**) should be set as a variable. |
| `GET /v1/entitlement?filter=&#123;id&#125;` | The Reseller (Service Provider) can use this call to get details about the entitlement. In this request, the `PartnerSubscriptionID` or `subscriptionID` needs to be specified in the filter. |
| `PUT /partnersub/v3/partnerSubscription/` | The Merchant can use this call to update the details about the Partner Subscription. This call is normally made to update the status after the end user has activated the service. The request body is currently configured to update the Partner subscription status to ACTIVE. **Note:** The API key you generated in the Partner Ecosystem Management UI (in **Platform Settings**) should be set as a variable. |
| **Parent topic:**[Test in the Sandbox Environment](testingSandbox) | |

## Merchant-Managed Test Case API Calls

The API calls made during testing with a mock Reseller (Service Provider) in a Merchant-managed sandbox are as follows:

| API Call | Description |
| - | - |
| `POST /v2/partnerSubscription` | The Merchant can send this call to MarketONE to create a billing relationship, set up the Partner subscription relationship, and validate the account. |
| `GET /v3/partnerSubscription/&#123;partnerSubId&#125;` | The Merchant can use this call to get details about a Partner subscription. In this call, the `partnerSubscriptionID` needs to be specified. |
| `POST /v2/transaction` | The Merchant can use this call to post the charges of a subscription to MarketONE, which will relay the charge to the Reseller (Service Provider). This API is used for both one time charges and reoccurring charges. For reoccurring charges, Merchants are responsible for posting the charge at the beginning of each billing cycle. |
| `POST /v2/transaction` with error | The Merchant can use this call to post a transaction simulating a rejected transaction due to a server-error. |
| `POST /v2/transaction-error-suspended-non-payment` | The Merchant can use this call to post a transaction simulating a rejected transaction when the customer is suspended for non-payment. |
| `GET /v2/transaction/&#123;transactionId&#125;` | The Merchant can use this call to get details about a particular transaction. In this call, the `transactionID` needs to be specified. |
| `POST /v2/transaction/&#123;transactionId&#125;/refund` | The Merchant can use this call to post the refund of a subscription to MarketONE, which will relay the refund to the Reseller (Service Provider). The ID in the parameter is the original transaction ID of the `POST /transaction` call. |
| `GET /v2/transaction/&#123;transactionId&#125;/refund/&#123;refundId&#125;` | The Merchant can use this call to get the refund record using the `refundId` posted against a specific `transactionId`. |
| `POST v2/partnerSubscription/&#123;partnerSubId&#125;/cancel` | The Merchant can use this call to cancel an active billing Partner subscription relationship. The ID in the parameter is the original `partnerSubscriptionId`. |
| **Parent topic:**[Test in the Sandbox Environment](testingSandbox) | |


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