Skip to main content
POST
/
api
/
v1
/
credits
/
create
Crear nuevo crédito (genera cuotas automáticamente)
curl --request POST \
  --url https://api.raul.ugps.io/api/v1/credits/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "bank_account_id": "123e4567-e89b-12d3-a456-426614174000",
  "total_amount": 10000000,
  "installments_count": 36,
  "installment_amount": 350000,
  "start_date": "2025-01-01",
  "due_day": 15,
  "description": "Crédito hipotecario",
  "paid_installments": 5,
  "currency": "CLP",
  "current_installment": 1,
  "current_installment_date": "2026-01-10"
}
'
import requests

url = "https://api.raul.ugps.io/api/v1/credits/create"

payload = {
"bank_account_id": "123e4567-e89b-12d3-a456-426614174000",
"total_amount": 10000000,
"installments_count": 36,
"installment_amount": 350000,
"start_date": "2025-01-01",
"due_day": 15,
"description": "Crédito hipotecario",
"paid_installments": 5,
"currency": "CLP",
"current_installment": 1,
"current_installment_date": "2026-01-10"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bank_account_id: '123e4567-e89b-12d3-a456-426614174000',
total_amount: 10000000,
installments_count: 36,
installment_amount: 350000,
start_date: '2025-01-01',
due_day: 15,
description: 'Crédito hipotecario',
paid_installments: 5,
currency: 'CLP',
current_installment: 1,
current_installment_date: '2026-01-10'
})
};

fetch('https://api.raul.ugps.io/api/v1/credits/create', 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.raul.ugps.io/api/v1/credits/create",
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([
'bank_account_id' => '123e4567-e89b-12d3-a456-426614174000',
'total_amount' => 10000000,
'installments_count' => 36,
'installment_amount' => 350000,
'start_date' => '2025-01-01',
'due_day' => 15,
'description' => 'Crédito hipotecario',
'paid_installments' => 5,
'currency' => 'CLP',
'current_installment' => 1,
'current_installment_date' => '2026-01-10'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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.raul.ugps.io/api/v1/credits/create"

payload := strings.NewReader("{\n \"bank_account_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"total_amount\": 10000000,\n \"installments_count\": 36,\n \"installment_amount\": 350000,\n \"start_date\": \"2025-01-01\",\n \"due_day\": 15,\n \"description\": \"Crédito hipotecario\",\n \"paid_installments\": 5,\n \"currency\": \"CLP\",\n \"current_installment\": 1,\n \"current_installment_date\": \"2026-01-10\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/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.raul.ugps.io/api/v1/credits/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bank_account_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"total_amount\": 10000000,\n \"installments_count\": 36,\n \"installment_amount\": 350000,\n \"start_date\": \"2025-01-01\",\n \"due_day\": 15,\n \"description\": \"Crédito hipotecario\",\n \"paid_installments\": 5,\n \"currency\": \"CLP\",\n \"current_installment\": 1,\n \"current_installment_date\": \"2026-01-10\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.raul.ugps.io/api/v1/credits/create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bank_account_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"total_amount\": 10000000,\n \"installments_count\": 36,\n \"installment_amount\": 350000,\n \"start_date\": \"2025-01-01\",\n \"due_day\": 15,\n \"description\": \"Crédito hipotecario\",\n \"paid_installments\": 5,\n \"currency\": \"CLP\",\n \"current_installment\": 1,\n \"current_installment_date\": \"2026-01-10\"\n}"

response = http.request(request)
puts response.read_body

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
bank_account_id
string
required

ID de la cuenta bancaria

Example:

"123e4567-e89b-12d3-a456-426614174000"

total_amount
number
required

Monto total del crédito

Example:

10000000

installments_count
number
required

Número total de cuotas

Example:

36

installment_amount
number
required

Monto de cada cuota

Example:

350000

start_date
string
required

Fecha de inicio (YYYY-MM-DD)

Example:

"2025-01-01"

due_day
number
required

Día del mes de vencimiento (1-31)

Example:

15

description
string

Descripción del crédito

Example:

"Crédito hipotecario"

paid_installments
number

Cuotas ya pagadas al registrar

Example:

5

currency
enum<string>

Moneda del crédito (CLP o UF)

Available options:
CLP,
UF
Example:

"CLP"

current_installment
number

Número de cuota actual (en la que va el crédito)

Example:

1

current_installment_date
string

Fecha de la cuota actual (YYYY-MM-DD)

Example:

"2026-01-10"

Response

Crédito creado