Emitir boleto
curl --request POST \
--url https://api.nasten.net/v1/boleto \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountInCents": 25000,
"description": "Fatura 2026-081",
"customer": {
"name": "Cliente Exemplo",
"email": "cliente@exemplo.com",
"documentType": "cpf",
"document": "01234567890",
"phone": "11900000000"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountInCents: 25000,
description: 'Fatura 2026-081',
customer: {
name: 'Cliente Exemplo',
email: 'cliente@exemplo.com',
documentType: 'cpf',
document: '01234567890',
phone: '11900000000'
}
})
};
fetch('https://api.nasten.net/v1/boleto', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nasten.net/v1/boleto"
payload = {
"amountInCents": 25000,
"description": "Fatura 2026-081",
"customer": {
"name": "Cliente Exemplo",
"email": "cliente@exemplo.com",
"documentType": "cpf",
"document": "01234567890",
"phone": "11900000000"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nasten.net/v1/boleto",
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([
'amountInCents' => 25000,
'description' => 'Fatura 2026-081',
'customer' => [
'name' => 'Cliente Exemplo',
'email' => 'cliente@exemplo.com',
'documentType' => 'cpf',
'document' => '01234567890',
'phone' => '11900000000'
]
]),
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.nasten.net/v1/boleto"
payload := strings.NewReader("{\n \"amountInCents\": 25000,\n \"description\": \"Fatura 2026-081\",\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"01234567890\",\n \"phone\": \"11900000000\"\n }\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.nasten.net/v1/boleto")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amountInCents\": 25000,\n \"description\": \"Fatura 2026-081\",\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"01234567890\",\n \"phone\": \"11900000000\"\n }\n}")
.asString();{
"success": true,
"message": "Transação criada com sucesso",
"data": {
"id": "clm8x9y0z1234567890abcdef",
"boleto": {
"url": "<string>",
"barcode": "<string>",
"digitableLine": "<string>",
"dueAt": "<string>"
},
"status": "pending",
"fees": 350
}
}{
"success": false,
"message": "Descrição do erro",
"code": "NST-400-3f7a",
"errors": [
{
"path": "customer.document",
"message": "Documento inválido"
}
]
}{
"success": false,
"message": "Token inválido ou expirado",
"code": "NST-401-rcp9"
}{
"success": false,
"error": "Forbidden",
"message": "Conta ainda não verificada. Conclua o cadastro e a verificação de identidade para vender.",
"reason": "company_not_verified",
"code": "NST-403-3f9a"
}{
"success": false,
"message": "Descrição do erro",
"code": "NST-400-3f7a"
}{
"success": false,
"message": "Descrição do erro",
"code": "NST-400-3f7a"
}{
"success": false,
"message": "Descrição do erro",
"code": "NST-400-3f7a",
"error": "Too Many Requests",
"retryAfterMs": 42000,
"limit": 1800,
"window": "1 minute"
}{
"success": false,
"message": "Internal server error",
"code": "NST-500-9e2b"
}Boleto
Emitir boleto
Emite um boleto com PDF, código de barras e linha digitável. O corpo é o mesmo do Pix In e passa pelas mesmas checagens. Boleto pago não tem reembolso pela API.
POST
/
v1
/
boleto
Emitir boleto
curl --request POST \
--url https://api.nasten.net/v1/boleto \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountInCents": 25000,
"description": "Fatura 2026-081",
"customer": {
"name": "Cliente Exemplo",
"email": "cliente@exemplo.com",
"documentType": "cpf",
"document": "01234567890",
"phone": "11900000000"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountInCents: 25000,
description: 'Fatura 2026-081',
customer: {
name: 'Cliente Exemplo',
email: 'cliente@exemplo.com',
documentType: 'cpf',
document: '01234567890',
phone: '11900000000'
}
})
};
fetch('https://api.nasten.net/v1/boleto', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nasten.net/v1/boleto"
payload = {
"amountInCents": 25000,
"description": "Fatura 2026-081",
"customer": {
"name": "Cliente Exemplo",
"email": "cliente@exemplo.com",
"documentType": "cpf",
"document": "01234567890",
"phone": "11900000000"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nasten.net/v1/boleto",
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([
'amountInCents' => 25000,
'description' => 'Fatura 2026-081',
'customer' => [
'name' => 'Cliente Exemplo',
'email' => 'cliente@exemplo.com',
'documentType' => 'cpf',
'document' => '01234567890',
'phone' => '11900000000'
]
]),
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.nasten.net/v1/boleto"
payload := strings.NewReader("{\n \"amountInCents\": 25000,\n \"description\": \"Fatura 2026-081\",\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"01234567890\",\n \"phone\": \"11900000000\"\n }\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.nasten.net/v1/boleto")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amountInCents\": 25000,\n \"description\": \"Fatura 2026-081\",\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"01234567890\",\n \"phone\": \"11900000000\"\n }\n}")
.asString();{
"success": true,
"message": "Transação criada com sucesso",
"data": {
"id": "clm8x9y0z1234567890abcdef",
"boleto": {
"url": "<string>",
"barcode": "<string>",
"digitableLine": "<string>",
"dueAt": "<string>"
},
"status": "pending",
"fees": 350
}
}{
"success": false,
"message": "Descrição do erro",
"code": "NST-400-3f7a",
"errors": [
{
"path": "customer.document",
"message": "Documento inválido"
}
]
}{
"success": false,
"message": "Token inválido ou expirado",
"code": "NST-401-rcp9"
}{
"success": false,
"error": "Forbidden",
"message": "Conta ainda não verificada. Conclua o cadastro e a verificação de identidade para vender.",
"reason": "company_not_verified",
"code": "NST-403-3f9a"
}{
"success": false,
"message": "Descrição do erro",
"code": "NST-400-3f7a"
}{
"success": false,
"message": "Descrição do erro",
"code": "NST-400-3f7a"
}{
"success": false,
"message": "Descrição do erro",
"code": "NST-400-3f7a",
"error": "Too Many Requests",
"retryAfterMs": 42000,
"limit": 1800,
"window": "1 minute"
}{
"success": false,
"message": "Internal server error",
"code": "NST-500-9e2b"
}Body
application/json

