Skip to main content

Invoices

Invoices can be generated by purchasing VCU credits with a credit card or invoicing open (issued) orders, in which case the invoice can be paid by bank slip or wire transfer.

Invoices [GET]

BASE URL
https://api-b2b-hml.carbonext.com.br/v1/invoices

This request returns a paginated list of invoices.

Response Attributes

AttributeDescription
itemsAn object containing all invoices related to the customer id

Example Request

var axios = require('axios');
var config = {
method: 'get',
url: 'https://api-b2b-hml.carbonext.com.br/v1/invoices?page=1&page-size=10',
headers: {
'Authorization': 'Bearer <access_token>'
}
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});

Example Response

{
"items": [
{
"id": "2665d551-f8d2-4c16-8712-bee1390ef274",
"status": "Paid",
"totalVcuAmount": 100.0,
"totalPrice": 11000.00,
"currency": "BRL",
"customerId": "520732d9-e2a0-4d27-aea3-fa7f0cba7390",
"createdAt": "2023-03-03T17:52:38.695502",
"paidAt": "2023-03-03T17:52:41.087552",
"dueDate": "2023-03-13T17:52:38.675653",
"paymentType": "creditCard",
"generatesRetirement": true,
"invoiceUploadUrl": "https://carbonext-b2b.s3.amazonaws.com/invoices",
"paymentMethodId": "pm_1MhcmWJRcnwkuWspCNCqM0FG",
"netSuiteIntegrationId": "31030",
"purchaseType": "prePaid",
"paymentData": [],
"orders": [],
"customer": {}
}
]
}

Invoice [GET]

BASE URL
https://api-b2b-hml.carbonext.com.br/v1/invoices/:id

This request will return information about a specific invoice.

Response Attributes

AttributeDescription
idAn invoice's id
statusThe status of an invoice
totalVcuAmountHow many VCUs are being dealt in this invoice
totalPriceThe amount of currency being dealt in this invoice, in the currency specified below
currencyThe currency being dealt with in this invoice
customerIdThe Id of the customer that owns the invoice
createdAtDate created
paidAtDate it was paid
dueDateDue date

Example Request

var axios = require('axios');

var config = {
method: 'get',
url: 'https://api-b2b-hml.carbonext.com.br/v1/invoices/:id',
headers: {
'Authorization': 'Bearer <access_token>'
}
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
PATH VARIABLES
id: 24882adc-d020-4e5a-ac26-36c12d24c507

Example Response

{
"id": "b8a6c960-c21c-46fe-a2e9-1816217c3fa6",
"status": "Paid",
"totalVcuAmount": 1.0,
"totalPrice": 110.00,
"currency": "BRL",
"customerId": "b377ea40-4563-46cf-8f7f-d15f15b8772d",
"createdAt": "2023-03-02T17:33:22.292083",
"paidAt": "2023-03-02T17:33:24.837946",
"dueDate": "2023-03-12T17:33:22.287299",
"paymentType": "creditCard",
"generatesRetirement": true,
"invoiceUploadUrl": "https://carbonext-b2b.s3.amazonaws.com/invoices",
"paymentMethodId": "pm_1MhG0KJRcnwkuWspxFMi2UtO",
"netSuiteIntegrationId": "29630",
"purchaseType": "prePaid",
"paymentData": [],
"orders": []
}