#ashishpm
1 messages · Page 1 of 1 (latest)
Hi there!
Why do you want to redirect the customer to pay if you already have their payment method saved?
So how I can get paid through my portal using saved cards? using javascript
You can't create payments with JavaScript, you'll need to use backend code with your Stripe secret key.
And you want to use Invoices for this?
Yes
My backend team providing us invoice link for payment.
but the stripe invoice link page not showing default payment method.
Only input field for card and pay button.
I want to get paid by saved card details only/
Oh, so you want the hosted invoice page to be prefilled with the payment method of the customer?
Let me double check, but I don't think that's possible. The hosted invoice page is meant to be used so that user can input their payment details. If you already have the payment details then you shouldn't need to use the hosted invoice page at all.
Oh great, Then what are options available to use payment method with payment through my portal?
Already using Stripe Payment Element to save card/bank detail.
When you create the Invoice, set the default payment method here: https://stripe.com/docs/api/invoices/create#create_invoice-default_payment_method and collection_method:charge_automatically
Then finalize and try to pay the invoice with https://stripe.com/docs/api/invoices/pay