Crear una nueva factura
curl --request POST \
--url https://api.fint.app/api/v1/invoice \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"date": "<string>",
"expirationDate": "<string>",
"contactId": 123,
"description": "<string>",
"totalAmount": 123,
"externalReference": "<string>",
"sendEmail": true,
"items": [
{
"itemId": 123,
"quantity": 1
}
],
"itemGroups": [
{
"itemGroupId": 123,
"selectedItems": [
{
"itemId": 123,
"quantity": 1
}
]
}
],
"customItems": [
{
"name": "<string>",
"amount": 123,
"quantity": 123,
"description": "<string>",
"details": {
"source": "item",
"discountItemId": 123,
"amountType": "<string>",
"configuredAmount": 123,
"condition": "<string>",
"conditionItems": [
{
"id": 123
}
],
"baseAmount": 123,
"appliedAmount": 123,
"maxDiscountAmount": 123,
"cartItems": [
{
"itemId": 123,
"totalAmount": 123
}
],
"breakdown": [
{
"itemId": 123,
"discountAmount": 123
}
]
}
}
]
}
'import requests
url = "https://api.fint.app/api/v1/invoice"
payload = {
"date": "<string>",
"expirationDate": "<string>",
"contactId": 123,
"description": "<string>",
"totalAmount": 123,
"externalReference": "<string>",
"sendEmail": True,
"items": [
{
"itemId": 123,
"quantity": 1
}
],
"itemGroups": [
{
"itemGroupId": 123,
"selectedItems": [
{
"itemId": 123,
"quantity": 1
}
]
}
],
"customItems": [
{
"name": "<string>",
"amount": 123,
"quantity": 123,
"description": "<string>",
"details": {
"source": "item",
"discountItemId": 123,
"amountType": "<string>",
"configuredAmount": 123,
"condition": "<string>",
"conditionItems": [{ "id": 123 }],
"baseAmount": 123,
"appliedAmount": 123,
"maxDiscountAmount": 123,
"cartItems": [
{
"itemId": 123,
"totalAmount": 123
}
],
"breakdown": [
{
"itemId": 123,
"discountAmount": 123
}
]
}
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '<string>',
expirationDate: '<string>',
contactId: 123,
description: '<string>',
totalAmount: 123,
externalReference: '<string>',
sendEmail: true,
items: [{itemId: 123, quantity: 1}],
itemGroups: [{itemGroupId: 123, selectedItems: [{itemId: 123, quantity: 1}]}],
customItems: [
{
name: '<string>',
amount: 123,
quantity: 123,
description: '<string>',
details: {
source: 'item',
discountItemId: 123,
amountType: '<string>',
configuredAmount: 123,
condition: '<string>',
conditionItems: [{id: 123}],
baseAmount: 123,
appliedAmount: 123,
maxDiscountAmount: 123,
cartItems: [{itemId: 123, totalAmount: 123}],
breakdown: [{itemId: 123, discountAmount: 123}]
}
}
]
})
};
fetch('https://api.fint.app/api/v1/invoice', 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.fint.app/api/v1/invoice",
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([
'date' => '<string>',
'expirationDate' => '<string>',
'contactId' => 123,
'description' => '<string>',
'totalAmount' => 123,
'externalReference' => '<string>',
'sendEmail' => true,
'items' => [
[
'itemId' => 123,
'quantity' => 1
]
],
'itemGroups' => [
[
'itemGroupId' => 123,
'selectedItems' => [
[
'itemId' => 123,
'quantity' => 1
]
]
]
],
'customItems' => [
[
'name' => '<string>',
'amount' => 123,
'quantity' => 123,
'description' => '<string>',
'details' => [
'source' => 'item',
'discountItemId' => 123,
'amountType' => '<string>',
'configuredAmount' => 123,
'condition' => '<string>',
'conditionItems' => [
[
'id' => 123
]
],
'baseAmount' => 123,
'appliedAmount' => 123,
'maxDiscountAmount' => 123,
'cartItems' => [
[
'itemId' => 123,
'totalAmount' => 123
]
],
'breakdown' => [
[
'itemId' => 123,
'discountAmount' => 123
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.fint.app/api/v1/invoice"
payload := strings.NewReader("{\n \"date\": \"<string>\",\n \"expirationDate\": \"<string>\",\n \"contactId\": 123,\n \"description\": \"<string>\",\n \"totalAmount\": 123,\n \"externalReference\": \"<string>\",\n \"sendEmail\": true,\n \"items\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ],\n \"itemGroups\": [\n {\n \"itemGroupId\": 123,\n \"selectedItems\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"customItems\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"details\": {\n \"source\": \"item\",\n \"discountItemId\": 123,\n \"amountType\": \"<string>\",\n \"configuredAmount\": 123,\n \"condition\": \"<string>\",\n \"conditionItems\": [\n {\n \"id\": 123\n }\n ],\n \"baseAmount\": 123,\n \"appliedAmount\": 123,\n \"maxDiscountAmount\": 123,\n \"cartItems\": [\n {\n \"itemId\": 123,\n \"totalAmount\": 123\n }\n ],\n \"breakdown\": [\n {\n \"itemId\": 123,\n \"discountAmount\": 123\n }\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.fint.app/api/v1/invoice")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"<string>\",\n \"expirationDate\": \"<string>\",\n \"contactId\": 123,\n \"description\": \"<string>\",\n \"totalAmount\": 123,\n \"externalReference\": \"<string>\",\n \"sendEmail\": true,\n \"items\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ],\n \"itemGroups\": [\n {\n \"itemGroupId\": 123,\n \"selectedItems\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"customItems\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"details\": {\n \"source\": \"item\",\n \"discountItemId\": 123,\n \"amountType\": \"<string>\",\n \"configuredAmount\": 123,\n \"condition\": \"<string>\",\n \"conditionItems\": [\n {\n \"id\": 123\n }\n ],\n \"baseAmount\": 123,\n \"appliedAmount\": 123,\n \"maxDiscountAmount\": 123,\n \"cartItems\": [\n {\n \"itemId\": 123,\n \"totalAmount\": 123\n }\n ],\n \"breakdown\": [\n {\n \"itemId\": 123,\n \"discountAmount\": 123\n }\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fint.app/api/v1/invoice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"<string>\",\n \"expirationDate\": \"<string>\",\n \"contactId\": 123,\n \"description\": \"<string>\",\n \"totalAmount\": 123,\n \"externalReference\": \"<string>\",\n \"sendEmail\": true,\n \"items\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ],\n \"itemGroups\": [\n {\n \"itemGroupId\": 123,\n \"selectedItems\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"customItems\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"details\": {\n \"source\": \"item\",\n \"discountItemId\": 123,\n \"amountType\": \"<string>\",\n \"configuredAmount\": 123,\n \"condition\": \"<string>\",\n \"conditionItems\": [\n {\n \"id\": 123\n }\n ],\n \"baseAmount\": 123,\n \"appliedAmount\": 123,\n \"maxDiscountAmount\": 123,\n \"cartItems\": [\n {\n \"itemId\": 123,\n \"totalAmount\": 123\n }\n ],\n \"breakdown\": [\n {\n \"itemId\": 123,\n \"discountAmount\": 123\n }\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"invoiceId": 123,
"contactId": 123
}{
"message": "<string>"
}{
"message": "<string>"
}Facturas
Crear una nueva factura
Crear una nueva factura con la posibilidad de crear un contacto nuevo o usar uno existente
POST
/
invoice
Crear una nueva factura
curl --request POST \
--url https://api.fint.app/api/v1/invoice \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"date": "<string>",
"expirationDate": "<string>",
"contactId": 123,
"description": "<string>",
"totalAmount": 123,
"externalReference": "<string>",
"sendEmail": true,
"items": [
{
"itemId": 123,
"quantity": 1
}
],
"itemGroups": [
{
"itemGroupId": 123,
"selectedItems": [
{
"itemId": 123,
"quantity": 1
}
]
}
],
"customItems": [
{
"name": "<string>",
"amount": 123,
"quantity": 123,
"description": "<string>",
"details": {
"source": "item",
"discountItemId": 123,
"amountType": "<string>",
"configuredAmount": 123,
"condition": "<string>",
"conditionItems": [
{
"id": 123
}
],
"baseAmount": 123,
"appliedAmount": 123,
"maxDiscountAmount": 123,
"cartItems": [
{
"itemId": 123,
"totalAmount": 123
}
],
"breakdown": [
{
"itemId": 123,
"discountAmount": 123
}
]
}
}
]
}
'import requests
url = "https://api.fint.app/api/v1/invoice"
payload = {
"date": "<string>",
"expirationDate": "<string>",
"contactId": 123,
"description": "<string>",
"totalAmount": 123,
"externalReference": "<string>",
"sendEmail": True,
"items": [
{
"itemId": 123,
"quantity": 1
}
],
"itemGroups": [
{
"itemGroupId": 123,
"selectedItems": [
{
"itemId": 123,
"quantity": 1
}
]
}
],
"customItems": [
{
"name": "<string>",
"amount": 123,
"quantity": 123,
"description": "<string>",
"details": {
"source": "item",
"discountItemId": 123,
"amountType": "<string>",
"configuredAmount": 123,
"condition": "<string>",
"conditionItems": [{ "id": 123 }],
"baseAmount": 123,
"appliedAmount": 123,
"maxDiscountAmount": 123,
"cartItems": [
{
"itemId": 123,
"totalAmount": 123
}
],
"breakdown": [
{
"itemId": 123,
"discountAmount": 123
}
]
}
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '<string>',
expirationDate: '<string>',
contactId: 123,
description: '<string>',
totalAmount: 123,
externalReference: '<string>',
sendEmail: true,
items: [{itemId: 123, quantity: 1}],
itemGroups: [{itemGroupId: 123, selectedItems: [{itemId: 123, quantity: 1}]}],
customItems: [
{
name: '<string>',
amount: 123,
quantity: 123,
description: '<string>',
details: {
source: 'item',
discountItemId: 123,
amountType: '<string>',
configuredAmount: 123,
condition: '<string>',
conditionItems: [{id: 123}],
baseAmount: 123,
appliedAmount: 123,
maxDiscountAmount: 123,
cartItems: [{itemId: 123, totalAmount: 123}],
breakdown: [{itemId: 123, discountAmount: 123}]
}
}
]
})
};
fetch('https://api.fint.app/api/v1/invoice', 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.fint.app/api/v1/invoice",
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([
'date' => '<string>',
'expirationDate' => '<string>',
'contactId' => 123,
'description' => '<string>',
'totalAmount' => 123,
'externalReference' => '<string>',
'sendEmail' => true,
'items' => [
[
'itemId' => 123,
'quantity' => 1
]
],
'itemGroups' => [
[
'itemGroupId' => 123,
'selectedItems' => [
[
'itemId' => 123,
'quantity' => 1
]
]
]
],
'customItems' => [
[
'name' => '<string>',
'amount' => 123,
'quantity' => 123,
'description' => '<string>',
'details' => [
'source' => 'item',
'discountItemId' => 123,
'amountType' => '<string>',
'configuredAmount' => 123,
'condition' => '<string>',
'conditionItems' => [
[
'id' => 123
]
],
'baseAmount' => 123,
'appliedAmount' => 123,
'maxDiscountAmount' => 123,
'cartItems' => [
[
'itemId' => 123,
'totalAmount' => 123
]
],
'breakdown' => [
[
'itemId' => 123,
'discountAmount' => 123
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.fint.app/api/v1/invoice"
payload := strings.NewReader("{\n \"date\": \"<string>\",\n \"expirationDate\": \"<string>\",\n \"contactId\": 123,\n \"description\": \"<string>\",\n \"totalAmount\": 123,\n \"externalReference\": \"<string>\",\n \"sendEmail\": true,\n \"items\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ],\n \"itemGroups\": [\n {\n \"itemGroupId\": 123,\n \"selectedItems\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"customItems\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"details\": {\n \"source\": \"item\",\n \"discountItemId\": 123,\n \"amountType\": \"<string>\",\n \"configuredAmount\": 123,\n \"condition\": \"<string>\",\n \"conditionItems\": [\n {\n \"id\": 123\n }\n ],\n \"baseAmount\": 123,\n \"appliedAmount\": 123,\n \"maxDiscountAmount\": 123,\n \"cartItems\": [\n {\n \"itemId\": 123,\n \"totalAmount\": 123\n }\n ],\n \"breakdown\": [\n {\n \"itemId\": 123,\n \"discountAmount\": 123\n }\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.fint.app/api/v1/invoice")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"<string>\",\n \"expirationDate\": \"<string>\",\n \"contactId\": 123,\n \"description\": \"<string>\",\n \"totalAmount\": 123,\n \"externalReference\": \"<string>\",\n \"sendEmail\": true,\n \"items\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ],\n \"itemGroups\": [\n {\n \"itemGroupId\": 123,\n \"selectedItems\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"customItems\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"details\": {\n \"source\": \"item\",\n \"discountItemId\": 123,\n \"amountType\": \"<string>\",\n \"configuredAmount\": 123,\n \"condition\": \"<string>\",\n \"conditionItems\": [\n {\n \"id\": 123\n }\n ],\n \"baseAmount\": 123,\n \"appliedAmount\": 123,\n \"maxDiscountAmount\": 123,\n \"cartItems\": [\n {\n \"itemId\": 123,\n \"totalAmount\": 123\n }\n ],\n \"breakdown\": [\n {\n \"itemId\": 123,\n \"discountAmount\": 123\n }\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fint.app/api/v1/invoice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"<string>\",\n \"expirationDate\": \"<string>\",\n \"contactId\": 123,\n \"description\": \"<string>\",\n \"totalAmount\": 123,\n \"externalReference\": \"<string>\",\n \"sendEmail\": true,\n \"items\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ],\n \"itemGroups\": [\n {\n \"itemGroupId\": 123,\n \"selectedItems\": [\n {\n \"itemId\": 123,\n \"quantity\": 1\n }\n ]\n }\n ],\n \"customItems\": [\n {\n \"name\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"description\": \"<string>\",\n \"details\": {\n \"source\": \"item\",\n \"discountItemId\": 123,\n \"amountType\": \"<string>\",\n \"configuredAmount\": 123,\n \"condition\": \"<string>\",\n \"conditionItems\": [\n {\n \"id\": 123\n }\n ],\n \"baseAmount\": 123,\n \"appliedAmount\": 123,\n \"maxDiscountAmount\": 123,\n \"cartItems\": [\n {\n \"itemId\": 123,\n \"totalAmount\": 123\n }\n ],\n \"breakdown\": [\n {\n \"itemId\": 123,\n \"discountAmount\": 123\n }\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"invoiceId": 123,
"contactId": 123
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
Monto total de la factura, si se envia items el monto va a ser ignorado
Show child attributes
Show child attributes
Envía email a los pagadores del contacto con acceso al portal para que page la factura.
Items de tipo subscription (one_time) o settlement (condition: none). Todos los items deben tener el mismo useCase. Si items esta presente el totalAmount va a ser autocalculado.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I