# For Providers source: https://developer.mastercard.com/straight-through-processing/documentation/testing/case-2/index.md ## Retrieve a list of providers {#retrieve-a-list-of-providers} This test case describes retrieving a list of payment providers registered with STP. ### Test case -- Success {#test-case--success} **Sample request** `GET /providers` Base URL: `https://sandbox.api.mastercard.com/stp-api/v1/providers` **Sample response** `200` ```JSON { "_embedded": { "providers": [ { "name": "TNS", "customFields": [ { "key": "tns.merchant.id", "name": "Merchant ID", "dataType": "ALPHANUMERIC-25", "mandatory": true } ], "_links": { "collection": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers" }, "self": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers/4" } } }, { "name": "MPGS-EU", "customFields": [ { "key": "mpgs-eu.merchant.id", "name": "Merchant ID", "dataType": "ALPHANUMERIC-25", "mandatory": true } ], "_links": { "collection": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers" }, "self": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers/436" } } }, { "name": "MPGS-AP", "customFields": [ { "key": "mpgs-ap.merchant.id", "name": "Merchant ID", "dataType": "ALPHANUMERIC-25", "mandatory": true } ], "_links": { "collection": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers" }, "self": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers/438" } } }, { "name": "MPGS-IN", "customFields": [ { "key": "mpgs-in.merchant.id", "name": "Merchant ID", "dataType": "ALPHANUMERIC-25", "mandatory": true } ], "_links": { "collection": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers" }, "self": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers/440" } } } ] }, "_links": { "self": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers" } } } ``` ## Retrieve details of a provider {#retrieve-details-of-a-provider} These test cases describe retrieving information about a particular payment provider registered with STP. ### Test case -- Success {#test-case--success-1} **Sample request** `GET /providers/{id}` Base URL: `https://sandbox.api.mastercard.com/stp-api/v1/providers/1` **Sample response** `200` ```JSON { "name": "TNS", "customFields": [ { "key": "tns.merchant.id", "name": "Merchant ID", "dataType": "ALPHANUMERIC-25", "mandatory": true } ], "_links": { "collection": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers" }, "self": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers/1" } } } ``` ### Test case -- Fail - No provider with this ID {#test-case--fail---no-provider-with-this-id} **Sample request** `GET /providers/{id}` Base URL: `https://sandbox.api.mastercard.com/stp-api/v1/providers/10` **Sample response** `404` ```JSON { "logref": "0.b658d617.1695297013.1929359", "message": "No provider was found with ID '10'", "_links": { "about": { "href": "https://stage.api.mastercard.com/stp-api/v1/providers/10" } } } ```