#mikep7co-payment-integration

1 messages ยท Page 1 of 1 (latest)

carmine trench
#

Hello ๐Ÿ‘‹
There are a few options which would allow you to 'schedule a payment'.
If you can provide more context on what your integration looks like, I can give you more specific information.

tired sunBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

surreal bridge
#

heya @gaunt ferry i've reopened the thread, let me put together an answer for you

gaunt ferry
#

Thank you

#

To add more details, so I have a custom checkout page. Can I have my form to collect the credit card information, send it to my server and then send it to Stripe via an API to tokenize it or it should be different?
(the payment won't happen yet, I just need to "save" the CC info basically)

surreal bridge
#

if you're using your own textfields to collect the credit card information, then sending those details to Stripe from your server to be tokenized, you're going to need to fill up a SAQ D form annually to prove that you are PCI compliant [0]. Itโ€™s a 40 page form and not a headache most people want to be dealing with.

[0] Click on the API Direct tab : https://stripe.com/docs/security/guide#validating-pci-compliance

#

we generally recommend you use Stripe Checkout or Payment Element to collect payment details so that you're eligible for SAQ A which is the simplest SAQ form.

#

Now to answer your question - can you please clarify the different ways to capture card information without initiating a payment right away?

You can use SetupIntents and the Payment Element, or Stripe Checkout to collect a customer's card details without initiating a payment right away. You can read more about it here : https://stripe.com/docs/payments/save-and-reuse

gaunt ferry
#

Thank you @surreal bridge
Can the Payment Element be styled more easily than the Stripe Checkout? What's the difference between the two actually?
Which one will be more integrated within my checkout page?

surreal bridge
gaunt ferry
#

Ok I see thanks.
You mentioned SetupIntents and the Payment Element but I don't see SetupIndents mentioend in the Payment Element doc. Can you please elaborate?

surreal bridge
#

the page i shared to see how the Payment Element looks like is actually a guide for how to accept a payment, that's why it doesn't talk about SetupIntents. The Payment Element can be initialized using either a SetupIntent or a PaymentIntent and looks pretty much the same. If you want to look at the guide for SetupIntents, this is the page to refer to : https://stripe.com/docs/payments/save-and-reuse

gaunt ferry
#

Thank you. Appreciate the help. ๐Ÿ™

#

I am reading this last doc. I am not sure to understand if I can tokenize the card in my checkout page before submitting the rest of the checkout form to my server with the card tokenized?

The doc mentions a return_url for a page to provide the status of the SetupIntent.

For example. I have a checkout page with:
My Field A
My Field B
Stripe Fields for CC
Submit button

Can I ask the user to enter its CC within the Stripe elements, send the CC info to Stripe, get a token, and then the user can click on submitting the form to my server with my Fields A, B and the stripe token for the card?

surreal bridge
#

let me think a bit about this and put my thoughts together, i'll get back to you shortly

gaunt ferry
#

Ok thank you. Looking forward to hearing back from you.

surreal bridge
#

@gaunt ferry could you share what would field A and field B be?

gaunt ferry
#

To be honest, it could be anything, just some information we'd like to collect during the checkout process.

Do the stripe checkout/payment element have to be on their own page and cannot be integrated within an exiting page/form?

split wyvern
#

Hi @gaunt ferry I'll take over this thread, give me sec to catch up

#

Checkout page is hosted in Stripe, so you can use Stripe Checkout if you don't want to build your own Checkout page.
Payment Elements can be integrated to your existing webpage, and you have the flexibility to customize its appearance for your branding.

gaunt ferry
#

@split wyvern Ok yes, it sounds like Payment Elements is more appropriate here.
But I am still not clear if I can do what I am looking for:

in my checkout page, I have some fields for myself and then the CC fields. Can I include the CC fields from Stripe and tokenize the card BEFORE submitting the whole checkout form to my server?

split wyvern
#

Can you show me an example of the form that you are talking about?

gaunt ferry
#

Would that help?

split wyvern
#

I see, one question, do you create the payment intent before or after submitting the form?

gaunt ferry
#

What do you mean by the payment intent?
Right now I did not integrate Stripe, I am trying to find out how to do it.

Ideally, I'd like to collect the CC in the same page with Stripe and then just send the stripe token with the rest of my fields to my server when the form is submitted. Is this possible?

split wyvern
#

Payment Intent is an object presentation customer's intention to make a payment. It contains information like amount, currency, payment methods and etc. You can read more about the Payment Intent in the whole flow here https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-create-intent

Basically your server needs to create a payment intent, and then pass the payment_intent_secret to the client in order to render the payment element.

So looking at your form, I'm wondering where do you trigger the payment intent creation so that you can display the payment element to collect payment details.

#

Most of the users will break it into two steps

  1. Let customer select the products, submit -> create payment intent
  2. Ask the customer to enter the payment details in payment elements, submit -> confirm payment
gaunt ferry
#

ok I see, yes I can create the payment intent in the server before displaying this page and so I will have the payment_intent_secret to use.
But that does not solve the question of how to tokenize the CC from the same page/form.

split wyvern
#

You don't need to worry about the card tokenization, Stripe takes care for you.

gaunt ferry
#

So do I need a Stripe form within my form?

split wyvern
#

The customer CC raw data will never be sent to your server, so you don't need to worry about PCI compliance.

gaunt ferry
#

yes I get that

#

but that's not the problem

split wyvern
#

You can embed the Stripe payment element inside your form

gaunt ferry
#

so there is an additional "submit" button for the CC fields from Stripe to send the CC info to Stripe?

split wyvern
#

The UI design/flow is totally up to you.

#

As long as you can pass a valid payment_intent_secret to the payment elements and have a button to call the stripe.confirmPayment

gaunt ferry
#

Ok so basically I need a submit card button with the CC fields in addition to my submit form button.

#

The problem is that stripe.confirmPayment needs a return_url so the user will be redirected to a different page?

split wyvern
gaunt ferry
#

Ok.
And also, I don't want to do a payment right away. I just want to store the card that will be charged later for different amounts.

split wyvern
gaunt ferry
#

IS there an example of using SetupIntent with the Stripe Card Element?

split wyvern