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
Attribute | Description |
---|---|
items | An 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
Attribute | Description |
---|---|
id | An invoice's id |
status | The status of an invoice |
totalVcuAmount | How many VCUs are being dealt in this invoice |
totalPrice | The amount of currency being dealt in this invoice, in the currency specified below |
currency | The currency being dealt with in this invoice |
customerId | The Id of the customer that owns the invoice |
createdAt | Date created |
paidAt | Date it was paid |
dueDate | Due 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": []
}