curl --request GET \
--url https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoicesimport requests
url = "https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices', 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.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "0b7c2a44-6f1e-4d3b-9a8e-5c2f1d0e9b7a",
"realm": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organization": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"deal": "3b9f6d2e-1a4c-4e8b-9f7a-6c5d4e3b2a1f",
"previousInvoiceId": "",
"dealName": "Mensalidade Plano Pro",
"description": "Mensalidade Plano Pro - 1/12",
"allowedPaymentMethods": [
"PIX_AUTOMATIC"
],
"invoiceNumber": 1,
"closingAt": "2026-10-01T00:00:00.000Z",
"dueAt": "2026-10-10T00:00:00.000Z",
"expiresAt": "2026-11-10T00:00:00.000Z",
"amount": 15000,
"status": "CLOSED",
"displayStatus": "SCHEDULED",
"paymentStatus": "NONE",
"paymentsAttempts": 0,
"external": {
"b3BankSlip": "4c9e2f1a-7b3d-4e5f-8a6b-0c1d2e3f4a5b",
"b3Pix": "6d1a3b5c-8e2f-4a7b-9c0d-1e2f3a4b5c6d"
},
"debitParties": [
{
"partyAccount": {
"name": "Maria Silva",
"document": "11144477735",
"email": "maria.silva@exemplo.com.br",
"address": {
"street": "Rua das Flores",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"postalCode": "01310-100",
"complement": "Sala 4"
},
"bank": "P3",
"type": "WALLET",
"identifier": {
"realm": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organization": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"account": "2a7d9c4e-5b1f-4e3a-8c6d-9f0e1a2b3c4d",
"wallet": "8e1f2a3b-4c5d-4e6f-9a0b-1c2d3e4f5a6b"
}
},
"unit": "PERCENTAGE",
"amount": 100
}
],
"createdBy": "BILLING:DEAL:3b9f6d2e-1a4c-4e8b-9f7a-6c5d4e3b2a1f",
"updatedBy": "BILLING:DEAL:3b9f6d2e-1a4c-4e8b-9f7a-6c5d4e3b2a1f",
"createdAt": "2026-09-01T00:00:00.000Z",
"updatedAt": "2026-09-01T00:00:00.000Z",
"chargeType": "RECURRENT",
"totalInstallments": 12,
"customer": {
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"name": "Maria Silva"
},
"contract": "7e4c2a1b-6d5f-4b3a-9e8d-2f1c0b9a8e7d",
"paidAt": "2026-10-08T14:32:11.000Z",
"fine": {
"amountType": "PERCENT",
"amount": 2
},
"interest": {
"amountType": "PERCENT",
"amount": 2
},
"discount": {
"amountType": "PERCENT",
"amount": 2
},
"creditParties": [
{
"partyAccount": {
"name": "Empresa Exemplo Ltda",
"bank": "P3",
"type": "WALLET",
"identifier": {
"realm": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organization": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"account": "2a7d9c4e-5b1f-4e3a-8c6d-9f0e1a2b3c4d",
"wallet": "8e1f2a3b-4c5d-4e6f-9a0b-1c2d3e4f5a6b"
},
"document": "12345678000195",
"email": "financeiro@empresaexemplo.com.br"
},
"unit": "PERCENTAGE",
"amount": 100
}
],
"scheduled": true,
"pixInitiationStatement": {
"status": "SCHEDULED",
"error": {
"code": "PAYMENT_REJECTED",
"detail": "Saldo insuficiente na conta do pagador.",
"description": "O pagamento foi recusado pela instituição do pagador."
}
}
}
],
"next": "NjcxMWI0YzBkOGUxYTMwMDEyYjdjOWYy"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "INSUFFICIENT_PERMISSIONS",
"origin": "BILLING",
"message": "insufficient permissions"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "BILLING",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "description",
"message": "Too big: expected string to have <=250 characters",
"code": "DESCRIPTION_MAX"
}
]
}Deprecated — List a deal's invoices
Deprecated: use GET .../deals/{dealId}/invoices; contracts are being removed.
curl --request GET \
--url https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoicesimport requests
url = "https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices', 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.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.billing.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "0b7c2a44-6f1e-4d3b-9a8e-5c2f1d0e9b7a",
"realm": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organization": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"deal": "3b9f6d2e-1a4c-4e8b-9f7a-6c5d4e3b2a1f",
"previousInvoiceId": "",
"dealName": "Mensalidade Plano Pro",
"description": "Mensalidade Plano Pro - 1/12",
"allowedPaymentMethods": [
"PIX_AUTOMATIC"
],
"invoiceNumber": 1,
"closingAt": "2026-10-01T00:00:00.000Z",
"dueAt": "2026-10-10T00:00:00.000Z",
"expiresAt": "2026-11-10T00:00:00.000Z",
"amount": 15000,
"status": "CLOSED",
"displayStatus": "SCHEDULED",
"paymentStatus": "NONE",
"paymentsAttempts": 0,
"external": {
"b3BankSlip": "4c9e2f1a-7b3d-4e5f-8a6b-0c1d2e3f4a5b",
"b3Pix": "6d1a3b5c-8e2f-4a7b-9c0d-1e2f3a4b5c6d"
},
"debitParties": [
{
"partyAccount": {
"name": "Maria Silva",
"document": "11144477735",
"email": "maria.silva@exemplo.com.br",
"address": {
"street": "Rua das Flores",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"postalCode": "01310-100",
"complement": "Sala 4"
},
"bank": "P3",
"type": "WALLET",
"identifier": {
"realm": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organization": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"account": "2a7d9c4e-5b1f-4e3a-8c6d-9f0e1a2b3c4d",
"wallet": "8e1f2a3b-4c5d-4e6f-9a0b-1c2d3e4f5a6b"
}
},
"unit": "PERCENTAGE",
"amount": 100
}
],
"createdBy": "BILLING:DEAL:3b9f6d2e-1a4c-4e8b-9f7a-6c5d4e3b2a1f",
"updatedBy": "BILLING:DEAL:3b9f6d2e-1a4c-4e8b-9f7a-6c5d4e3b2a1f",
"createdAt": "2026-09-01T00:00:00.000Z",
"updatedAt": "2026-09-01T00:00:00.000Z",
"chargeType": "RECURRENT",
"totalInstallments": 12,
"customer": {
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"name": "Maria Silva"
},
"contract": "7e4c2a1b-6d5f-4b3a-9e8d-2f1c0b9a8e7d",
"paidAt": "2026-10-08T14:32:11.000Z",
"fine": {
"amountType": "PERCENT",
"amount": 2
},
"interest": {
"amountType": "PERCENT",
"amount": 2
},
"discount": {
"amountType": "PERCENT",
"amount": 2
},
"creditParties": [
{
"partyAccount": {
"name": "Empresa Exemplo Ltda",
"bank": "P3",
"type": "WALLET",
"identifier": {
"realm": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organization": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"account": "2a7d9c4e-5b1f-4e3a-8c6d-9f0e1a2b3c4d",
"wallet": "8e1f2a3b-4c5d-4e6f-9a0b-1c2d3e4f5a6b"
},
"document": "12345678000195",
"email": "financeiro@empresaexemplo.com.br"
},
"unit": "PERCENTAGE",
"amount": 100
}
],
"scheduled": true,
"pixInitiationStatement": {
"status": "SCHEDULED",
"error": {
"code": "PAYMENT_REJECTED",
"detail": "Saldo insuficiente na conta do pagador.",
"description": "O pagamento foi recusado pela instituição do pagador."
}
}
}
],
"next": "NjcxMWI0YzBkOGUxYTMwMDEyYjdjOWYy"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "INSUFFICIENT_PERMISSIONS",
"origin": "BILLING",
"message": "insufficient permissions"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "BILLING",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "description",
"message": "Too big: expected string to have <=250 characters",
"code": "DESCRIPTION_MAX"
}
]
}GET .../invoices, narrowed to the deal. A deal ID that matches no deal of the contract answers an empty list.
Any member of the organization, or an admin of the realm, can list them.Path Parameters
ID of your realm.
Format: UUID
ID of your organization: the one that issues the invoices.
Format: UUID
ID of the deal's contract.
Format: UUID
ID of the deal whose invoices you list. An ID that matches no deal of the contract answers an empty list.
Format: UUID
Query Parameters
Only invoices in these stored statuses (OPEN, CLOSED, PAID, CANCELED). Repeat the parameter or separate values with commas.
Example (comma-separated list): ?status=CLOSED,PAID
OPEN, CLOSED, PAID, CANCELED Only invoices whose payer (the debit party) has one of these CPF/CNPJ documents, digits only (exact match).
Example (comma-separated list): ?debitPartyDocuments=11144477735,39053344705
32Only invoices whose payer (the debit party) pays from a Portão 3 wallet of one of these organizations. It matches the organization of the payer's wallet, so a payer with no wallet (a customer who pays by boleto or PIX, for example) is not found by it: filter by debitPartyDocuments instead.
Format: UUID
Example: ?debitPartyOrgIds=5e0a1c2b-3d4f-4a6b-8c9d-0e1f2a3b4c5d
Only invoices whose deal has one of these charge types (SINGLE, RECURRENT, SUBSCRIPTION).
Example: ?chargeType=SINGLE
SINGLE, RECURRENT, SUBSCRIPTION Only invoices whose name contains this text (case-insensitive).
250Only invoices due on or after this moment, inclusive (ISO 8601 date or date-time).
Only invoices due on or before this moment, inclusive (ISO 8601 date or date-time).
VENDOR (default): the invoices your organization issues. BUYER: the invoices your organization pays.
VENDOR, BUYER Sort direction. Case-insensitive.
ASC, DESC Field to sort the invoices by.
createdAt, dueAt, closingAt, description, status, amount, invoiceNumber Page size.
1 <= x <= 1000Cursor returned as next by the previous page; it must be valid base64. Omit it for the first page. Use it with the same filters and order.
128^[A-Za-z0-9+/]+={0,2}$