> For the complete documentation index, see [llms.txt](https://simpaypl.gitbook.io/simpay-laravel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simpaypl.gitbook.io/simpay-laravel/direct-billing/generate-transaction.md).

# Generate transaction

```php
SimPay::directBilling()->generate()
    ->amount(15.00)
    ->amountType(\SimPay\Laravel\Enums\DirectBilling\AmountType::Net)
    // other are optionals
    ->returns(new \SimPay\Laravel\Dto\ReturnData(
        'https://success.pl',
        'https://failure.com',
    ))
    ->control('Control field (ex. your database id from your integration)')
    ->description('Transaction description')
    ->phoneNumber('+48123123123')
    ->steamId('SteamID64')
    ->email('Email')
    // make is required to generate transaction
    ->make();
```

amountType() accepts an enum [AmountType](/simpay-laravel/direct-billing/enums/amounttype.md).

Response will be [TransactionGeneratedResponse](/simpay-laravel/global-responses/transactiongeneratedresponse.md).
