Simulate installments
GET
/api/v1/bank/public/charge/{uuid}/simulate-installmentPublic endpoint
This endpoint is called by the checkout page or SDK to show the payer available installment options. No Bearer token required — the charge UUID provides the context.
Request headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Recommended |
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
uuid | string (UUID) | Yes | Charge UUID to simulate installments for |
Response fields
| Field | Type | Description |
|---|---|---|
charge_uuid | string | Charge identifier |
total_amount | number | Original charge amount |
currency | string | Currency code |
installments | array | Available installment options |
installments[].count | integer | Number of installments (1, 2, 3, …12) |
installments[].installment_value | number | Amount per installment |
installments[].total_amount | number | Total with interest (if applicable) |
installments[].interest_rate | number | Monthly interest rate (0 for interest-free) |
installments[].interest_free | boolean | Whether this option has zero interest |
HTTP status codes
| Status | Description |
|---|---|
| 200 | Installment simulation returned |
| 404 | Charge not found or expired |
| 422 | Charge type does not support installments |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Code examples
- cURL
- Python
- Node.js
curl -s -X GET "https://core-manager.a55.tech/api/v1/bank/public/charge/a1b2c3d4-e5f6-7890-abcd-ef1234567890/simulate-installment"
import requests
charge_uuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
try:
response = requests.get(
f"https://core-manager.a55.tech/api/v1/bank/public/charge/{charge_uuid}/simulate-installment",
)
response.raise_for_status()
sim = response.json()
for opt in sim["installments"]:
label = "interest-free" if opt["interest_free"] else f"{opt['interest_rate']}%/mo"
print(f"{opt['count']}x R$ {opt['installment_value']:.2f} ({label})")
except requests.exceptions.HTTPError as e:
print(f"HTTP {e.response.status_code}: {e.response.json()}")
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")
const chargeUuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
try {
const response = await fetch(
`https://core-manager.a55.tech/api/v1/bank/public/charge/${chargeUuid}/simulate-installment`
);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const sim = await response.json();
for (const opt of sim.installments) {
const label = opt.interest_free ? "interest-free" : `${opt.interest_rate}%/mo`;
console.log(`${opt.count}x R$ ${opt.installment_value.toFixed(2)} (${label})`);
}
} catch (error) {
console.error("Simulation failed:", error.message);
}
Error response example
{
"status": "error",
"message": [
{
"code": "CHARGE_NOT_FOUND",
"source": "simulation",
"description": "Charge a1b2c3d4-e5f6-7890-abcd-ef1234567890 not found or expired"
}
]
}