import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.invoices.create({});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"status": "open",
"number": "<string>",
"description": "<string>",
"customer_name": "<string>",
"email_address": "<string>",
"due_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"amount": 123,
"currency": "<string>",
"paid_at": "<string>",
"price_variant": "<string>",
"customer": "<string>",
"order": "<string>"
}Creates a new invoice and sends it to the customer via email
import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.invoices.create({});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"status": "open",
"number": "<string>",
"description": "<string>",
"customer_name": "<string>",
"email_address": "<string>",
"due_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"amount": 123,
"currency": "<string>",
"paid_at": "<string>",
"price_variant": "<string>",
"customer": "<string>",
"order": "<string>"
}API key in the format: Bearer {api_token}
Invoice created
open, paid, past_due, void ID by default, full object when expanded
ID by default, full object when expanded
ID by default, full object when expanded
Was this page helpful?