Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

maximaexchen's avatar

Cashier - multiple payment methods

Hi there,

I have a default working checkout form with stripe creditcard payment possibility based on this tutorial: https://github.com/drehimself/stripe-elements-with-laravel/blob/master/resources/views/checkout.blade.php

And don't have any clue how and where to add the possibility to add multiple payment methods to that form. I need to use stripe.js and elements, right?

I cannot figure out to add something like this:

var sepadebit = stripe.createSource({
            type: 'sepa_debit',
            sepa_debit: {
                iban: 'DExxxxxxxxxxxxx',
            },
            currency: 'eur',
            owner: {
                name: 'Max Mustermann',
            },
        }).then(function(result) {
            // handle result.error or result.source
        });

And how do I fill it dynamically from input fields?

Anyone who can give me a push in a right direction?

Thanks in advance Regards

0 likes
2 replies
martinbean's avatar

@maximaexchen You cannot pre-fill payment information such as card details or bank account details.

The reason being, Stripe bears the brunt of being PCI compliant on your behalf as those details never touch your server. But if you’re trying to pre-fill those details, then it means you have taken those details and they have touched your application, in which case PCI compliance kicks in and they are hefty fines if you are found to be in breach of those rules.

how do I fill it dynamically from input fields?

Stripe Elements are the input fields. The idea of Stripe Elements is to build forms to capture these details on your behalf. A token is then created that Stripe sends to your server, which you can use to process a payment via Stripe.

maximaexchen's avatar

oh no. That was misleading. I dont't want to prefill. The values should come from the formfields... I am not that good in JS so I think I have the problem to get the values set from user input to the token.

Select plan C -> select payment method B -> submit -> stripe magic

Please or to participate in this conversation.