---
title: /api/payment-details/cards
slug: docs/demo/apipayment-detailscards
description: Learn how to make a GET request to a fictive API endpoint using cURL in this code example. Includes headers for easily accepting and displaying the response in JSON format. Improve your API development skills now!
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "OtvwlomIc5SCMpviGXIP1",
  "data": {
    "url": "https://api.fictive.com/REST/api/payment-details/cards",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "BIN",
          "type": "string"
        }
      ],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "bin",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "cardScheme",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "cardType",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "cardSubType",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "bank",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "country",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.DataAccessLayer.BusinessCodeSupport.DomainEntities.BankDetails",
            "customType": "FictiveGlobal.DataAccessLayer.BusinessCodeSupport.DomainEntities.BankDetails",
            "isExpanded": true
          }
        ],
        "isExpanded": true,
        "statusCode": "201",
        "description": "Created",
        "jsonExample": "{\n  \"cardScheme\": \"Visa\",\n  \"cardType\": \"Debit\",\n  \"cardSubType\": \"Business\",\n  \"bank\": \"Royal Bank of Scotland\",\n  \"country\": \"UK\"\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "Unable to authenticate using the provided session",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "BIN not found.\r\n            <br />• Bank details can't be recovered with the BIN provided.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "examples": {
      "languages": [
        {
          "id": "j1MbPnuDKsR-ufO40QHxw",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.fictive.com/REST/api/payment-details/cards?BIN=string' \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "ywNmWgnXmqAz_YBUzbfq9",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/payment-details/cards?BIN=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ypKws4guFxbdOw7IYwBgA",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/payment-details/cards?BIN=string\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "cj3-YD0I7b5bYfL5XHYEA",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/payment-details/cards?BIN=string\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "j1MbPnuDKsR-ufO40QHxw"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "{\n  \"cardScheme\": \"Visa\",\n  \"cardType\": \"Debit\",\n  \"cardSubType\": \"Business\",\n  \"bank\": \"Royal Bank of Scotland\",\n  \"country\": \"UK\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Unable to authenticate using the provided session\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// BIN not found.\r\n            • Bank details can't be recovered with the BIN provided.\n"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}