Get consent list
1 min
consents
Get consent list only for automatic Pix payment
GET
https://api-sandbox.klavi.ai/payment/management/v1/merchants/automatic/{appId}/consents
Path Parameters
- appIdstringrequiredDescription
Query Parameters
- startDatestringDescription
- endDatestringDescription
- pageSizestringDescription
- cursorstringDescription
Header Parameters
- AuthorizationstringrequiredDescription
Response
- dataobjectDescription
- idstringDescription
- appIdstringDescription
- merchantCodestringDescription
- clientRequestIdstringDescription
- institutionIdstringDescription
- customerobjectDescription
- identifierTypestringDescription
- identifierstringDescription
- namestringDescription
- phonestringDescription
- emailstringDescription
- loggedUserCpfstringDescription
- ofConsentIdstringDescription
- redirectURLstringDescription
- additionalInformationstringDescription
- debtorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- creditorAccountobjectDescription
- ispbstringDescription
- issuerstringDescription
- numberstringDescription
- accountTypestringDescription
- holderobjectDescription
- identifierstringDescription
- namestringDescription
- identifierTypestringDescription
- paymentMethodstringDescription
- paymentMethodConfigobjectDescription
- contractIdstringDescription
- fixedAmountstringDescription
- minimumVariableAmountstringDescription
- maximumVariableAmountstringDescription
- currencystringDescription
- intervalstringDescription
- referenceStartDatestringDescription
- contractDebtorobjectDescription
- identifierTypestringDescription
- identifierstringDescription
- namestringDescription
- isRetryAcceptedbooleanDescription
- useOverdraftLimitbooleanDescription
- firstPaymentobjectDescription
- clientRequestIdstringDescription
- remittanceInformationstringDescription
- datestringDescription
- amountstringDescription
- currencystringDescription
- externalInfoobjectDescription
- keystring
- expirationDateTimestringDescription
- statusstringDescription
- statusReasonobjectDescription
- codestringDescription
- messagestringDescription
- createAtstringDescription
- updateAtstringDescription
- statusUpdateAtstringDescription
- pagingobjectDescription
- nextCursorstringDescription
- prevCursorstringDescription
- hasNextbooleanDescription
- hasPrevbooleanDescription
curl
curl --location --globoff 'https://api-sandbox.klavi.ai/payment/management/v1/merchants/automatic/{appId}/consents' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'nodejs
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api-sandbox.klavi.ai/payment/management/v1/merchants/automatic/{appId}/consents',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api-sandbox.klavi.ai/payment/management/v1/merchants/automatic/{appId}/consents", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api-sandbox.klavi.ai/payment/management/v1/merchants/automatic/{appId}/consents"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api-sandbox.klavi.ai/payment/management/v1/merchants/automatic/{appId}/consents")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
200
{
"data": [
{
"id": "fcb72e3a-b346-4f71-b044-971dc23232c9", // Required
"appId": "0b59d801-08e0-4e84-9ecd-569f34e32279", // Required
"merchantCode": "0b59d801-08e0-4e84-9ecd-569f34e32279", // Required
"clientRequestId": "fcb72e3a-b346-4f71-b044-dsndsnmnkdsmk", // Required
"institutionId": "c8f0bf49-4744-4933-8960-7add6e590841", // Required
"customer":
{
"identifierType": "CPF", // Required, CPF | CNPJ
"identifier": "76109277673", // Required, mask this field
"name": "João Silva", // Required
"phone": "12345", // Optional, mask this field
"email": "[email protected]" // Optional, mask this field
}, // Required
"loggedUserCpf": "76109277673", // required if customer.identifierType = CNPJ
"ofConsentId": "yyt72e3a-b846-i771-b044-971dc232ujd8", // Optional
"redirectUrl": "//close", // Optional, return url after user checkout in Klavi env
"additionalInformation": "Any description", // Optinal, consent description
"debtorAccount":
{
"ispb": "00000000", // Required, ISPB (Brazilian Payment System Identifier) of the SPI (Instant Payment System)
"issuer": "0001", // Optional, Code of the issuing Agency of the account without digit.
"number": "324223", // Required, account number
"accountType": "CACC" // Required, CACC(Current Account)|SVGS(Savings Account)|TRAN(TransactingAccount)
}, // Optinal, payer's account
"creditorAccount":
{
"ispb": "00000000", // Required
"issuer": "0001", // Optional, mask this field
"number": "324223", // Required, mask this field
"accountType": "CACC", // Required
"holder":
{
"identifier": "76109277673", // Required, mask this field
"name": "John Doe", // Required
"identifierType": "CPF" // Required
} // Required
}, // Required
"paymentMethod": "AUTOMATIC_PIX", // Required
"paymentMethodConfig": {
"contractId": "PREMIUMPLAN123456", // Required
"fixedAmount": "10000.05", // Optional
"minimumVariableAmount": "100.01", // Optional
"maximumVariableAmount": "100.01", // Optional
"currency": "BRL", // Required
"interval": "MONTHLY", // Required
"referenceStartDate": "2025-06-01",
"contractDebtor": {
"identifierType": "CPF", // Required, CPF | CNPJ
"identifier": "76109277673", // Required, mask this field
"name": "João da Silva" // Required
},
"isRetryAccepted": true, // Required
"useOverdraftLimit": true, // Required
"firstPayment": {
"clientRequestId": "fcb72e3a-b346-4f71-b044-dsndsnmnkdsmk", // Required
"remittanceInformation": "description", // Optional
"date": "2025-05-15", // Required
"amount": "3000.02", // Required
"currency": "BRL" // Required
} // Optional
},
"externalInfo":
{
"key": "value"
}, // Optional
"expirationDateTime": "2023-01-23T23:59:59", // Optional
"status": "CANCELED", // Required
"statusReason": {
"code": "NAO_INFORMADO", // Required
"message": "Erro não informado na iniciadora ou detentora de conta." // Required
}, // Optional
"createAt": "2023-01-23T14:17:06.45Z", // Required
"updateAt": "2023-01-23T14:17:06.45Z", // Required
"statusUpdateAt": "2023-01-23T14:17:06.45Z" // Optional
}
],
"paging": {
"nextCursor": "eyJjcmVhdGVkX2F0IjnBheW1lbnRfaWQiOiJwYXlfMTIzIn0", // Optional
"prevCursor": "eyJjcmVhdGVkX2F0IjnBheW1lbnRfaWQiOiJwYXlfMTEwIn0", // Optional
"hasNext": true, // Required
"hasPrev": true // Required
}
}