> 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/payments/subscriptions/execute-blik-recurring-payment.md).

# Execute BLIK Recurring Payment

{% hint style="info" %}
To understand how BLIK subscriptions work please see [https://docs.simpay.pl/en/payment/blik-recurrent](https://docs.simpay.pl/en/payment/blik-recurrent#executing-a-recurring-payment-subsequent-transaction)
{% endhint %}

At first you need to generate transaction:

```php
// only required fields are shown
$payment = SimPay::payment()->generate()
    ->amount(15.00)
    ->customer(
        new \SimPay\Laravel\Dto\Payment\CustomerData(
            email: 'Email',
            countryCode: 'PL', // for BLIK it must be PL
        )
    )
    ->antifraud(
        new \SimPay\Laravel\Dto\Payment\AntiFraudData(
            systemId: 'Payer identifier in your platform (eg. user id, hashed email) - must be the same as provided during subscription creation',
        )
    )
    ->currency('PLN')
    ->directChannel('blik-recurrent') // it must be set to blik-recurrent
    ->make();
```

Now register subscription:

```php
$subscription = SimPay::payment()->subscriptions()->blikAutoPayment('SUBSCRIPTION_ID')
    ->transaction($payment) // you may pass full TransactionGenerateResponse or just transactionId
    //optional fields
    ->alias(new \SimPay\Laravel\Dto\Payment\Subscription\BlikAutoPayment\BlikAutoPaymentAliasData(
        label: 'LABEL',
        noDelay: true,
    ))
    ->attempt(3)
    ->description('My description')
    // make() is required to execute autopayment
    ->make();
```

Response will be [BlikAutoPaymentSubscriptionExecutedResponse](/simpay-laravel/payments/responses/blikautopaymentsubscriptionexecutedresponse.md) or thrown SimPayException (see [Exceptions](/simpay-laravel/exceptions.md)).
