---
title: "Understand invoices"
description: "Learn how invoices relate to orders, what the invoice URL provides to customers, and how the hosted payment page works."
canonical: "https://studio.inttegro.com/guides/understand-invoices"
format: inttegro-machine-docs/v1
language: "Go"
sdk_version: "v11.0.1"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/go/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 553
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "curated"
recommended_mcp_tools: ["get_order","send_order_invoice","send_order_receipt"]
estimated_tokens: 2311
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** A finalized order exposes a customer-facing web invoice for hosted payment and a PDF document; invoice delivery is not payment proof, and both URLs are bearer capabilities.

### Five questions

#### Q1. When does an order get an invoice?

Finalize the order after its line items and amount are ready; a draft omits the invoice. [Create](https://studio.inttegro.com/machine/go/api/orders.md#create-an-order) with finalization or [finalize an order](https://studio.inttegro.com/machine/go/api/orders.md#finalize-an-order), then preserve its Order ID and invoice URLs.

#### Q2. What is the difference between the two URLs?

The web URL is the hosted payment experience; the PDF URL is a downloadable invoice document. Neither requires an API key, so share them only with the intended customer as bearer capabilities. See [web invoice](https://studio.inttegro.com/machine/go/guides/understand-invoices.md#web-invoice-the-hosted-payment-page).

#### Q3. Does opening or sending an invoice settle the order?

No. The customer can still abandon or fail payment. Use [Order lookup](https://studio.inttegro.com/machine/go/api/orders.md#lookup-an-order) for authoritative payment state before fulfillment; browser return and invoice delivery are not settlement evidence.

#### Q4. When does a receipt fit?

A receipt belongs after the paid outcome, not at invoice creation. The hosted invoice reflects current order state; use the [Orders reference](https://studio.inttegro.com/machine/go/api/orders.md) for exact invoice and receipt properties instead of assuming a copied JSON envelope is the selected SDK object.

#### Q5. What can MCP do with these documents?

After its required confirmation, [send_order_invoice](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#send_order_invoice) can deliver a finalized invoice and [send_order_receipt](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#send_order_receipt) a paid-order receipt. [get_order](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#get_order) checks current state; [Inttegro Checkout](https://studio.inttegro.com/machine/go/products/checkout.md) owns the customer-facing payment flow.

## Document content

# Understand invoices

A finalized order includes an invoice—a hosted payment page where customers can review what they owe and complete payment. Draft orders omit [`Invoice`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#Order); set [`Finalize`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#CreateParams.Finalize) to `true` during creation or call [Finalize an order](https://studio.inttegro.com/machine/go/api/orders.md#finalize-an-order) when the order is ready. This guide explains when to use the hosted invoice URL instead of building a custom checkout.

> Mcp Guide Callout is interactive content. Use the canonical page to view it.

## Prerequisites

- Familiarity with [orders](https://studio.inttegro.com/machine/go/api/orders.md) and the [order lifecycle](https://studio.inttegro.com/machine/go/guides/order-lifecycle.md)
- An understanding of how [Inttegro Checkout](https://studio.inttegro.com/machine/go/products/checkout.md) works as a hosted experience

## What is an invoice?

When you create an order with [`Finalize`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#CreateParams.Finalize) set to `true`, Inttegro includes two invoice URLs in the returned order:

```json
{
  "order": {
    "id": "or_48ZW7BGvYUBWc1i6WBkL2jr0iPQP5jUy76mmmHpt",
    "status": "requires_payment",
    "invoice": {
      "format": {
        "pdf": {
          "url": "https://pages.inttegro.com/invoices/or_48ZW7BGvYUBWc1i6WBkL2jr0iPQP5jUy76mmmHpt/pdf"
        },
        "web": {
          "url": "https://pages.inttegro.com/invoices/or_48ZW7BGvYUBWc1i6WBkL2jr0iPQP5jUy76mmmHpt"
        }
      }
    }
  }
}
```

The **web URL** is an interactive payment page. Send this to a customer to let them pay directly. The **PDF URL** generates a downloadable invoice document—useful for B2B customers who need a paper trail, accounting teams, or email attachments.

The URLs don't require an API key. Treat them as bearer capabilities and share them only with the intended customer.

## Web invoice: the hosted payment page

When a customer opens the web invoice URL, they see:

- Your merchant name and branding
- A line-by-line breakdown of what they're being charged
- The total amount and currency
- A payment form appropriate to their region (mobile money)

Inttegro handles the entire payment flow on this page: collecting payment details, sending the OTP, waiting for confirmation, and showing a success or failure state. You don't write any frontend payment code.

This is the approach documented in [Accept payment with Inttegro Checkout](https://studio.inttegro.com/machine/go/guides/accept-payment-with-inttegro-checkout.md)—create the order via API, then redirect or link the customer to the web invoice URL.

## PDF invoice: the downloadable document

The PDF URL generates a formatted invoice document on demand—every request to it produces the current state of the invoice. This means:

- Before payment: the PDF shows an outstanding balance with payment instructions
- After payment: the PDF shows payment confirmation. Provide [`ReceiptNumber`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#Order) on [Create an order](https://studio.inttegro.com/machine/go/api/orders.md#create-an-order) or [Update an order](https://studio.inttegro.com/machine/go/api/orders.md#update-an-order) when your accounting system needs a receipt reference in order API responses for reconciliation.

PDF invoices are useful when your customers are businesses that need documents for accounting, when you want to email an invoice attachment before requesting payment, or when you're integrating with an ERP that ingests invoice PDFs.

## Invoice vs. custom checkout

The hosted invoice (Inttegro Checkout) handles the payment experience for you. You create the order, redirect the customer, and poll [Lookup an order](https://studio.inttegro.com/machine/go/api/orders.md#lookup-an-order) when your application needs the latest payment state. No frontend payment code required.

Building a custom checkout means you manage the UI yourself and call payment endpoints directly: `/orders/pay`, `/orders/confirm_payment`, and `/orders/request_confirmation`. This gives you complete control over the look and feel but requires you to implement the full payment flow, OTP collection UI, and error handling.

**Choose Inttegro Checkout (hosted invoice) when:**

- Speed to market matters more than exact UI control
- You want Inttegro to handle mobile money OTP flows
- You're building a simple storefront or order management workflow
- You don't have frontend engineers to build a custom checkout

**Choose custom checkout when:**

- Your brand guidelines require a fully native experience
- You're embedding payment into an existing mobile app or complex UI
- You need fine-grained control over payment method selection and UX
- You've already built a payment UI and want to wire it to Inttegro APIs

## How the order and invoice stay in sync

The invoice reflects the live order state. If you update an order via `/orders/update` and reseal it, or seal it with `/orders/finalize`, the invoice immediately shows the updated total—the customer always sees current numbers, not a stale snapshot.

When payment completes, the invoice transitions from "pay now" to "payment confirmed" automatically. The same URL that showed the payment form now shows a receipt. You don't need to do anything—Inttegro handles the state machine.

## Related resources

- [Accept payment with Inttegro Checkout](https://studio.inttegro.com/machine/go/guides/accept-payment-with-inttegro-checkout.md) — Step-by-step guide using the hosted invoice
- [Orders API](https://studio.inttegro.com/machine/go/api/orders.md) — Full order creation and management reference
- [The order lifecycle](https://studio.inttegro.com/machine/go/guides/order-lifecycle.md) — Status transitions from creation through completion
- [Inttegro Checkout product overview](https://studio.inttegro.com/machine/go/products/checkout.md) — Why to use the hosted experience
