---
title: Create a retry payment
slug: payment/create-a-retry-payment
docTags: 
createdAt: 2025-08-28T09:36:08.265Z
---

:::ApiMethodV2
```json
{
  "name": "/consents/{consentId}/payments/{paymentId}/retry",
  "method": "POST",
  "url": "https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/retry",
  "description": "Create a retry payment",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "ZceQa0KqIAsi1KLUOl9OP",
        "language": "curl",
        "code": "curl --location --globoff --request GET 'https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/retry' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\"clientRequestId\":\"string\",\"date\":\"string\"}'",
        "customLabel": ""
      },
      {
        "id": "ESYNXU9z3ZlUvwHaPQUUD",
        "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}/retry',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"clientRequestId\": \"string\",\n      \"date\": \"string\"\n   })\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "2WYQyDtPkw1DQn0XnpU7b",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"clientRequestId\": \"string\",\n   \"date\": \"string\"\n});\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/retry\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "Z_p5ImTQ-ddO7DJM3gzYw",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents/{consentId}/payments/{paymentId}/retry\"\n\npayload = json.dumps({\n   \"clientRequestId\": \"string\",\n   \"date\": \"string\"\n})\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": "UQzj0lg4gzpKpRWJhhMC1",
        "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}/retry\")\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.body = JSON.dump({\n   \"clientRequestId\": \"string\",\n   \"date\": \"string\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "ZceQa0KqIAsi1KLUOl9OP"
  },
  "results": {
    "languages": [
      {
        "id": "4v4QF_BUqH_aLlHU9HHOo",
        "language": "201",
        "code": "{\n    \"id\": \"fcb72e3a-b346-4f71-b044-971dc23232c9\",\n    \"clientRequestId\": \"fcb72e3a-b346-4f71-b044-dsndsnmnkdsmk\",\n    \"status\": \"CANCELED\",\n    \"statusReason\": {\n        \"code\": \"NAO_INFORMADO\", \n        \"messa\tge\": \"Erro não informado na iniciadora ou detentora de conta.\" \n    } \n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "4v4QF_BUqH_aLlHU9HHOo"
  },
  "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": [
      {
        "name": "clientRequestId",
        "kind": "required",
        "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",
        "": "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": "date",
        "kind": "required",
        "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\nDate of payment creation",
        "": "maxLength: 10\npattern: ^(\\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])$\nexample: 2021-01-01\nDate of payment creation"
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "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": "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"
        }
      ]
    }
  ],
  "autoGeneratedAnchorSlug": "consentsconsentidpaymentspaymentidretry",
  "legacyHash": "2czerF157xjcLbhEkkrRB"
}
```
:::



