GET
/
v1
/
orders
/
{id}
/
invoice
Typescript (SDK)
import { Polar } from "@polar-sh/sdk";

const polar = new Polar({
  accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});

async function run() {
  const result = await polar.orders.invoice({
    id: "<value>",
  });

  console.log(result);
}

run();
{
  "url": "<string>"
}
The invoice must be generated first before it can be retrieved. You should call the POST /v1/orders/{id}/invoice endpoint to generate the invoice.If the invoice is not generated, you will receive a 404 error.

Authorizations

Authorization
string
header
required

You can generate an Organization Access Token from your organization's settings.

Path Parameters

id
string<uuid4>
required

The order ID.

Response

Successful Response

Order's invoice data.

url
string
required

The URL to the invoice.