---
title: Retrieve a payment instruction
slug: docs/demo/retrieve-a-payment-instruction
description: Learn how to use the curl command to make a GET request to a specific endpoint and handle JSON data effortlessly with this code example. Includes the necessary headers for smooth data transmission. Perfect for developers seeking a quick and effective solu
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "qci19vDxEQVCyq69xOXVj",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference}",
    "name": "Retrieve a payment instruction",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": "The account reference that the payment instruction is related to"
        },
        {
          "kind": "required",
          "name": "paymentInstructionReference",
          "type": "string",
          "description": "The payment instruction reference"
        }
      ],
      "queryParameters": [],
      "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": "paymentInstructionReference",
                "type": "string",
                "example": "",
                "description": "The payment instruction reference"
              },
              {
                "kind": "optional",
                "name": "status",
                "type": "string<Pending | Active | Completed | Cancelled>",
                "example": "",
                "description": "The payment instruction status"
              },
              {
                "kind": "optional",
                "name": "currency",
                "type": "string",
                "example": "",
                "description": "The currency of the payments associated with the PaymentInstruction"
              },
              {
                "kind": "optional",
                "name": "description",
                "type": "string",
                "example": "",
                "description": "The description of the payment instruction"
              },
              {
                "kind": "optional",
                "name": "cartReference",
                "type": "string",
                "example": "",
                "description": "The associated cart reference for this payment instruction"
              },
              {
                "kind": "optional",
                "name": "fulfilmentPaymentMappings",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "fulfilments",
                    "type": "array",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "cartReference",
                        "type": "string",
                        "example": "",
                        "description": "The Fulfilment reference"
                      },
                      {
                        "kind": "optional",
                        "name": "fulfilmentReference",
                        "type": "string",
                        "example": "",
                        "description": "The Fulfilment reference"
                      },
                      {
                        "kind": "optional",
                        "name": "fulfilmentStatus",
                        "type": "string<Pending | Processing | Completed | Dispatched | Cancelled>",
                        "example": "",
                        "description": "The fulfilment Status"
                      },
                      {
                        "kind": "optional",
                        "name": "fulfilmentType",
                        "type": "string<Physical | Digital>",
                        "example": "",
                        "description": "The Fulfilment Type"
                      },
                      {
                        "kind": "optional",
                        "name": "expectedDeliveryDate",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:22.3073453",
                        "description": "The Expected delivery date"
                      },
                      {
                        "kind": "optional",
                        "name": "supplierNotificationDate",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:22.3073453",
                        "description": "The Supplier Notification date"
                      },
                      {
                        "kind": "optional",
                        "name": "addressReference",
                        "type": "string",
                        "example": "",
                        "description": "The associated address id of the fulfilment"
                      },
                      {
                        "kind": "optional",
                        "name": "dateCreated",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:22.3073453",
                        "description": "The Fulfilment date created"
                      },
                      {
                        "kind": "optional",
                        "name": "dateLastUpdated",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:22.3073453",
                        "description": "The Fulfilment last updated"
                      },
                      {
                        "kind": "optional",
                        "name": "customFulfilmentParameters",
                        "type": "object",
                        "schema": [],
                        "example": {},
                        "description": "A key-value store to hold custom params for the fulfilment"
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.Fulfilment",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.Fulfilment[]",
                    "description": "The list of fulfilments"
                  },
                  {
                    "kind": "optional",
                    "name": "payments",
                    "type": "array",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "cartReference",
                        "type": "string",
                        "example": "",
                        "description": "The cart reference"
                      },
                      {
                        "kind": "optional",
                        "name": "paymentReference",
                        "type": "string",
                        "example": "",
                        "description": "The payment reference"
                      },
                      {
                        "kind": "optional",
                        "name": "paymentDate",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:22.432364",
                        "description": "The Payment Date"
                      },
                      {
                        "kind": "optional",
                        "name": "paymentStatus",
                        "type": "string<None | Pending | Processed | Created | New | Confirmed | Dispatched | Cancelled | Notified | Reminder | Completed | Refunded | Waiting | Downloaded | SuspectedDuplicate | MaxRefunded | PartialRefunded | NeedToOrder | ProductsOrdered | Authorised | Unpaid>",
                        "example": "",
                        "description": "The payment status - represents a PendingOrder status or OrderStatus\r\n            depending on PaymentSource"
                      },
                      {
                        "kind": "optional",
                        "name": "dateCreated",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:22.432364",
                        "description": "The date the payment was created"
                      },
                      {
                        "kind": "optional",
                        "name": "dateLastUpdated",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:22.432364",
                        "description": "The date the payment was updated"
                      },
                      {
                        "kind": "optional",
                        "name": "vatAmount",
                        "type": "number<double>",
                        "example": "",
                        "description": "The VAT Amount"
                      },
                      {
                        "kind": "optional",
                        "name": "grossAmount",
                        "type": "number<double>",
                        "example": "",
                        "description": "The Gross Amount"
                      },
                      {
                        "kind": "optional",
                        "name": "netAmount",
                        "type": "number<double>",
                        "example": "",
                        "description": "The Net Amount"
                      },
                      {
                        "kind": "optional",
                        "name": "customPaymentParameters",
                        "type": "object",
                        "schema": [],
                        "example": {},
                        "description": "Custom payment parameters of the payment"
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.Payment",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.Payment[]",
                    "description": "The list of payments"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.FulfilmentPaymentMapping",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.FulfilmentPaymentMapping[]",
                "description": "A list of fulfilment-payment mappings"
              },
              {
                "kind": "optional",
                "name": "customPaymentInstructionParameters",
                "type": "object",
                "schema": [],
                "example": {},
                "description": "CustomPaymentInstructionParameters"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstruction",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstruction",
            "isExpanded": true,
            "description": "Represents v1 DTO for the payment instruction"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "Payment instruction retrieved successfully",
        "jsonExample": "{\n  \"paymentInstructionReference\": \"0010J3O92YZYM43OP0\",\n  \"status\": \"Active\",\n  \"currency\": \"GBP\",\n  \"fulfilmentPaymentMappings\": [\n    {\n      \"fulfilments\": [\n        {\n          \"cartReference\": \"0010KCKSYU72H5M3X0\",\n          \"fulfilmentReference\": \"0010L00WASCMKX7UO3\",\n          \"fulfilmentStatus\": \"Pending\",\n          \"fulfilmentType\": \"Digital\",\n          \"expectedDeliveryDate\": \"2017-03-30T00:00:00\",\n          \"supplierNotificationDate\": \"2017-03-27T00:00:00\",\n          \"addressReference\": \"0010DF5QFO4XK5H0L0\",\n          \"dateCreated\": \"2017-03-20T00:00:00\",\n          \"dateLastUpdated\": \"2017-03-20T00:00:00\",\n          \"customFulfilmentParameters\": {\n            \"Custom Fulfilment Param Name 1\": \"Custom Fulfilment Param Value 1\",\n            \"Custom Fulfilment Param Name 2\": \"Custom Fulfilment Param Value 2\",\n            \"Custom Fulfilment Param Name 3\": \"Custom Fulfilment Param Value 3\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"cartReference\": \"0010KCKSYU72H5M3X0\",\n          \"paymentReference\": \"0010H00WASCMKX7UO3\",\n          \"paymentDate\": \"2017-03-23T00:00:00\",\n          \"paymentStatus\": \"Pending\",\n          \"dateCreated\": \"2017-03-20T00:00:00\",\n          \"dateLastUpdated\": \"2017-03-20T00:00:00\",\n          \"vatAmount\": 20,\n          \"grossAmount\": 120,\n          \"netAmount\": 100,\n          \"customPaymentParameters\": {\n            \"Custom Payment Param Name 1\": \"Custom Payment Param Value 1\",\n            \"Custom Payment Param Name 2\": \"Custom Payment Param Value 2\",\n            \"Custom Payment Param Name 3\": \"Custom Payment Param Value 3\"\n          }\n        },\n        {\n          \"cartReference\": \"0010KCKSYU72H5M3X1\",\n          \"paymentReference\": \"0010O00WASCMKX7UO3\",\n          \"paymentDate\": \"2017-03-23T00:00:00\",\n          \"paymentStatus\": \"Completed\",\n          \"dateCreated\": \"2017-03-20T00:00:00\",\n          \"dateLastUpdated\": \"2017-03-20T00:00:00\",\n          \"vatAmount\": 20,\n          \"grossAmount\": 120,\n          \"netAmount\": 100,\n          \"customPaymentParameters\": {\n            \"Custom Payment Param Name 1\": \"Custom Payment Param Value 1\",\n            \"Custom Payment Param Name 2\": \"Custom Payment Param Value 2\"\n          }\n        }\n      ]\n    }\n  ],\n  \"customPaymentInstructionParameters\": {\n    \"name\": \"value\"\n  }\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "One or more reference resources invalid",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "One more reference resources not found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal error processing this request.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to retrieve a payment instruction for a given account",
    "examples": {
      "languages": [
        {
          "id": "5o9B8s62aashMzWXWxtoq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "-xFt-bk1gKyOAK3_FcTAq",
          "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/accounts/{accountReference}/payment-instructions/{paymentInstructionReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "mgs2Or1C-5hPOXS5rbLRv",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference}\")\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": "3a6Kj5tYrw5nkrdt17m1l",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/{paymentInstructionReference}\"\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": "5o9B8s62aashMzWXWxtoq"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"paymentInstructionReference\": \"0010J3O92YZYM43OP0\",\n  \"status\": \"Active\",\n  \"currency\": \"GBP\",\n  \"fulfilmentPaymentMappings\": [\n    {\n      \"fulfilments\": [\n        {\n          \"cartReference\": \"0010KCKSYU72H5M3X0\",\n          \"fulfilmentReference\": \"0010L00WASCMKX7UO3\",\n          \"fulfilmentStatus\": \"Pending\",\n          \"fulfilmentType\": \"Digital\",\n          \"expectedDeliveryDate\": \"2017-03-30T00:00:00\",\n          \"supplierNotificationDate\": \"2017-03-27T00:00:00\",\n          \"addressReference\": \"0010DF5QFO4XK5H0L0\",\n          \"dateCreated\": \"2017-03-20T00:00:00\",\n          \"dateLastUpdated\": \"2017-03-20T00:00:00\",\n          \"customFulfilmentParameters\": {\n            \"Custom Fulfilment Param Name 1\": \"Custom Fulfilment Param Value 1\",\n            \"Custom Fulfilment Param Name 2\": \"Custom Fulfilment Param Value 2\",\n            \"Custom Fulfilment Param Name 3\": \"Custom Fulfilment Param Value 3\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"cartReference\": \"0010KCKSYU72H5M3X0\",\n          \"paymentReference\": \"0010H00WASCMKX7UO3\",\n          \"paymentDate\": \"2017-03-23T00:00:00\",\n          \"paymentStatus\": \"Pending\",\n          \"dateCreated\": \"2017-03-20T00:00:00\",\n          \"dateLastUpdated\": \"2017-03-20T00:00:00\",\n          \"vatAmount\": 20,\n          \"grossAmount\": 120,\n          \"netAmount\": 100,\n          \"customPaymentParameters\": {\n            \"Custom Payment Param Name 1\": \"Custom Payment Param Value 1\",\n            \"Custom Payment Param Name 2\": \"Custom Payment Param Value 2\",\n            \"Custom Payment Param Name 3\": \"Custom Payment Param Value 3\"\n          }\n        },\n        {\n          \"cartReference\": \"0010KCKSYU72H5M3X1\",\n          \"paymentReference\": \"0010O00WASCMKX7UO3\",\n          \"paymentDate\": \"2017-03-23T00:00:00\",\n          \"paymentStatus\": \"Completed\",\n          \"dateCreated\": \"2017-03-20T00:00:00\",\n          \"dateLastUpdated\": \"2017-03-20T00:00:00\",\n          \"vatAmount\": 20,\n          \"grossAmount\": 120,\n          \"netAmount\": 100,\n          \"customPaymentParameters\": {\n            \"Custom Payment Param Name 1\": \"Custom Payment Param Value 1\",\n            \"Custom Payment Param Name 2\": \"Custom Payment Param Value 2\"\n          }\n        }\n      ]\n    }\n  ],\n  \"customPaymentInstructionParameters\": {\n    \"name\": \"value\"\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// One or more reference resources invalid\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// One more reference resources not found\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal error processing this request.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}