---
title: Get the consent status
slug: payment/get-the-consent-status
docTags: 
createdAt: 2025-08-28T09:26:09.278Z
---

:::ApiMethodV2
```json
{
  "name": "/consent/{id}/status",
  "method": "GET",
  "url": "https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}/status",
  "description": "Get the consent status",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "-urLGQZ_Ok8zdpo-gg8eA",
        "language": "curl",
        "code": "curl --location --globoff 'https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}/status' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "a2FVqefX1bacIpUcA6lQj",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}/status',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "CgSDkchlXV0ORNHXg9ufG",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}/status\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "Sn5sp1-vOjtJ94J-VikV8",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}/status\"\n\npayload = {}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "emySays2Vhx8ul1QRfh_O",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}/status\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "-urLGQZ_Ok8zdpo-gg8eA"
  },
  "results": {
    "languages": [
      {
        "id": "7vCIbyv977AURqGRYWxQ_",
        "language": "200",
        "code": "{\n    \"id\": \"cfa45795-fe16-48e2-a372-130e30a72606\", \n    \"clientRequestId\": \"1a3s2aebe29s2\", \n    \"status\": \"CONSENT_AUTHORIED\", \n    \"statusReason\": {\n        \"code\": \"NAO_INFORMADO\", \n        \"message\": \"Erro não informado na iniciadora ou detentora de conta.\" // Required\n    }, \n    \"statusUpdateAt\": \"2022-09-23T03:39:43.737Z\" \n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "7vCIbyv977AURqGRYWxQ_"
  },
  "request": {
    "pathParameters": [
      {
        "name": "id",
        "kind": "required",
        "type": "string",
        "description": "pattern: ^urn:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,31}:[a-zA-Z0-9()+,\\-.:=@;$_!*'%\\/?#]+$\nmaxLength: 256\nConsent ID",
        "": "pattern: ^urn:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,31}:[a-zA-Z0-9()+,\\-.:=@;$_!*'%\\/?#]+$\nmaxLength: 256\nConsent ID"
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "JWT bearer token",
        "": "JWT bearer token"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "id",
      "kind": "optional",
      "type": "string",
      "description": "pattern: ^urn:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,31}:[a-zA-Z0-9()+,\\-.:=@;$_!*'%\\/?#]+$\nmaxLength: 256\nConsent Id"
    },
    {
      "name": "clientRequestId",
      "kind": "optional",
      "type": "string",
      "description": "Your internal orderId. Only can be used for once. \nyou can use it to associate a payment and you can use UUID generation algorithm to generate it",
      "children": []
    },
    {
      "name": "status",
      "kind": "optional",
      "type": "string",
      "description": "example: CONSENT_AWAITING_AUTHORIZATION\nCurrent status of recurring consent according to the state machine\nEnum:\n  [ STARTED,EXPIRED,CONSENT_AWAITING_AUTHORIZATION, CONSENT_AUTHORIZED, CONSENT_REJECTED, CONSENT_PARTIALLY_ACCEPTED, CONSENT_REVOKED, CONSENT_PERIOD_EXPIRED, CANCELED, ERROR ]",
      "children": []
    },
    {
      "name": "statusReason",
      "kind": "optional",
      "type": "object",
      "description": "Status reson object",
      "children": [
        {
          "name": "code",
          "kind": "optional",
          "type": "string",
          "description": "example: CONSENT_AWAITING_AUTHORIZATION\nEnum:\n[NOT_INFORMED,INFRASTRUCTURE_FAILURE,AUTHORIZATION_EXPIRED_TIME, USER_REJECTED, ORIGIN_DESTINATION_ACCOUNTS_EQUAL, ACCOUNT_DOES_NOT_ALLOW_PAYMENT, DIVERGENT_AUTHENTICATION, NOT_INFORMED, REVOKED_USER, REVOKED_MERCHANT ]"
        },
        {
          "name": "message",
          "kind": "optional",
          "type": "string",
          "description": "pattern: [wWs]*\nLength: 2048\nexample: User refused consent\nStatus message"
        }
      ]
    },
    {
      "name": "statusUpdateAt",
      "kind": "optional",
      "type": "string",
      "description": "example: 2021-05-21T08:30:00Z\npattern: ^(\\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\\d|2[0123]):(?:[012345]\\d):(?:[012345]\\d)Z$\nmaxLength: 20\nStatus update time",
      "children": []
    }
  ],
  "autoGeneratedAnchorSlug": "consentidstatus",
  "legacyHash": "gBeYacQpUIFaK3SE8DzWk"
}
```
:::



