For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create BLIK subscription

To understand how BLIK subscriptions work please see https://docs.simpay.pl/en/payment/blik-recurrent

At first you need to generate transaction:

// only required fields are shown
$payment = SimPay::payment()->generate()
    ->amount(15.00) // you may create subscription with amount set to 0.00, then it will work as authorization to future recurrent payments
    ->customer(
        new \SimPay\Laravel\Dto\Payment\CustomerData(
            email: 'Email',
            ip: 'IP address',
            countryCode: 'PL', // for BLIK it must be PL
        )
    )
    ->antifraud(
        new \SimPay\Laravel\Dto\Payment\AntiFraudData(
            userAgent: 'UserAgent (REQUIRED)',
            systemId: 'Payer identifier in your platform (eg. user id, hashed email)',
        )
    )
    ->currency('PLN')
    ->directChannel('blik-recurrent') // it must be set to blik-recurrent
    ->make();

Now register subscription:

Response will be BlikSubscriptionCreatedResponse or thrown SimPayException (see Exceptions).

Last updated