Loan
Simulation
Create a loan simulation based on customer information and requested amount
POST
/
v1.1
/
loans
/
simulation
Simulation
curl --request POST \
--url https://api.paymee.com.br/v1.1/loans/simulation \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-token: <x-api-token>' \
--data '
{
"amount": 10000,
"customer": {
"address": {
"city": "City",
"complement": "Apt 4",
"number": "123",
"state": "ST",
"street": "Main Street",
"zipcode": "12345678"
},
"birth": "1980-01-01",
"document": {
"number": "00000000000",
"type": "CPF"
},
"email": "foo@bar.com",
"income": 5000,
"name": "John Doe",
"phone": "11999999999"
},
"products": [
{
"amount": 2,
"id": "prod1",
"name": "Product 1",
"value": 5000
}
],
"times": 12
}
'import requests
url = "https://api.paymee.com.br/v1.1/loans/simulation"
payload = {
"amount": 10000,
"customer": {
"address": {
"city": "City",
"complement": "Apt 4",
"number": "123",
"state": "ST",
"street": "Main Street",
"zipcode": "12345678"
},
"birth": "1980-01-01",
"document": {
"number": "00000000000",
"type": "CPF"
},
"email": "foo@bar.com",
"income": 5000,
"name": "John Doe",
"phone": "11999999999"
},
"products": [
{
"amount": 2,
"id": "prod1",
"name": "Product 1",
"value": 5000
}
],
"times": 12
}
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-api-token': '<x-api-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10000,
customer: {
address: {
city: 'City',
complement: 'Apt 4',
number: '123',
state: 'ST',
street: 'Main Street',
zipcode: '12345678'
},
birth: '1980-01-01',
document: {number: '00000000000', type: 'CPF'},
email: 'foo@bar.com',
income: 5000,
name: 'John Doe',
phone: '11999999999'
},
products: [{amount: 2, id: 'prod1', name: 'Product 1', value: 5000}],
times: 12
})
};
fetch('https://api.paymee.com.br/v1.1/loans/simulation', 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.paymee.com.br/v1.1/loans/simulation",
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([
'amount' => 10000,
'customer' => [
'address' => [
'city' => 'City',
'complement' => 'Apt 4',
'number' => '123',
'state' => 'ST',
'street' => 'Main Street',
'zipcode' => '12345678'
],
'birth' => '1980-01-01',
'document' => [
'number' => '00000000000',
'type' => 'CPF'
],
'email' => 'foo@bar.com',
'income' => 5000,
'name' => 'John Doe',
'phone' => '11999999999'
],
'products' => [
[
'amount' => 2,
'id' => 'prod1',
'name' => 'Product 1',
'value' => 5000
]
],
'times' => 12
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);
$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.paymee.com.br/v1.1/loans/simulation"
payload := strings.NewReader("{\n \"amount\": 10000,\n \"customer\": {\n \"address\": {\n \"city\": \"City\",\n \"complement\": \"Apt 4\",\n \"number\": \"123\",\n \"state\": \"ST\",\n \"street\": \"Main Street\",\n \"zipcode\": \"12345678\"\n },\n \"birth\": \"1980-01-01\",\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com\",\n \"income\": 5000,\n \"name\": \"John Doe\",\n \"phone\": \"11999999999\"\n },\n \"products\": [\n {\n \"amount\": 2,\n \"id\": \"prod1\",\n \"name\": \"Product 1\",\n \"value\": 5000\n }\n ],\n \"times\": 12\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-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.paymee.com.br/v1.1/loans/simulation")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10000,\n \"customer\": {\n \"address\": {\n \"city\": \"City\",\n \"complement\": \"Apt 4\",\n \"number\": \"123\",\n \"state\": \"ST\",\n \"street\": \"Main Street\",\n \"zipcode\": \"12345678\"\n },\n \"birth\": \"1980-01-01\",\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com\",\n \"income\": 5000,\n \"name\": \"John Doe\",\n \"phone\": \"11999999999\"\n },\n \"products\": [\n {\n \"amount\": 2,\n \"id\": \"prod1\",\n \"name\": \"Product 1\",\n \"value\": 5000\n }\n ],\n \"times\": 12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymee.com.br/v1.1/loans/simulation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10000,\n \"customer\": {\n \"address\": {\n \"city\": \"City\",\n \"complement\": \"Apt 4\",\n \"number\": \"123\",\n \"state\": \"ST\",\n \"street\": \"Main Street\",\n \"zipcode\": \"12345678\"\n },\n \"birth\": \"1980-01-01\",\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com\",\n \"income\": 5000,\n \"name\": \"John Doe\",\n \"phone\": \"11999999999\"\n },\n \"products\": [\n {\n \"amount\": 2,\n \"id\": \"prod1\",\n \"name\": \"Product 1\",\n \"value\": 5000\n }\n ],\n \"times\": 12\n}"
response = http.request(request)
puts response.read_body{
"hasProposal": true,
"proposals": [
{
"amount": 10000,
"max_term_months": 12,
"monthly_interest_rate": 0.02,
"partner": "Bank A",
"product": "Personal Loan",
"proposal_id": "abc123",
"terms": [
{
"amount": 10000,
"down_payment": false,
"down_payment_value": 0,
"final_amount": 10500,
"first_due_date": "2024-06-01",
"grace_period": 0,
"interest_rate": 0.24,
"label": "Standard Term",
"monthly_interest_rate": 0.02,
"proposal_id": "abc123",
"quotas": 12,
"times": 12,
"total_iof": 50
}
]
}
]
}Headers
API authentication key
Example:
"your-api-key-here"
API authentication token
Example:
"your-api-token-here"
Body
application/json
⌘I
Simulation
curl --request POST \
--url https://api.paymee.com.br/v1.1/loans/simulation \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-token: <x-api-token>' \
--data '
{
"amount": 10000,
"customer": {
"address": {
"city": "City",
"complement": "Apt 4",
"number": "123",
"state": "ST",
"street": "Main Street",
"zipcode": "12345678"
},
"birth": "1980-01-01",
"document": {
"number": "00000000000",
"type": "CPF"
},
"email": "foo@bar.com",
"income": 5000,
"name": "John Doe",
"phone": "11999999999"
},
"products": [
{
"amount": 2,
"id": "prod1",
"name": "Product 1",
"value": 5000
}
],
"times": 12
}
'import requests
url = "https://api.paymee.com.br/v1.1/loans/simulation"
payload = {
"amount": 10000,
"customer": {
"address": {
"city": "City",
"complement": "Apt 4",
"number": "123",
"state": "ST",
"street": "Main Street",
"zipcode": "12345678"
},
"birth": "1980-01-01",
"document": {
"number": "00000000000",
"type": "CPF"
},
"email": "foo@bar.com",
"income": 5000,
"name": "John Doe",
"phone": "11999999999"
},
"products": [
{
"amount": 2,
"id": "prod1",
"name": "Product 1",
"value": 5000
}
],
"times": 12
}
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-api-token': '<x-api-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10000,
customer: {
address: {
city: 'City',
complement: 'Apt 4',
number: '123',
state: 'ST',
street: 'Main Street',
zipcode: '12345678'
},
birth: '1980-01-01',
document: {number: '00000000000', type: 'CPF'},
email: 'foo@bar.com',
income: 5000,
name: 'John Doe',
phone: '11999999999'
},
products: [{amount: 2, id: 'prod1', name: 'Product 1', value: 5000}],
times: 12
})
};
fetch('https://api.paymee.com.br/v1.1/loans/simulation', 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.paymee.com.br/v1.1/loans/simulation",
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([
'amount' => 10000,
'customer' => [
'address' => [
'city' => 'City',
'complement' => 'Apt 4',
'number' => '123',
'state' => 'ST',
'street' => 'Main Street',
'zipcode' => '12345678'
],
'birth' => '1980-01-01',
'document' => [
'number' => '00000000000',
'type' => 'CPF'
],
'email' => 'foo@bar.com',
'income' => 5000,
'name' => 'John Doe',
'phone' => '11999999999'
],
'products' => [
[
'amount' => 2,
'id' => 'prod1',
'name' => 'Product 1',
'value' => 5000
]
],
'times' => 12
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);
$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.paymee.com.br/v1.1/loans/simulation"
payload := strings.NewReader("{\n \"amount\": 10000,\n \"customer\": {\n \"address\": {\n \"city\": \"City\",\n \"complement\": \"Apt 4\",\n \"number\": \"123\",\n \"state\": \"ST\",\n \"street\": \"Main Street\",\n \"zipcode\": \"12345678\"\n },\n \"birth\": \"1980-01-01\",\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com\",\n \"income\": 5000,\n \"name\": \"John Doe\",\n \"phone\": \"11999999999\"\n },\n \"products\": [\n {\n \"amount\": 2,\n \"id\": \"prod1\",\n \"name\": \"Product 1\",\n \"value\": 5000\n }\n ],\n \"times\": 12\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-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.paymee.com.br/v1.1/loans/simulation")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10000,\n \"customer\": {\n \"address\": {\n \"city\": \"City\",\n \"complement\": \"Apt 4\",\n \"number\": \"123\",\n \"state\": \"ST\",\n \"street\": \"Main Street\",\n \"zipcode\": \"12345678\"\n },\n \"birth\": \"1980-01-01\",\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com\",\n \"income\": 5000,\n \"name\": \"John Doe\",\n \"phone\": \"11999999999\"\n },\n \"products\": [\n {\n \"amount\": 2,\n \"id\": \"prod1\",\n \"name\": \"Product 1\",\n \"value\": 5000\n }\n ],\n \"times\": 12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymee.com.br/v1.1/loans/simulation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10000,\n \"customer\": {\n \"address\": {\n \"city\": \"City\",\n \"complement\": \"Apt 4\",\n \"number\": \"123\",\n \"state\": \"ST\",\n \"street\": \"Main Street\",\n \"zipcode\": \"12345678\"\n },\n \"birth\": \"1980-01-01\",\n \"document\": {\n \"number\": \"00000000000\",\n \"type\": \"CPF\"\n },\n \"email\": \"foo@bar.com\",\n \"income\": 5000,\n \"name\": \"John Doe\",\n \"phone\": \"11999999999\"\n },\n \"products\": [\n {\n \"amount\": 2,\n \"id\": \"prod1\",\n \"name\": \"Product 1\",\n \"value\": 5000\n }\n ],\n \"times\": 12\n}"
response = http.request(request)
puts response.read_body{
"hasProposal": true,
"proposals": [
{
"amount": 10000,
"max_term_months": 12,
"monthly_interest_rate": 0.02,
"partner": "Bank A",
"product": "Personal Loan",
"proposal_id": "abc123",
"terms": [
{
"amount": 10000,
"down_payment": false,
"down_payment_value": 0,
"final_amount": 10500,
"first_due_date": "2024-06-01",
"grace_period": 0,
"interest_rate": 0.24,
"label": "Standard Term",
"monthly_interest_rate": 0.02,
"proposal_id": "abc123",
"quotas": 12,
"times": 12,
"total_iof": 50
}
]
}
]
}
