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

Generate transaction

SimPay::payment()->generate()
    ->amount(15.00)
    // rest of fields are optional
    ->returns(
        new \SimPay\Laravel\Dto\ReturnData(
            'successUrl',
            'failedUrl',
        ),
    )
    ->billing(
        new \SimPay\Laravel\Dto\Payment\CustomerFullData(
            'First name',
            'Surname',
            'Street',
            'House number',
            'Flat',
            'City',
            'Region',
            'Post Code',
            'Country code',
            'Company',
        )
    )
    ->shipping(
        new \SimPay\Laravel\Dto\Payment\CustomerFullData(
            'First name',
            'Surname',
            'Street',
            'House number',
            'Flat',
            'City',
            'Region',
            'Post Code',
            'Country code',
            'Company',
        )
    )
    ->customer(
        new \SimPay\Laravel\Dto\Payment\CustomerData(
            'Name',
            'Email',
            'IP address',
            'Country Code (eg. PL, US, CY, GB)',
        )
    )
    ->antifraud(
        new \SimPay\Laravel\Dto\Payment\AntiFraudData(
            'UserAgent',
            'SteamID64',
            'Minecraft player username',
            'Minecraft player uuid',
            'systemID (mandatory for Recurrent Payments)',
        )
    )
    ->control('Control Data (for your integration, ex. your id from database)')
    ->description('Transaction Description')
    ->currency('Currency Code (default: PLN)')
    ->cart([
        new \SimPay\Laravel\Dto\Payment\CartItemData(
            name: 'Test product',
            quantity: 1,
            price: 5,
            procuder: 'Test producer',
            category: 'T-Shirts',
            code: 'TSHRT01' 
        ),
    ])
    ->referer('REFERRAL CODE')
    // one of
        ->directChannel('blik')
        // or
        ->channels(['blik', 'paysafecard', 'velo', 'blik-paylater', 'paypo'])
        // or
        ->channelTypes(new \SimPay\Laravel\Dto\Payment\ChannelTypeData(
            blik: true, // BLIK, BLIK Pay Later
            transfer: true, // Polish banks
            cards: true, // Credit cards
            ewallets: true, // Google Pay / Apple Pay  
            paypal: true, 
            paysafe: true, // PaysafeCard, Skrill
            latam: true, // Latin America payments
            postponed: false, // PayPo
        ))
    // make() is required to create payment.
    ->make();

Response will be TransactionGeneratedResponse. If you want to use directChannel please see https://docs.simpay.pl/payment/methods to see available channels.

Last updated