# Call Mastercard Open Finance APIs Using Official Mastercard Postman Collections
source: https://developer.mastercard.com/ob-accept-payments/documentation/tutorials-and-guides/call-postman-collection-tutorial/index.md

This guide provides instructions on how to:

* Set up the Postman Environment for Mastercard Open Finance APIs.
* Invoke a Mastercard Open Finance API from Postman.

Postman is an API platform for building and using APIs. It can be used to write functional tests, integration tests, regression tests, and more. This tutorial will show you how to use Postman collections hosted in the Mastercard workspace on Postman

## Prerequisites {#prerequisites}

* Sign up for a new account or Log in to your existing postman account.
* You have received your sandbox credentials from you onboarding representative at Mastercard Open Finance.

## Step 1 - Set Up the Postman Collection {#step-1---set-up-the-postman-collection}

Setting up a Postman collection for Mastercard Open Finance APIs can be done in two different ways.

1. Forking one of the collections hosted in the official Mastercard Open Finance Postman workspace.
2. Importing one of the Mastercard Open Finance API specifications into your local workspace.

You can choose either of the two methods detailed here.

### Forking Mastercard's Collections {#forking-mastercards-collections}

Forking Mastercard's Collections Instructions:

* Navigate to the Postman Collection page in the documentation section of the Mastercard Open Finance API you are interested in.
* Click **Run in Postman**. It will take you to the API in the Mastercard Postman workspace.

![postman-collection-page](https://static.developer.mastercard.com/content/ob-accept-payments/uploads/postman_collection_page.png)

* Click on **...** adjacent to the API's collection and select **Create a Fork**.
* Add a label to your fork and the workspace in which you want to create the fork.
* Click **Fork Collection**.

This will fork the Mastercard API to your personal Postman workspace.

### Importing an API Specification {#importing-an-api-specification}

Importing an API specification instructions:

* Download the Open API specification (.YAML) file. Here we are using the spec for Mastercard Open Finance Accept Payments from [Mastercard Developers](https://developer.mastercard.com/).

In your Postman application, select **Import**.

![import-page](https://static.developer.mastercard.com/content/ob-accept-payments/uploads/import.png)

From **File** , click on the **Upload Files** option.

![uploda-files](https://static.developer.mastercard.com/content/ob-accept-payments/uploads/upload_files.png)

Import your .YAML file. Postman automatically creates a collection from this file.

![import-yaml](https://static.developer.mastercard.com/content/ob-accept-payments/uploads/import_yaml.png)

## Step 2 - Configure the Postman Environment {#step-2---configure-the-postman-environment}

Once the collection has been imported into your Postman workspace, you will need to set up the Postman Environment.

* Go to the Environments tab of the Mastercard Developer Postman workspace. ![configuring-postman](https://static.developer.mastercard.com/content/ob-accept-payments/uploads/config-postman.png)
* Click on **...** adjacent to the API's environment and select **Create a Fork**.
* Add a label to your fork and the workspace in which you want to create the fork. Click **Fork Environment**.
* This will fork the *Mastercard API Sandbox Environment* to your personal Postman workspace.
* You can then input your own credentials including your `tenantId`, `privateKey` and your `destinationId`.

## Step 3 - Invoke a Mastercard Open Finance API from Postman {#step-3---invoke-a-mastercard-open-finance-api-from-postman}

### Authenticate With the Service {#authenticate-with-the-service}

Before calling of the Accept Payment APIs you need to authenticate with the service. You can do this after you have configured your credentials in the Postman Environment.

Once you have your credentials set in the environment, you can go to the collection and select the Auth Service and then select the New Token endpoint. You can click **Send** and you should receive your *accessToken* back in the response. The Collection is set up so that the *accessToken* will automatically apply to all of the endpoints so you are now ready to move on and start calling the Accept Payment endpoints.

![access-token](https://static.developer.mastercard.com/content/ob-accept-payments/uploads/access_token.png)

### Invoking Accept Payment Endpoints {#invoking-accept-payment-endpoints}

Once you have Authenticated and received your *accessToken* you are ready to start invoking the Accept Payment endpoints.

To do this, just choose any of the requests and click Send. You should get a successful response.

![invoke-endpoint](https://static.developer.mastercard.com/content/ob-accept-payments/uploads/invoke_endpoint.png)

Congratulations! You have completed this tutorial and have successfully made a call to the Mastercard Open Finance Accept Payments API using Postman.
