# Invoking an API using Insomnia
source: https://developer.mastercard.com/account-to-account-commerce-for-dsp/tutorial/insomnia/step-5/index.md

## Invoking an API {#invoking-an-api}

Make sure the Environment A2A_ACCREDITATION_TEST_ENVIRONMENT_Sandbox is chosen before executing the APIs.
We are going to showcase executing 2 APIs - Agreement Linking and Linked Payment with Step up. Participants are required to test all mandatory APIs.

### Run Test Cases for DSP Link Account {#run-test-cases-for-dsp-link-account}

1. Open the folder named **TC-3_DSP_Link Account**.

2. Create agreement using Insomnia and copy the agreementId from the response.
   ![agreementid](https://static.developer.mastercard.com/content/account-to-account-commerce-for-dsp/uploads/insomnia-slides/agreementid1.png)

3. Use the agreementId obtained in Step 2 and Execute Retrieve and Update Agreement from your backend to complete the Link agreement journey.

### Run Test Cases for DSP Link Account {#run-test-cases-for-dsp-link-account-1}

1. Open the folder named **TC-4B_DSP_Pay with Linked Account with Step up advice**.

2. Click on **CREATE_AGREEMENT** and click "Send". Copy the agreementId from the response.
   ![agreementid](https://static.developer.mastercard.com/content/account-to-account-commerce-for-dsp/uploads/insomnia-slides/agreementid1.png)

3. Use the agreementId obtained in Step 2 and Execute Retrieve and Update Agreement from your backend to complete the Link agreement journey.

4. Click on **CREATEPAYMENT_REQUEST** and then click "Send". Copy the paymentRequestLifecycleId from the response.
   ![runthetestcase2](https://static.developer.mastercard.com/content/account-to-account-commerce-for-dsp/uploads/insomnia-slides/dsp4bcreatepaymentrequest.png)

5. DSP might have received the Linked Payment outbound request from A2AC.

6. DSP should call Step up Advice API from their backend.

7. DSP should call Confirm Payment from their backend.

