Upload the store's digital certificate and set NF-e numbering (Brazil)
curl --request POST \
--url https://api.cubbo.com/v1/store/digital-certificate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"certificate_base64": "<base64-encoded-pfx-file>",
"certificate_password": "<certificate-password>",
"invoice_series": 1,
"next_invoice_number": 4567
}
'import requests
url = "https://api.cubbo.com/v1/store/digital-certificate"
payload = {
"certificate_base64": "<base64-encoded-pfx-file>",
"certificate_password": "<certificate-password>",
"invoice_series": 1,
"next_invoice_number": 4567
}
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({
certificate_base64: '<base64-encoded-pfx-file>',
certificate_password: '<certificate-password>',
invoice_series: 1,
next_invoice_number: 4567
})
};
fetch('https://api.cubbo.com/v1/store/digital-certificate', 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.cubbo.com/v1/store/digital-certificate",
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([
'certificate_base64' => '<base64-encoded-pfx-file>',
'certificate_password' => '<certificate-password>',
'invoice_series' => 1,
'next_invoice_number' => 4567
]),
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.cubbo.com/v1/store/digital-certificate"
payload := strings.NewReader("{\n \"certificate_base64\": \"<base64-encoded-pfx-file>\",\n \"certificate_password\": \"<certificate-password>\",\n \"invoice_series\": 1,\n \"next_invoice_number\": 4567\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.cubbo.com/v1/store/digital-certificate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"certificate_base64\": \"<base64-encoded-pfx-file>\",\n \"certificate_password\": \"<certificate-password>\",\n \"invoice_series\": 1,\n \"next_invoice_number\": 4567\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/store/digital-certificate")
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 \"certificate_base64\": \"<base64-encoded-pfx-file>\",\n \"certificate_password\": \"<certificate-password>\",\n \"invoice_series\": 1,\n \"next_invoice_number\": 4567\n}"
response = http.request(request)
puts response.read_body{
"store_id": 4821,
"certificate": {
"status": "active",
"days_until_expiration": 365,
"expires_at": "2027-09-03",
"uploaded_at": "2026-09-03T14:10:03Z"
},
"invoice_numbering": {
"series": 1,
"next_number": 4567
}
}Stores
Upload the store's digital certificate and set NF-e numbering (Brazil)
Brazil only. Uploads the store’s A1 digital certificate (the .pfx/.p12 file used to
sign NF-e) and, in the same call, sets the NF-e series and the next invoice number. The
store is derived from the credential used to obtain the token; no store id is accepted.
Requires the fiscal account to exist already (POST /store/fiscal-account).
- Every call overwrites the store’s NF-e counter.
next_invoice_numbermust be the number of the next NF-e the store will actually issue, not the last one used and not1for a store that has already issued invoices. Reusing a number makes the tax authority reject the following invoices as duplicates. invoice_seriesandnext_invoice_numberare accepted as strings or integers and are parsed in base 10, so zero-padded values such as"089"are read as 89.- The certificate and its password are never returned or logged.
- After upload, the certificate validity is read back on a best-effort basis; if it
cannot be read,
statusisactiveanddays_until_expiration/expires_atare null.
POST
/
store
/
digital-certificate
Upload the store's digital certificate and set NF-e numbering (Brazil)
curl --request POST \
--url https://api.cubbo.com/v1/store/digital-certificate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"certificate_base64": "<base64-encoded-pfx-file>",
"certificate_password": "<certificate-password>",
"invoice_series": 1,
"next_invoice_number": 4567
}
'import requests
url = "https://api.cubbo.com/v1/store/digital-certificate"
payload = {
"certificate_base64": "<base64-encoded-pfx-file>",
"certificate_password": "<certificate-password>",
"invoice_series": 1,
"next_invoice_number": 4567
}
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({
certificate_base64: '<base64-encoded-pfx-file>',
certificate_password: '<certificate-password>',
invoice_series: 1,
next_invoice_number: 4567
})
};
fetch('https://api.cubbo.com/v1/store/digital-certificate', 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.cubbo.com/v1/store/digital-certificate",
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([
'certificate_base64' => '<base64-encoded-pfx-file>',
'certificate_password' => '<certificate-password>',
'invoice_series' => 1,
'next_invoice_number' => 4567
]),
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.cubbo.com/v1/store/digital-certificate"
payload := strings.NewReader("{\n \"certificate_base64\": \"<base64-encoded-pfx-file>\",\n \"certificate_password\": \"<certificate-password>\",\n \"invoice_series\": 1,\n \"next_invoice_number\": 4567\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.cubbo.com/v1/store/digital-certificate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"certificate_base64\": \"<base64-encoded-pfx-file>\",\n \"certificate_password\": \"<certificate-password>\",\n \"invoice_series\": 1,\n \"next_invoice_number\": 4567\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/store/digital-certificate")
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 \"certificate_base64\": \"<base64-encoded-pfx-file>\",\n \"certificate_password\": \"<certificate-password>\",\n \"invoice_series\": 1,\n \"next_invoice_number\": 4567\n}"
response = http.request(request)
puts response.read_body{
"store_id": 4821,
"certificate": {
"status": "active",
"days_until_expiration": 365,
"expires_at": "2027-09-03",
"uploaded_at": "2026-09-03T14:10:03Z"
},
"invoice_numbering": {
"series": 1,
"next_number": 4567
}
}Authorizations
Body
application/json