We use cookies and similar technologies, including Google Analytics and the Meta Pixel, to improve your experience, measure site traffic and understand signup campaigns. By clicking "Accept", you agree to this use.

Learn more about our privacy practices
Português

SDKs

Official libraries for Node.js, Python, Go, PHP, Ruby, Rust, Java, Elixir and .NET.

Arquivix Notas has official SDKs in nine languages. They call the same API this documentation describes, with the same operations, field names and tax rules, so every guide here applies to all of them.

Install

LanguagePackageInstallSource
Node.js / TypeScriptarquivix-notas-node (npm)npm install arquivix-notas-nodechapzin/arquivix-notas-node
Pythonarquivix-notas (PyPI)pip install arquivix-notaschapzin/arquivix-notas-python
Gogithub.com/chapzin/arquivix-notas-go (Go modules)go get github.com/chapzin/arquivix-notas-gochapzin/arquivix-notas-go
PHPchapzin/arquivix-notas (Packagist)composer require chapzin/arquivix-notaschapzin/arquivix-notas-php
Rubyarquivix-notas (RubyGems)gem install arquivix-notaschapzin/arquivix-notas-ruby
Rustarquivix-notas (crates.io)cargo add arquivix-notaschapzin/arquivix-notas-rust
Javacom.arquivix.notas:arquivix-notas (Maven Central)implementation("com.arquivix.notas:arquivix-notas:0.3.0")chapzin/arquivix-notas-java
Elixirarquivix_notas (Hex){:arquivix_notas, "~> 0.3"}chapzin/arquivix-notas-elixir
.NETArquivix.Nfse (NuGet)dotnet add package Arquivix.Nfsechapzin/arquivix-notas-dotnet

What every SDK does

  • Authenticates with X-API-Key. It reads ARQUIVIX_API_KEY, and ARQUIVIX_BASE_URL if you use a different API URL.
  • The key decides the environment: arquivix_test_... for test and arquivix_live_... for live.
  • Errors come back as a typed result with code, status, requestId, details and retryAfter, not as an exception. The iterate helpers raise when a page fails.
  • Lists are cursor-paginated, and every SDK has an iterate helper that walks all pages.
  • Creating an invoice and sending an email accept an idempotency key, sent as Idempotency-Key.
  • Webhook signature verification (X-Arquivix-Signature) in constant time.

Issue an invoice

The same call in each language. Each example reads the key from ARQUIVIX_API_KEY and passes an idempotency key, so repeating the call never issues the invoice twice.

Node.js / TypeScript

import { Arquivix } from "arquivix-notas-node";

const arquivix = new Arquivix(); // reads ARQUIVIX_API_KEY

const { data: invoice, error } = await arquivix.invoices.create(
  {
    companyTaxId: "11222333000181",
    service: { description: "Consultoria" },
    amount: 450,
    competenceDate: "2026-10-16",
  },
  { idempotencyKey: "order-42" },
);

Python

from arquivix_notas import Arquivix

async with Arquivix() as arquivix:  # reads ARQUIVIX_API_KEY
    invoice, error = await arquivix.invoices.create(
        {
            "companyTaxId": "11222333000181",
            "service": {"description": "Consultoria"},
            "amount": 450,
            "competenceDate": "2026-10-16",
        },
        idempotency_key="order-42",
    )

Go

client := arquivixnfse.NewClient(arquivixnfse.Options{}) // reads ARQUIVIX_API_KEY

invoice, err := client.Invoices.Create(ctx, arquivixnfse.InvoiceCreateParams{
	CompanyTaxID:   "11222333000181",
	Service:        arquivixnfse.InvoiceServiceInput{Description: "Consultoria"},
	Amount:         450,
	CompetenceDate: "2026-10-16",
}, "order-42")

PHP

$arquivix = new \ArquivixNotas\Client(); // reads ARQUIVIX_API_KEY

$result = $arquivix->invoices->create([
    'companyTaxId' => '11222333000181',
    'service' => ['description' => 'Consultoria'],
    'amount' => 450,
    'competenceDate' => '2026-10-16',
], idempotencyKey: 'order-42');

Ruby

client = ArquivixNotas::Client.new # reads ARQUIVIX_API_KEY

invoice, error = client.invoices.create(
  {
    companyTaxId: "11222333000181",
    service: { description: "Consultoria" },
    amount: 450,
    competenceDate: "2026-10-16"
  },
  idempotency_key: "order-42"
)

Rust

let arquivix = Arquivix::from_env()?; // reads ARQUIVIX_API_KEY

let invoice = arquivix
    .invoices()
    .create(
        &InvoiceCreateParams {
            company_tax_id: Some("11222333000181".into()),
            service: InvoiceServiceInput {
                description: Some("Consultoria".into()),
                ..Default::default()
            },
            amount: 450.0,
            competence_date: "2026-10-16".into(),
            ..Default::default()
        },
        Some("order-42"),
    )
    .await?;

Java

Arquivix arquivix = Arquivix.builder().build(); // reads ARQUIVIX_API_KEY

InvoiceCreateParams params = InvoiceCreateParams.of(
        null,
        InvoiceCreateParams.Service.ofDescription("Consultoria"),
        450.0,
        "2026-10-16")
    .withCompanyTaxId("11222333000181");

Result<Invoice> invoice = arquivix.invoices().create(params, "order-42").join();

Elixir

client = ArquivixNotas.new() # reads ARQUIVIX_API_KEY

{:ok, invoice} =
  ArquivixNotas.Resources.Invoices.create(
    client,
    %{
      "companyTaxId" => "11222333000181",
      "service" => %{"description" => "Consultoria"},
      "amount" => 450,
      "competenceDate" => "2026-10-16"
    },
    idempotency_key: "order-42"
  )

.NET

using var client = new ArquivixClient(); // reads ARQUIVIX_API_KEY

var invoice = await client.Invoices.CreateAsync(
    new InvoiceCreateParams
    {
        CompanyTaxId = "11222333000181",
        Service = new InvoiceServiceInput { Description = "Consultoria" },
        Amount = 450m,
        CompetenceDate = "2026-10-16",
    },
    idempotencyKey: "order-42");

Changing plans and the billing portal exist only in the dashboard, so they are not in the SDKs. The source of every SDK is in github.com/chapzin.