---
title: Get the consent resource
slug: payment/get-the-consent-resource
docTags: 
createdAt: 2025-08-28T09:25:25.788Z
---

:::ApiMethodV2
```json
{
  "name": "/consent/{id}",
  "method": "GET",
  "url": "https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}",
  "description": "Get the consent resource",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "ORRtuDRWTtQL-v7rao5oi",
        "language": "curl",
        "code": "curl --location --globoff 'https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "kM2xIfBXkOJcwdwtxsmK7",
        "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}',\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": "AFNTCMpH9JZea2wmuPQEb",
        "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}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "5HTzUuRmJGe6x1fGd6loU",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}\"\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": "oah2LY5UXKFXef7PPAcq7",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{id}\")\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": "ORRtuDRWTtQL-v7rao5oi"
  },
  "results": {
    "languages": [
      {
        "id": "3g6wrkSrGlqr0C_cySqo0",
        "language": "200",
        "code": "{\n    \"id\": \"fcb72e3a-b346-4f71-b044-971dc23232c9\", \n    \"appId\": \"0b59d801-08e0-4e84-9ecd-569f34e32279\", \n    \"clientRequestId\": \"fcb72e3a-b346-4f71-b044-dsndsnmnkdsmk\", \n    \"institutionId\": \"c8f0bf49-4744-4933-8960-7add6e590841\", \n    \"customer\":\n    {\n        \"identifierType\": \"CPF\", \n        \"identifier\": \"76109277673\", \n        \"name\": \"João Silva\", \n        \"phone\": \"12345\",\n        \"email\": \"123@123.com\" \n    },\n    \"loggedUserCpf\": \"76109277673\", \n    \"redirectURL\": \"//close\", \n    \"additionalInformation\": \"Any description\",\n    \"debtorAccount\":\n    {\n        \"ispb\": \"00000000\", \n        \"issuer\": \"0001\", \n        \"number\": \"324223\", \n        \"accountType\": \"CACC\" \n    }, \n    \"creditorAccount\":\n    {\n        \"ispb\": \"00000000\", \n        \"issuer\": \"0001\", \n        \"number\": \"324223\", \n        \"accountType\": \"CACC\", \n        \"holder\":\n        {\n            \"identifier\": \"76109277673\", \n            \"name\": \"John Doe\", \n            \"identifierType\": \"CPF\" \n        } \n    }, \n    \"paymentMethod\": \"AUTOMATIC_PIX\", \n    \"paymentMethodConfig\": {\n        \"contractId\": \"PREMIUMPLAN123456\", \n        \"fixedAmount\": \"10000.05\", \n        \"minimumVariableAmount\": \"100.01\", \n        \"maximumVariableAmount\": \"100.01\", \n        \"currency\": \"BRL\", \n        \"interval\": \"MONTHLY\", \n        \"referenceStartDate\": \"2025-06-01\",\n        \"contractDebtor\": {\n            \"identifierType\": \"CPF\", \n            \"identifier\": \"76109277673\", \n            \"name\": \"João da Silva\" \n        },\n        \"isRetryAccepted\": true, \n        \"useOverdraftLimit\": true, \n        \"firstPayment\": {\n            \"id\": \"fcb72e3a-b346-4f71-b044-dsndsnmnkdsmk\", \n            \"clientRequestId\": \"fcb72e3a-b346-4f71-b044-dsndsnmnkdsmk\", \n            \"remittanceInformation\": \"description\", \n            \"date\": \"2025-05-15\", \n            \"amount\": \"3000.02\", \n            \"currency\": \"BRL\" \n        } \n    },\n    \"externalInfo\":\n    {\n        \"key\": \"value\"\n    }, \n    \"expirationDateTime\": \"2023-01-23T23:59:59\", \n    \"status\": \"CANCELED\", \n    \"statusReason\": {\n        \"code\": \"NAO_INFORMADO\", \n        \"message\": \"Erro não informado na iniciadora ou detentora de conta.\" \n    }, \n    \"createAt\": \"2023-01-23T14:17:06.45Z\", \n    \"statusUpdateAt\": \"2023-01-23T14:17:06.45Z\"\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "3g6wrkSrGlqr0C_cySqo0"
  },
  "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": "Path Parameter",
    "value": "pathParameters"
  },
  "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": "appId",
      "kind": "optional",
      "type": "string",
      "description": "App ID for partner",
      "children": []
    },
    {
      "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": "institutionId",
      "kind": "optional",
      "type": "string",
      "description": "Id from the bank chosen by the user",
      "children": []
    },
    {
      "name": "customer",
      "kind": "optional",
      "type": "object",
      "description": "User (natural person) who is logged in to the payment initiator institution",
      "children": [
        {
          "name": "identifierType",
          "kind": "optional",
          "type": "string",
          "description": "Type of the user identification document: CNPJ or CPF\nIf value is CPF:\nmaxLength: 3\nexample: CPF\npattern: ^[A-Z]{3}$\n\nIf value is CNPJ\nmaxLength: 4\nexample: CNPJ\npattern: ^[A-Z]{4}$"
        },
        {
          "name": "identifier",
          "kind": "optional",
          "type": "string",
          "description": "The number of the user identification document\nIf identifierType value is CPF:\nmaxLength: 11\nexample: 11111111111\npattern: ^\\d{11}$\n\nIf identifierType value is CNPJ:\nmaxLength: 14\nexample: 11111111111111\npattern: ^\\d{14}$"
        },
        {
          "name": "name",
          "kind": "optional",
          "type": "string",
          "description": "Username"
        },
        {
          "name": "phone",
          "kind": "optional",
          "type": "string",
          "description": "User's phone number"
        },
        {
          "name": "email",
          "kind": "optional",
          "type": "string",
          "description": "User's email"
        }
      ]
    },
    {
      "name": "loggedUserCpf",
      "kind": "optional",
      "type": "string",
      "description": "User (natural person) who is logged in to the Payment Initiator institution.\nrequired if customer.identifierType = CNPJ",
      "children": []
    },
    {
      "name": "redirectURL",
      "kind": "optional",
      "type": "string",
      "description": "Return rediect url after user checkout in Klavi env",
      "children": []
    },
    {
      "name": "additionalInformation",
      "kind": "optional",
      "type": "string",
      "description": "Must be filled in whenever the paying user enters some additional information in the consent\nexample: Minha recorrência\npattern: [\\w\\W\\s]*\nmaxLength: 140",
      "children": []
    },
    {
      "name": "debtorAccount",
      "kind": "optional",
      "type": "object",
      "description": "Payer's origin account information",
      "children": [
        {
          "name": "ispb",
          "kind": "optional",
          "type": "string",
          "description": "minLength: 8\nmaxLength: 8\npattern: ^[0-9]{8}$\nexample: 12345678\nIt must be filled in with the ISPB (Brazilian Payment System Identifier) of the SPI participant (Instant Payment System) with numbers only."
        },
        {
          "name": "issuer",
          "kind": "optional",
          "type": "string",
          "description": "minLength: 1\nmaxLength: 4\npattern: ^[0-9]{1,4}$\nexample: 1774\nCode of the Agency issuing the account without digit.\n [Restriction] Mandatory for the following account types: CACC (CONTA_DEPOSITO_A_VISTA) and SVGS (CONTA_POUPANCA)."
        },
        {
          "name": "number",
          "kind": "optional",
          "type": "string",
          "description": "minLength: 1\nmaxLength: 20\npattern: ^[0-9]{1,20}$\nexample: 1234567890\nIt must be filled in with the paying user's transactional account number, with verification digit (if any),\nIf there is an alphanumeric value, it should be converted to 0."
        },
        {
          "name": "accountType",
          "kind": "optional",
          "type": "string",
          "description": "Types of accounts used for payment.\nexample: CACC\nEnum: [ CACC, SVGS, TRAN]\n    CACC - Current - Current Account\n    SVGS - Savings - Saving Account\n    TRAN - TransactingAccount - Prepaid Payment Account"
        }
      ]
    },
    {
      "name": "creditorAccount",
      "kind": "optional",
      "type": "object",
      "description": "Object containing the data of the recipient (creditor)",
      "children": [
        {
          "name": "ispb",
          "kind": "optional",
          "type": "string",
          "description": "minLength: 8\nmaxLength: 8\npattern: ^[0-9]{8}$\nexample: 12345678\nIt must be filled in with the ISPB (Brazilian Payment System Identifier) of the SPI participant (Instant Payment System) with numbers only."
        },
        {
          "name": "issuer",
          "kind": "optional",
          "type": "string",
          "description": "minLength: 1\nmaxLength: 4\npattern: ^[0-9]{1,4}$\nexample: 1774\nCode of the Agency issuing the account without digit.\n [Restriction] Mandatory for the following account types: CACC (CONTA_DEPOSITO_A_VISTA) and SVGS (CONTA_POUPANCA)."
        },
        {
          "name": "number",
          "kind": "optional",
          "type": "string",
          "description": "minLength: 1\nmaxLength: 20\npattern: ^[0-9]{1,20}$\nexample: 1234567890\nIt must be filled in with the paying user's transactional account number, with verification digit (if any),\nIf there is an alphanumeric value, it should be converted to 0."
        },
        {
          "name": "accountType",
          "kind": "optional",
          "type": "string",
          "description": "Types of accounts used for payment.\nexample: CACC\nEnum: [ CACC, SVGS, TRAN]\n    CACC - Current - Current Account\n    SVGS - Savings - Saving Account\n    TRAN - TransactingAccount - Prepaid Payment Account"
        },
        {
          "name": "holder",
          "kind": "optional",
          "type": "object",
          "description": "Holder object",
          "children": [
            {
              "name": "identifier",
              "kind": "optional",
              "type": "string",
              "description": "The number of the user identification document\nIf identifierType value is CPF:\nmaxLength: 11\nexample: 11111111111\npattern: ^\\d{11}$\n\nIf identifierType value is CNPJ:\nmaxLength: 14\nexample: 11111111111111\npattern: ^\\d{14}$"
            },
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "description": "Username"
            },
            {
              "name": "identifierType",
              "kind": "optional",
              "type": "string",
              "description": "Type of the user identification document: CNPJ or CPF\nIf value is CPF:\nmaxLength: 3\nexample: CPF\npattern: ^[A-Z]{3}$\n\nIf value is CNPJ\nmaxLength: 4\nexample: CNPJ\npattern: ^[A-Z]{4}$"
            }
          ]
        }
      ]
    },
    {
      "name": "paymentMethod",
      "kind": "optional",
      "type": "string",
      "description": "Field intended for the configuration of the different recurring payment products.",
      "children": []
    },
    {
      "name": "paymentMethodConfig",
      "kind": "optional",
      "type": "object",
      "description": "Field intended for the configuration of the different recurring payment products.",
      "children": [
        {
          "name": "contractId",
          "kind": "optional",
          "type": "string",
          "description": "pattern: ^[a-zA-Z0-9]{1,35}$\nminLength: 1\nmaxLength: 35\nexample: XE00038166201907261559y6j6\nTransaction contract identifier"
        },
        {
          "name": "fixedAmount",
          "kind": "optional",
          "type": "number",
          "description": "pattern: ^((\\d{1,16}\\.\\d{2}))$\nminLength: 4\nmaxLength: 19\nexample: 100000.12\nFixed charge amount, if filled in, represents a consent for payments of fixed amounts, or not subject to change during the validity of the consent."
        },
        {
          "name": "minimumVariableAmount",
          "kind": "optional",
          "type": "number",
          "description": "pattern: ^((\\d{1,16}\\.\\d{2}))$\nminLength: 4\nmaxLength: 19\nexample: 1000000.12\nValue defined by the receiving user. If the paying user assigns a maximum amount for payments of that authorization (field “maximumVariableAmount”), it cannot be lower than the floor set by the receiving user."
        },
        {
          "name": "maximumVariableAmount",
          "kind": "optional",
          "type": "number",
          "description": "pattern: ^((\\d{1,16}\\.\\d{2}))$\nminLength: 4\nmaxLength: 19\nexample: 1000000.12\nMaximum allowed value per charge, if filled in, represents consent to payments of variable amounts."
        },
        {
          "name": "currency",
          "kind": "optional",
          "type": "string",
          "description": "maxLength: 3\npattern: ^([A-Z]{3})$\nexample: BRL"
        },
        {
          "name": "interval",
          "kind": "optional",
          "type": "string",
          "description": "example: MONTHLY\nEnum: [ WEEKLY,MONTHLY,YEARLY,SEMIANNUAL,QUARTERLY ]\nDefines the allowed periodicity for transaction execution"
        },
        {
          "name": "referenceStartDate",
          "kind": "optional",
          "type": "string",
          "description": "pattern: ^(\\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])$\nexample: 2023-05-21\nRepresents the expected date for the start of the collection cycle for payments associated with recurrence. It is a string with date according to RFC-3339 specification, following Brasília time (UTC-3). The initial bulk payment, declared in the firstPayment object of the consent, is not subject to this date."
        },
        {
          "name": "contractDebtor",
          "kind": "optional",
          "type": "object",
          "description": "Information about the customer who owes the contract.",
          "children": [
            {
              "name": "identifierType",
              "kind": "optional",
              "type": "string",
              "description": "Enum: [ CPF, CNPJ ]\nType of the user identification document: CNPJ or CPF"
            },
            {
              "name": "identifier",
              "kind": "optional",
              "type": "string",
              "description": "maxLength: 14\nexample: 11111111111111\npattern: ^([0-9]{11})$|^([0-9A-Z]{12}[0-9]{2})$\nThe number of the user identification document"
            },
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "description": "pattern: ^([A-Za-zÀ-ÖØ-öø-ÿ,.@:&*+_<>()!?/\\\\$%\\d' -]+)$\nmaxLength: 120\nexample: Policarpo Quaresma"
            }
          ]
        },
        {
          "name": "isRetryAccepted",
          "kind": "optional",
          "type": "boolean",
          "description": "example: false\nIndicates whether the receiving customer is allowed to make payment attempts (extradition), according to the rules set out in the Pix arrangement."
        },
        {
          "name": "useOverdraftLimit",
          "kind": "optional",
          "type": "boolean",
          "description": "default: true\nexample: true\nIndicates whether the paying user has authorized the use of pre-approved limit (special check) in his account for making payments, if the customer owns the product."
        },
        {
          "name": "firstPayment",
          "kind": "optional",
          "type": "object",
          "description": "Definitions for the first payment. It is considered as the payment of membership to the service by the paying user.",
          "children": [
            {
              "name": "id",
              "kind": "optional",
              "type": "string",
              "description": "Payment 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"
            },
            {
              "name": "remittanceInformation",
              "kind": "optional",
              "type": "string",
              "description": "maxLength: 140\npattern: [\\w\\W\\s]*\nexample: Pagamento da nota RSTO035-002\nIt must be filled in whenever the paying user enters some additional information in a payment, to be sent to the recipient."
            },
            {
              "name": "date",
              "kind": "optional",
              "type": "string",
              "description": "maxLength: 10\npattern: ^(\\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])$\nexample: 2021-01-01\nDefines the target date for payment settlement. The Brasília time zone should be used to create and streamline the data in this field."
            },
            {
              "name": "amount",
              "kind": "optional",
              "type": "string",
              "description": "minLength: 4\nmaxLength: 19\npattern: ^((\\d{1,16}\\.\\d{2}))$\nexample: 100000.12\nThe transaction value with 2 decimal places."
            },
            {
              "name": "currency",
              "kind": "optional",
              "type": "string",
              "description": "maxLength: 3\npattern: ^([A-Z]{3})$\nexample: BRL\nNational currency code according to ISO-4217, i.e., 'BRL'. All reported monetary values are represented with the current currency of Brazil."
            }
          ]
        }
      ]
    },
    {
      "name": "externalInfo",
      "kind": "optional",
      "type": "object",
      "description": "Metadata, user customizable",
      "children": [
        {
          "name": "key",
          "kind": "optional",
          "type": "string",
          "description": ""
        }
      ]
    },
    {
      "name": "expirationDateTime",
      "kind": "optional",
      "type": "string",
      "description": "The date and time when the consent shall cease to be valid. A string with date and time as specified in RFC-3339, always using the UTC time format.\nexample: 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",
      "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": "createAt",
      "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\nCreate time",
      "children": []
    },
    {
      "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": "consentid",
  "legacyHash": "BPDbiU1AGY7Pty5sx1sm7"
}
```
:::



