Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. API & Developers
  6. /
  7. Api Billing
GUIDEAPI & Developers

Billing API — Invoices & Payments

3 min read

The Billing API provides programmatic access to your invoicing, payment, and subscription data. Use it to build custom billing dashboards, automate payment monitoring, and integrate Data Mammoth billing with your accounting systems.

Base URL

text
https://api.datamammoth.com/v1/billing

List Invoices

Retrieve all invoices for your account.

bash
GET /v1/billing/invoices

Query Parameters:

ParameterTypeDescription
statusstringFilter: paid, unpaid, overdue, cancelled
date_fromstringStart date (ISO 8601 format)
date_tostringEnd date (ISO 8601 format)
pageintegerPage number
per_pageintegerResults per page
Example:

bash
curl -X GET "https://api.datamammoth.com/v1/billing/invoices?status=unpaid" \
  -H "Authorization: Bearer dm_key_abc123def456"

Response:

json
{
  "data": [
    {
      "id": "inv_2026_0042",
      "number": "INV-2026-0042",
      "date": "2026-03-01",
      "due_date": "2026-03-15",
      "subtotal": 30.00,
      "tax": 6.30,
      "total": 36.30,
      "status": "unpaid",
      "items": [
        {
          "description": "VPS Standard — March 2026",
          "quantity": 1,
          "unit_price": 30.00,
          "total": 30.00
        }
      ]
    }
  ],
  "meta": {
    "total": 1,
    "page": 1
  }
}

Get Invoice Details

bash
GET /v1/billing/invoices/{invoice_id}

Returns complete invoice details including line items, taxes, payments, and status.

Account Balance

Check your current account credit balance.

bash
GET /v1/billing/balance

Response:

json
{
  "data": {
    "balance": 125.50,
    "currency": "USD"
  }
}

List Subscriptions

View all active subscriptions.

bash
GET /v1/billing/subscriptions

Response:

json
{
  "data": [
    {
      "id": "sub_xyz789",
      "service": "VPS Standard",
      "server_id": "srv_abc123",
      "billing_cycle": "monthly",
      "amount": 30.00,
      "status": "active",
      "next_renewal": "2026-04-01",
      "auto_renew": true
    }
  ]
}

Payment History

View past payments.

bash
GET /v1/billing/payments

Query Parameters:

ParameterTypeDescription
date_fromstringStart date
date_tostringEnd date
pageintegerPage number
Response:

json
{
  "data": [
    {
      "id": "pay_abc123",
      "invoice_id": "inv_2026_0041",
      "amount": 36.30,
      "method": "credit_card",
      "status": "completed",
      "date": "2026-02-15T10:30:00Z"
    }
  ]
}

Use Cases

Automated Invoice Monitoring

Build a script that checks for unpaid invoices and sends alerts:

python
import requests

response = requests.get( "https://api.datamammoth.com/v1/billing/invoices?status=unpaid", headers={"Authorization": "Bearer dm_key_abc123def456"} )

invoices = response.json()["data"] if invoices: print(f"Warning: {len(invoices)} unpaid invoices found!")

Accounting Integration

Export invoice data to your accounting system by periodically fetching invoices and syncing with tools like QuickBooks, Xero, or custom spreadsheets.

Budget Monitoring

Track monthly spending by summing paid invoice amounts within a date range.

What to Do Next

  • Support API — Manage support tickets via API.
  • API Pagination & Filtering — Navigate large datasets.
  • Webhooks — Get billing event notifications.
  • API Code Examples — JavaScript — Billing API in Node.js.

Was this article helpful?

← Back to API & DevelopersBrowse all categories →

Still have questions?

Contact Support →Submit a Ticket