Quickstart
1. Sign Up And Create Your First Entity
Sign up at app.spaceinvoices.com/signup.
New accounts create their first entity after signup. That entity becomes the business context for documents, customers, items, settings, and compliance rules.
If you are building for a single business, create one entity.
If you are building for a platform, your proof of concept can still start with one entity and expand later.
2. Generate a Sandbox Account Key
Go to Settings → API Keys in the app and generate a sandbox account key (sk_sandbox_*). Use this key on your server and replace YOUR_API_KEY in the initialization example.
Use a sandbox entity for this walkthrough. Copy its ID and replace YOUR_ENTITY_ID in the invoice example so the account key operates in that entity’s context.
See Authentication when choosing keys for your production integration.
3. Install The SDK
npm install @spaceinvoices/js-sdk
# or
bun add @spaceinvoices/js-sdk4. Initialize
import SpaceInvoices from "@spaceinvoices/js-sdk/sdk";
const _sdk = new SpaceInvoices("YOUR_API_KEY");5. Create Your First Invoice
const _invoice = await sdk.invoices.create({
customer: {
name: "Acme Corporation",
email: "billing@acme.com",
},
items: [
{
name: "Consulting",
quantity: 10,
price: 150,
},
],
}, { entity_id: "YOUR_ENTITY_ID" });6. Render Or Send It
// title: Render PDF
const pdf = await sdk.invoices.renderPdf(invoice.id);
// Save to file
fs.writeFileSync("invoice.pdf", pdf);
// Or send as response
res.setHeader("Content-Type", "application/pdf");
res.send(pdf);Or send directly to your customer:
// title: Send invoice
await sdk.email.sendEmail({
document_id: invoice.id,
to: invoice.customer.email,
subject: "Your invoice #{document_number}",
body_text: "Thank you for your business!",
});Done. You have proved the basic workflow: entity, key, document, and delivery.
What To Verify Before Going Live
- entity details and country are correct
- your key type matches your tenant model
- PDF rendering and invoice numbering look right
- any email or webhook behavior matches your product expectations
Next Steps
- Authentication — pick the right key model
- Invoices — full invoice lifecycle
- Multi-Tenancy — scale from one entity to many
- Choose Your Path — compare SDK and UI options