Create a consent
1 min
/consents
Create a consent
POST
https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api-sandbox.klavi.ai/payment/customer/v1/automatic/consents',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"clientRequestId": "string",
"institutionId": "string",
"creditorAccount": {
"holder": {}
},
"paymentMethodConfig": {
"contractDebtor": {},
"firstPayment": {}
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});