#cw

1 messages · Page 1 of 1 (latest)

plush kilnBOT
carmine cairn
#

Btw this is a recurring monthly payment. Forgot to say that.

naive fog
#

Every subscription will create a Payment Intent which it can be passed to frontend Elements to collect payment method information. Appearance API is used to customize the design/UI of the Elements

carmine cairn
#

Let me wrap my head around your response then ask a follow up. 2 minute pls

#

Thanks for your time by the way.

#

Is there a way to do this in one single flow?

#

Or do I have to collect their email / name in a form first. Then create customer. Then pay. ?

#

I would ideally like to do it all in one single flow. How is that achievable if they never submit anything?

naive fog
#

I'm afraid it's not possible to do with one single Subscription API request.

How do you identify the customers if you don't collect their information?

carmine cairn
#

How does prebuilt checkout do it then?

#

Then that would mean that this is impossible to achieve

naive fog
#

There are two integrations approach:

  1. Checkout Session using Stripe hosted page (your screenshot)
  2. Built your self with Elements

In pre-built Checkout Session, the form will collect customer's email and create the customer first, then create the subscription behind the scene.

If you wish to do it yourself using custom integration, you'd need to collect customer information on your own and create customer first

#

If you do not wish to handle customer information collect, I recommend using Checkout Session, so that it can be done with one single API request

carmine cairn
#

Yes I understand. For simplicity’s sake, let’s pretend my custom integration looks exactly the same.

Customer enters their email.

I can create CustomerID just by them typing their email?

naive fog
carmine cairn
#

….. so I can literally create a customer LIVE as they are typing it?

#

Is that using a webhook or something?

naive fog
#

No! You should only create a customer once his/her fill in his/her information completely

carmine cairn
#

Oh….. so he/ she puts their email. Then their card. Then their zip. Then customer is created before they click pay.

#

And last question - what’s the problem in creating the customer ID after they pay? That’s how my dev did it.

naive fog
#

You can also create a customer while the customer clicks pay button with the steps:

  1. Make first request to create a customer
  2. Make second request to create a subscription from the customer in step 1

Multiple requests can be made to Stripe

#

what’s the problem in creating the customer ID after they pay? That’s how my dev did it.
You can't create a subscription without a customer. The request will fail

carmine cairn
#

Okay. Is there an advantage of using elements as opposed to plain react js?

carmine cairn
naive fog
#

Is there an advantage of using elements as opposed to plain react js?
As part of PCI compliance, only merchants with level 1 certificate is allowed to get customer's raw card data. Most of the merchants are not PCI level 1 certified, so you can't collect raw card information such as card number. You'd need to use payment service provider such as Stripe (with level 1 certified) to collect card information on your behalf for payment processing

carmine cairn
#

Oh okay. I meant react js with stripe payment intent backend. But that’s good to know

naive fog
#

Elements can be plain javascript or react. Stripe supports both

carmine cairn
#

Cart abandonment is achievable with elements ?

#

Or only with hosted checkout

naive fog
#

Stripe only supports payment, i.e. after customers select their items and confirm to pay. Cart management including abondomnent should be managed by yourself

carmine cairn
#

Thanks for your help.

#

🙏🏽🫡