GET
/
v1
/
orders
/
{id}
/
invoice
PHP (SDK)
declare(strict_types=1);

require 'vendor/autoload.php';

use Polar;

$sdk = Polar\Polar::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->orders->invoice(
    id: '<value>'
);

if ($response->orderInvoice !== null) {
    // handle response
}
{
  "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

200
application/json

Successful Response

Order's invoice data.