# Payment Method Id Sort Clause

> For the complete documentation index, see [llms.txt](https://doc.ibexa.co/en/5.0/llms.txt).

Payment Method Id Sort Clause

Editions: Commerce

The `Id` Sort Clause sorts search results by payment method ID.

## Arguments

- (optional) `sortDirection` - `Id` constant, either `Id::SORT_ASC` or `Id::SORT_DESC`

## Example

```php
use Ibexa\Contracts\Payment\PaymentMethod\PaymentMethodQuery;

$criteria = null;

$paymentMethodQuery = new PaymentMethodQuery(
    $criteria,
    [
        new \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Id(
            \Ibexa\Contracts\Payment\PaymentMethod\Query\SortClause\Id::SORT_ASC
        ),
    ]
);
```
