#frankfs
1 messages · Page 1 of 1 (latest)
Hello!
You can't do this using Invoices. You should be using instead Stripe Checkout:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-success_url
But I need to display and let the user download the invoice from payment page
Using the hosted Invoice page, you can't set a redirection. You can send the customer the invoice pdf link in order to download the Invoice in case this could help you further:
https://stripe.com/docs/api/invoices/object#invoice_object-invoice_pdf
Can we create a hosted page to edit the invoice page ?
Not sure I totally understand your question, but you can update an existing Invoice using Stripe API:
https://stripe.com/docs/api/invoices/update
https://stripe.com/docs/invoicing/invoice-edits?testing-method=with-code
If i'm to create my own hosted invoice page, can you let me know what's the process ?
@grizzled harbor Can you let me know please ?
We have a requirement to redirect the user to a different page once their payment is completed in the invoice page.
You need to implement Stripe Elements in your new invoice page following this link:
https://stripe.com/docs/payments/quickstart
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
And set the invoice download pdf in it and/or the preview, once the payment completed you can redirect the user to any url you want using Stripe Element redirect:
https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-return_url