---
title: "Get transaction invoice"
method: POST
path: "/api/billing-transactions/{sid}/get-invoice"
tags: ["billing_transactions"]
---

# Get transaction invoice

`POST /api/billing-transactions/{sid}/get-invoice`

## Request

- Base URL: `https://beta.getsales.io/id/v1`
- URL: `https://beta.getsales.io/id/v1/api/billing-transactions/{sid}/get-invoice`
- Auth: HTTP bearer and API key in header `Team-SID`

A temporary link (about an hour) to this transaction's invoice PDF at Paddle; nothing is stored here. invoice_not_ready before the transaction is billed; invoice_not_available when Paddle issued no invoice (a zero charge, a canceled checkout): the rows with a PDF carry invoice_number. Read-only.

Contract:
- MCP tool `get_billing_transaction_invoice`, registry package `mcp.id/billing_transactions`, mount `id.billing`.
- Operation `action`, response envelope `action`.
- Flags: read only.

## Path parameters

- `sid` string, required: Billing transaction sid (bl_tx_...).

## Response `200`

`action` success envelope.

- GetBillingTransactionInvoiceResponse
  - `success` true, required
  - `operation` 'action', required
  - `action` string, required: kebab-case verb; matches the route segment.
  - `item` object, nullable, required
    - `sid` string, required: Transaction sid (bl_tx_...).
    - `owner_user_sid` string, required: The buyer (us_mb_...).
    - `team_sid` string, nullable, required: The workspace notified of it at ingestion (the first allocated one); null when none.
    - `subscription_sid` string, nullable, required: The subscription charged (bl_sb_...); attached on a later event when the charge came first.
    - `paddle_transaction_id` string, required: Paddle's id (txn_...).
    - `status` 'billed' | 'paid' | 'completed' | 'past_due' | 'canceled', required: billed, paid, completed, past_due or canceled, as Paddle reports it.
    - `origin` 'subscription_charge' | 'subscription_update' | 'one_time', required: subscription_charge (a period's charge, the first checkout included), subscription_update (a proration), one_time.
    - `collection_mode` 'automatic' | 'manual', required: automatic = charged to the card; manual = invoiced.
    - `invoice_number` string, nullable, required: Paddle's invoice number; the rows that carry one have a PDF.
    - `total` string, required: The total as a decimal string in currency.
    - `tax` string, nullable, required: The tax part as a decimal string; null when unknown.
    - `currency` string, required: ISO 4217.
    - `items` object[], required: The frozen line items of the charge.
      - `price_sid` string, nullable, required: The price charged (bl_pc_...); null when Paddle named one we do not mirror.
      - `product_sid` string, nullable, required: The product (bl_pr_...).
      - `product_type` 'plan' | 'addon' | 'credits_pack', required: plan | addon | credits_pack.
      - `quantity` integer, required: Units charged.
      - `unit_amount` string, required: The unit price as a decimal string.
      - `paddle_price_id` string, nullable, required: Paddle's price id.
    - `billed_at` string, nullable, required: ISO 8601 UTC; null until billed.
    - `created_at` string, required: ISO 8601 UTC.
    - `updated_at` string, required: ISO 8601 UTC.
  - `result` object, required
    - `invoice_url` string, nullable, required: The signed Paddle URL of the PDF; null only when Paddle's answer carried none.
    - `expires_at` string, required: ISO 8601 UTC, about an hour after the mint.
    - `invoice_number` string, nullable, required: The transaction's own invoice number.
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-id/revisions/95e48541fe85?raw)
