curl --request POST \
--url https://api.example.com/api/services/app/EmprestimoPessoal/Simular \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"value": 123,
"cpf": "<string>",
"firstInstallmentDate": "2023-11-07T05:31:56Z",
"rebateId": 123,
"installmentIntervalDays": 123,
"period": 123
}
'import requests
url = "https://api.example.com/api/services/app/EmprestimoPessoal/Simular"
payload = {
"value": 123,
"cpf": "<string>",
"firstInstallmentDate": "2023-11-07T05:31:56Z",
"rebateId": 123,
"installmentIntervalDays": 123,
"period": 123
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
value: 123,
cpf: '<string>',
firstInstallmentDate: '2023-11-07T05:31:56Z',
rebateId: 123,
installmentIntervalDays: 123,
period: 123
})
};
fetch('https://api.example.com/api/services/app/EmprestimoPessoal/Simular', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/services/app/EmprestimoPessoal/Simular",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'value' => 123,
'cpf' => '<string>',
'firstInstallmentDate' => '2023-11-07T05:31:56Z',
'rebateId' => 123,
'installmentIntervalDays' => 123,
'period' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/services/app/EmprestimoPessoal/Simular"
payload := strings.NewReader("{\n \"value\": 123,\n \"cpf\": \"<string>\",\n \"firstInstallmentDate\": \"2023-11-07T05:31:56Z\",\n \"rebateId\": 123,\n \"installmentIntervalDays\": 123,\n \"period\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/services/app/EmprestimoPessoal/Simular")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"value\": 123,\n \"cpf\": \"<string>\",\n \"firstInstallmentDate\": \"2023-11-07T05:31:56Z\",\n \"rebateId\": 123,\n \"installmentIntervalDays\": 123,\n \"period\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/services/app/EmprestimoPessoal/Simular")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"value\": 123,\n \"cpf\": \"<string>\",\n \"firstInstallmentDate\": \"2023-11-07T05:31:56Z\",\n \"rebateId\": 123,\n \"installmentIntervalDays\": 123,\n \"period\": 123\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"value": 123,
"maxValue": 123,
"registryCode": "<string>",
"installments": [
{
"period": 123,
"installmentsValue": 123,
"financedValue": 123,
"tax": 123,
"cet": 123,
"iofPercentage": 123,
"iofValue": 123,
"tacValue": 123,
"intervalDays": 123,
"schedule": [
{
"number": 123,
"dueDate": "2023-11-07T05:31:56Z",
"amount": 123
}
]
}
]
}Simular condições de empréstimo pessoal
curl --request POST \
--url https://api.example.com/api/services/app/EmprestimoPessoal/Simular \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"value": 123,
"cpf": "<string>",
"firstInstallmentDate": "2023-11-07T05:31:56Z",
"rebateId": 123,
"installmentIntervalDays": 123,
"period": 123
}
'import requests
url = "https://api.example.com/api/services/app/EmprestimoPessoal/Simular"
payload = {
"value": 123,
"cpf": "<string>",
"firstInstallmentDate": "2023-11-07T05:31:56Z",
"rebateId": 123,
"installmentIntervalDays": 123,
"period": 123
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
value: 123,
cpf: '<string>',
firstInstallmentDate: '2023-11-07T05:31:56Z',
rebateId: 123,
installmentIntervalDays: 123,
period: 123
})
};
fetch('https://api.example.com/api/services/app/EmprestimoPessoal/Simular', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/services/app/EmprestimoPessoal/Simular",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'value' => 123,
'cpf' => '<string>',
'firstInstallmentDate' => '2023-11-07T05:31:56Z',
'rebateId' => 123,
'installmentIntervalDays' => 123,
'period' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/services/app/EmprestimoPessoal/Simular"
payload := strings.NewReader("{\n \"value\": 123,\n \"cpf\": \"<string>\",\n \"firstInstallmentDate\": \"2023-11-07T05:31:56Z\",\n \"rebateId\": 123,\n \"installmentIntervalDays\": 123,\n \"period\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/services/app/EmprestimoPessoal/Simular")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"value\": 123,\n \"cpf\": \"<string>\",\n \"firstInstallmentDate\": \"2023-11-07T05:31:56Z\",\n \"rebateId\": 123,\n \"installmentIntervalDays\": 123,\n \"period\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/services/app/EmprestimoPessoal/Simular")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"value\": 123,\n \"cpf\": \"<string>\",\n \"firstInstallmentDate\": \"2023-11-07T05:31:56Z\",\n \"rebateId\": 123,\n \"installmentIntervalDays\": 123,\n \"period\": 123\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"value": 123,
"maxValue": 123,
"registryCode": "<string>",
"installments": [
{
"period": 123,
"installmentsValue": 123,
"financedValue": 123,
"tax": 123,
"cet": 123,
"iofPercentage": 123,
"iofValue": 123,
"tacValue": 123,
"intervalDays": 123,
"schedule": [
{
"number": 123,
"dueDate": "2023-11-07T05:31:56Z",
"amount": 123
}
]
}
]
}period (nº de parcelas); use o code
retornado + o period escolhido para depois Contratar.
rebateId é opcional. Se omitido, a simulação usa a tabela padrão configurada
para o lojista (tenant ou filial). Envie apenas quando precisar de uma tabela específica.result do envelope.curl -X POST "https://gateway.hubcred.com.br/external/v1/api/services/app/EmprestimoPessoal/Simular" \
-H "Authorization: Bearer SEU_TOKEN" -H "Content-Type: application/json" \
-d '{ "value": 5000, "cpf": "12345678900", "firstInstallmentDate": "2026-08-10" }'
Periodicidade das parcelas (opcional)
installmentIntervalDays). Lojas sem a periodicidade habilitada mantêm a
simulação mensal de sempre. Fale com o seu contato na HubCred para habilitar.| Campo | Descrição |
|---|---|
installmentIntervalDays | Intervalo entre as parcelas, em dias: 1 (diária), 7 (semanal) ou 15 (quinzenal). Ausente, a simulação é mensal. |
period | Quantidade de parcelas. Obrigatório quando installmentIntervalDays é enviado. |
periodsozinho não escolhe um prazo: seminstallmentIntervalDaysele é ignorado, e a simulação mensal continua devolvendo todas as opções.periodé um número inteiro. Um valor que não seja inteiro é recusado como erro de validação.- Com intervalo,
firstInstallmentDatenão pode ser anterior a hoje mais o intervalo (por exemplo, hoje mais 7 dias na semanal). “Hoje” é a data do servidor. - Com intervalo, a resposta traz uma única opção em
installments, com a quantidade de parcelas pedida. Use operioddela ao Contratar.
installments traz dois campos sobre a periodicidade:
| Campo | Descrição |
|---|---|
intervalDays | Intervalo em dias da opção. null na simulação mensal. |
schedule | Cronograma das parcelas: lista de number (número da parcela), dueDate (vencimento) e amount (valor). Na simulação mensal vem como lista vazia. |
| Caso | Mensagem |
|---|---|
Periodicidade não habilitada para a loja (inclusive a mensal, sem installmentIntervalDays, quando a periodicidade está habilitada) | “A periodicidade semanal não está habilitada para esta loja.” (o nome muda: mensal, diária, semanal ou quinzenal) |
installmentIntervalDays enviado por loja sem a periodicidade habilitada | ”Parcelas diárias, semanais e quinzenais não estão habilitadas para esta loja.” |
curl -X POST "https://gateway.hubcred.com.br/external/v1/api/services/app/EmprestimoPessoal/Simular" \
-H "Authorization: Bearer SEU_TOKEN" -H "Content-Type: application/json" \
-d '{ "value": 5000, "cpf": "12345678900", "firstInstallmentDate": "2026-11-20", "installmentIntervalDays": 7, "period": 12 }'
Dias sem parcela (só na diária)
Na parcela diária (installmentIntervalDays igual a 1), as datas pulam os dias que a loja
configurou com a HubCred (dias da semana e datas específicas). A simulação não envia nada para isso.
Os campos skipWeekdays e skipDates não fazem mais parte do contrato. Se ainda forem enviados,
são ignorados sem erro, e a configuração da loja se aplica.
Pular um dia estica a agenda: a quantidade de parcelas (period) não muda, e o último
vencimento vai mais longe. Por exemplo, 30 parcelas diárias pulando os domingos ocupam 34 dias
quando o período tem 4 domingos. A resposta não ganha campo: o schedule já vem sem os dias
pulados, e intervalDays continua 1.
A simulação é recusada quando:
| Caso | Mensagem |
|---|---|
firstInstallmentDate num dia que a loja pula (a data não é mudada automaticamente) | “O primeiro vencimento cai num dia marcado para pular. Escolha outra data.” |
curl -X POST "https://gateway.hubcred.com.br/external/v1/api/services/app/EmprestimoPessoal/Simular" \
-H "Authorization: Bearer SEU_TOKEN" -H "Content-Type: application/json" \
-d '{ "value": 5000, "cpf": "12345678900", "firstInstallmentDate": "2026-10-27", "installmentIntervalDays": 1, "period": 30 }'
Body
Input com os dados para simulação
Dados de entrada para simulação de empréstimo pessoal.
Valor desejado do empréstimo.
CPF do cliente.
Data da primeira parcela.
Identificador da tabela de rebate/comissão, quando aplicável.
Intervalo em dias entre parcelas: 1 (diário), 7 (semanal) ou 15 (quinzenal). Quando ausente, a simulação é mensal (comportamento padrão). Só é aceito quando a função de parcelas não mensais está habilitada para a empresa; sem ela, a simulação é recusada. Com intervalo, period é obrigatório. Com intervalo, firstInstallmentDate não pode ser anterior a hoje mais o intervalo. Com intervalo, a resposta traz uma única opção em installments, com a agenda de vencimentos em schedule dentro dela.
Número de parcelas. Obrigatório quando installmentIntervalDays é informado; ignorado quando informado sem ele.
Response
OK
Resultado da simulação de empréstimo pessoal.
Código público da simulação/operação — use ao contratar.
Valor simulado.
Valor máximo disponível, quando aplicável.
CPF/CNPJ do cliente.
Opções de parcelamento simuladas.
Show child attributes
Show child attributes