GET
/
v1
/
customer-portal
/
orders
/
{id}
/
invoice
import polar_sdk
from polar_sdk import Polar


with Polar() as polar:

    res = polar.customer_portal.orders.invoice(security=polar_sdk.CustomerPortalOrdersInvoiceSecurity(
        customer_session="<YOUR_BEARER_TOKEN_HERE>",
    ), id="<value>")

    # Handle response
    print(res)
{
  "url": "<string>"
}

The invoice must be generated first before it can be retrieved. You should call the POST /v1/customer-portal/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

Customer session tokens are specific tokens that are used to authenticate customers on your organization. You can create those sessions programmatically using the Create Customer Session endpoint.

Path Parameters

id
string
required

The order ID.

Response

200
application/json

Successful Response

Order's invoice data.