---
title: Get the payment status
slug: payment/get-the-payment-status
docTags: 
createdAt: 2025-08-28T09:36:05.950Z
---

:::ApiMethodV2
```json
{
  "name": "/consents/{consentId}/payments/{paymentId}/status",
  "method": "GET",
  "url": "https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/status",
  "description": "Get the payment status",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "FU6t3b19JEIuiAgDzXDyl",
        "language": "curl",
        "code": "curl --location --globoff 'https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/status' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "Hqk2DMdgLyXBnBsjgDK2m",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/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": "Ej61G70OVI3PF97isb0Iq",
        "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/{consentId}/payments/{paymentId}/status\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "RWJ90NG9YsjHnmfBbh_g2",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/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": "mdUtuPaMgKP5z0d4lX1sb",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/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": "FU6t3b19JEIuiAgDzXDyl"
  },
  "results": {
    "languages": [
      {
        "id": "NaxwIYX7De5EduI1yybx5",
        "language": "200",
        "code": "{\n    \"id\": \"cfa45795-fe16-48e2-a372-130e30a72606\",\n    \"clientRequestId\": \"1a3s2aebe29s2\",\n    \"amount\": \"1333.04\",\n    \"currency\": \"BRL\", \n    \"status\": \"CONSENT_AUTHORIED\", \n    \"statusReason\": {\n        \"code\": \"NAO_INFORMADO\", \n        \"message\": \"Erro não informado na iniciadora ou detentora de conta.\" \n    },\n    \"statusUpdateAt\": \"2022-09-23T03:39:43.737Z\" \n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "NaxwIYX7De5EduI1yybx5"
  },
  "request": {
    "pathParameters": [
      {
        "name": "consentId",
        "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"
      },
      {
        "name": "paymentId",
        "kind": "required",
        "type": "string",
        "description": "pattern: ^urn:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,31}:[a-zA-Z0-9()+,\\-.:=@;$_!*'%\\/?#]+$\nmaxLength: 256\nPayment Id",
        "": "pattern: ^urn:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,31}:[a-zA-Z0-9()+,\\-.:=@;$_!*'%\\/?#]+$\nmaxLength: 256\nPayment 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\nPayment 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": "amount",
      "kind": "optional",
      "type": "string",
      "description": "minLength: 4\nmaxLength: 19\npattern: ^((\\d{1,16}\\.\\d{2}))$\nexample: 100000.12\nTransaction value with 2 decimal places",
      "children": []
    },
    {
      "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",
      "children": []
    },
    {
      "name": "status",
      "kind": "optional",
      "type": "string",
      "description": "example: PAYMENT_PENDING\nEnum:\n[PAYMENT_PENDING,PAYMENT_READY_FOR_SETTLEMENT,PAYMENT_SCHEDULED,PAYMENT_SETTLEMENT_PROCESSING, PAYMENT_COMPLETED,PAYMENT_REJECTED]",
      "children": []
    },
    {
      "name": "statusReason",
      "kind": "optional",
      "type": "object",
      "description": "Status reason 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": "maxLength: 20\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$\nexample: 2020-07-21T08:30:00Z",
      "children": []
    }
  ],
  "autoGeneratedAnchorSlug": "consentsconsentidpaymentspaymentidstatus",
  "legacyHash": "G_NZHUERKn7dcMfUmNckl"
}
```
:::



