stripe-samples / accept-a-payment

Learn how to accept a payment from customers around the world with a variety of payment methods.
MIT License
635 stars 490 forks source link

Checkout Page Code (Question) #386

Open kmyn opened 2 years ago

kmyn commented 2 years ago

Hi,

When I use the examples provided in this repository and others, after hitting checkout, I get redirected to checkout.stripe.com (below is screenshot) Is the code for this page posted somewhere as I could not find it? I would like to host this page myself with some minor modification -

StripeCheckoutPage

If this is not a right place for this question, could you please point me to the appropriate contact.

Thanks, Karthik

cjavilla-stripe commented 2 years ago

Hey Karthik!

The Stripe Checkout solution is a Stripe hosted surface. It's not possible to host that page yourself or embed it in an iframe. Another option, which is more development work, is to integrate the PaymentElement [0] into a custom form.

Could you say a bit more about the customizations you'd like to make to Checkout? I'm curious what limitations you're experiencing and want to see how we can improve.

Thanks, CJ

[0] https://stripe.com/docs/payments/payment-element

On Sat, Nov 20, 2021 at 6:39 PM Karthik @.***> wrote:

Hi,

When I use the examples provided in this repository and others, after hitting checkout, I get redirected to checkout.stripe.com (below is screenshot) Is the code for this page posted somewhere as I could not find it? I would like to host this page myself with some minor modification -

[image: StripeCheckoutPage] https://user-images.githubusercontent.com/18484353/142747222-fdd12e83-951b-4a37-b8d6-8c626cec79b1.jpg

Thanks, Karthik

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stripe-samples/accept-a-payment/issues/386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGCWQ4ZIMD72OTU56POCQLUNBLWDANCNFSM5IOUDUVQ .

kmyn commented 2 years ago

Hi CJ,

Thanks for the response.

The use case I have is - I need to support additional payment types (specific types of Indian bank transfers) which are not supported by stripe. What I was hoping for is to modify this page in such a way that all stripe supported transactions go through stripe and the rest take a different path.

If the checkout page code was there, it would be easier for me to modify rather than write a whole new page.

Looks like my only option right now is to create a custom page with PaymentElement.

Thanks, Karthik

extremeskillz commented 2 years ago

My custom use case is we invoice customers from Quickbooks and after 30days the customer can pay us by a Online Bill Pay form on our site. I would like the customer to hit a custom stripe form in which they fill out the invoice number, amount of the invoice, and fill out their payment info to pay the invoice. I don't see the ability to do that except may a fixed price item in payment links. Is there an option to allow the customer put in a custom amount they are paying?

cjavilla-stripe commented 2 years ago

@extremeskillz no support on a Stripe hosted form for entering custom payment amount, today. I would recommend implementing this by collecting the invoice number and amount to pay on your site, then redirecting to Stripe Checkout to collect payment. You can specify a custom amount to collect using the price_data arguments as part of the Checkout Session line items: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data.

Abrdjalw commented 2 years ago

git rebase [-i | --interactive] [] [--exec ] [--onto | --keep-base] [ []] git rebase [-i | --interactive] [] [--exec ] [--onto ] --root [] git rebase (--continue | --skip | --abort | --quit | --edit-todo | --show-current-patch) DESCRIPTION

Abrdjalw commented 2 years ago

git rebase [-i | --interactive] [] [--exec ] [--onto | --keep-base] [ []] git rebase [-i | --interactive] [] [--exec ] [--onto ] --root [] git rebase (--continue | --skip | --abort | --quit | --edit-todo | --show-current-patch) DESCRIPTION

Abrdjalw commented 2 years ago

git rebase [-i | --interactive] [] [--exec ] [--onto | --keep-base] [ []] git rebase [-i | --interactive] [] [--exec ] [--onto ] --root [] git rebase (--continue | --skip | --abort | --quit | --edit-todo | --show-current-patch) DESCRIPTION

Abrdjalw commented 2 years ago

756837

Abrdjalw commented 2 years ago

Duplicate of #