Clear Dues
curl --request POST \
--url https://api.mansa.xyz/api/v2/liquidity/management/repayments/clear-dues \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"chain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.mansa.xyz/api/v2/liquidity/management/repayments/clear-dues"
payload = { "chain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({chain_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.mansa.xyz/api/v2/liquidity/management/repayments/clear-dues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"penaltyRepayment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"type": "interest",
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionHash": "<string>",
"status": "SUBMITTED",
"chainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"interestRepayment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"type": "interest",
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionHash": "<string>",
"status": "SUBMITTED",
"chainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"principalRepayment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"type": "interest",
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionHash": "<string>",
"status": "SUBMITTED",
"chainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"pendingPrincipalAfterInterest": true
}{
"error": {
"type": "validation_error",
"code": "missing_required_field",
"message": "The 'amount' field is required.",
"param": "amount",
"doc_url": "https://docs.mansa.io/errors/missing_required_field"
}
}{
"error": {
"type": "auth_error",
"code": "invalid_token",
"message": "Bearer token is missing or invalid."
}
}{
"error": {
"type": "validation_error",
"code": "business_rule_violation",
"message": "Requested amount exceeds allowed corridor maximum."
}
}{
"error": {
"type": "rate_limit_error",
"code": "too_many_requests",
"message": "Too many requests. Please retry with exponential backoff."
}
}{
"error": {
"type": "api_error",
"code": "upstream_dependency_error",
"message": "A dependency failed to process the request."
}
}Management
Clear Dues
Clears outstanding dues for a chain by generating repayments in a waterfall: interest is paid first, then principal. Either repayment may be null if there was nothing owed in that category.
POST
/
api
/
v2
/
liquidity
/
management
/
repayments
/
clear-dues
Clear Dues
curl --request POST \
--url https://api.mansa.xyz/api/v2/liquidity/management/repayments/clear-dues \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"chain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.mansa.xyz/api/v2/liquidity/management/repayments/clear-dues"
payload = { "chain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({chain_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.mansa.xyz/api/v2/liquidity/management/repayments/clear-dues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"penaltyRepayment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"type": "interest",
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionHash": "<string>",
"status": "SUBMITTED",
"chainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"interestRepayment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"type": "interest",
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionHash": "<string>",
"status": "SUBMITTED",
"chainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"principalRepayment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"type": "interest",
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionHash": "<string>",
"status": "SUBMITTED",
"chainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"pendingPrincipalAfterInterest": true
}{
"error": {
"type": "validation_error",
"code": "missing_required_field",
"message": "The 'amount' field is required.",
"param": "amount",
"doc_url": "https://docs.mansa.io/errors/missing_required_field"
}
}{
"error": {
"type": "auth_error",
"code": "invalid_token",
"message": "Bearer token is missing or invalid."
}
}{
"error": {
"type": "validation_error",
"code": "business_rule_violation",
"message": "Requested amount exceeds allowed corridor maximum."
}
}{
"error": {
"type": "rate_limit_error",
"code": "too_many_requests",
"message": "Too many requests. Please retry with exponential backoff."
}
}{
"error": {
"type": "api_error",
"code": "upstream_dependency_error",
"message": "A dependency failed to process the request."
}
}Authorizations
Response
Dues cleared

