#Logemann
1 messages ยท Page 1 of 1 (latest)
Hi there!
How do you plan to integrate with Stripe? Checkout Session, Payment Element, PaymentSheet, something else?
So definitely no UI elements from Stripe or something. Like i said i want to trigger the payment via backend. Like when you return a scooter. You use their app, return the scooter and some time later, you get the invoice and your payment method is billed.
Sure, but how do you collect the payment information in the first place?
via the app. I add the payment details to stripe via endpoints after i got them via our app. We developed all screens ourselves.
So at this point. We are done with the screens for adding payments and also added this data into stripe via using stripe.setupIntents.create() and stripe.setupIntents.confirm()
( for SEPA and CC)
stripe.setupIntents.create() and stripe.setupIntents.confirm()
Thanks, that's what I wanted to know.
So when you confirm the SetupIntent, it create a PaymentMethod. And now you can create a PaymentIntent with that PayemntMethod to charge the customer from the backend.
yeah... thats what i hoped.. ๐ right now we save the paymentMethod ID in our DB and will use this ID for further processing.
You can see an example of this here: https://github.com/stripe-samples/charging-a-saved-card/blob/main/server/node/server.js#L54-L61
Thanks.... and can you tell me why i cant remove a SEPA payment method?
CC is no problem
What do you man by "cant remove a SEPA payment method"? What exactly are you trying to do? And did you get an error message?
stripe.paymentMethods.detach() on the PaymentMethod ID and the error is that it needs to be activated or something. Would need to check with dev to get more detailes about this
Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
give me some time to figure this out. Thanks for the previous help
Will report back ASAP
We get this, even though we are quite sure that this payment method id exists:
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such PaymentMethod: 'seti_1LhVBPCHoir9yBu6s5IWWXZV'",
"param": "payment_method",
"type": "invalid_request_error"
}
}
**request id is: **
req_IHJFablAWB9hIp
Thanks! Give me a few minutes to look into this.
๐
Well seti_1LhVBPCHoir9yBu6s5IWWXZV is not a PaymentMethod, it's a SetupIntent, so it's expected to not work.
However in the SetupIntent object there should be a PaymentMethod: https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method
yeah... of course ... let me think about it, why we stored a seti_X instead of a pm_X
can you tell me the difference between await stripe.paymentMethods.create() and the intent/confirm combo: stripe.setupIntents.create() and stripe.setupIntents.confirm() . Which should i use in conjunction with CreditCards?
Depends what you're trying to do. Generally wouldn't recommend using paymentMethods.create()
Setup Intents will check if the card is valid, save the card to your customer and perform any bank requested 3DS/auth
ok... will always go the intent way then...
Definitely the better approach to prevent customer friction further down the line
Perfect. thanks.
One more question: how do we pass the credit card data in the confirm request... cant see anything...
How are you collecting payment data?
thats what i talked with your colleague in this thread no? WE collect data via our APP Ui and then for SEPA, we do intent & confirm (where the confirm holds the SEPA details aka IBAN) with Card, we cant supply the data in the confirm payload right but need to supply a pm_* id ?
Yes, but how do your customers input those credit card details to you? Which Stripe UI are you using?
Payment Element?
Do you have the PCI compliance to handle raw card data?
This is why using our UIs (Payment Sheet if you're building a native mobile app) is critical as you've covered under our PCI compliance and they work directly with our payment APIs (Payment Intents, Setup Intents)
so ... do you have UI elements for flutter?
Are you using the third-party lib? https://pub.dev/packages/flutter_stripe
right now we dont use anything stripe related just raw Endpoints....
That wraps our mobile SDKs for Android and iOS, so you can use the Payment Sheet: https://stripe.com/docs/payments/accept-a-payment?platform=ios
but the main problem is, that we will have backend based payment processing. So we wont have any direct payment user interaction. Just adding a payment method is has. a user UI
What do you mean by 'backend based payment processing'?
You still need a server/backend in most Stripe integration
- Server creates the Payment/Setup Intent.
- Returns it to client (web/mobile).
- UIs to collect payment details.
- Same UIs then use those payment details to 'confirm' the intent created by your server.
like i told your colleague.. we will have a payment processing like all those eScooter apps
but your flow is what we have right now
I've never used one so I've no idea how they work
Yeah, except your UIs aren't PCI compliant
so you use a eScooter and then their backend bills your card based in the rentout time
no UI interaction for payment like in an ecommerce shio
shop
the PCI compliant thing is an issue... but i dont see why your UI widgets are different than ours... its all about how the card data will be processed in the backend and sent to your servers or?
I understand there's no traditional payment flow for each transaction. You just want to be able to charge their payment method using MIT for each session (or whatever)
yep
But their needs to be a UI at some point to collect the payment data from your customers
yeah.. we have that custom coded UI
Ok, but then you're handling raw credit card data which requires PCI compliance
yeah... thats what you told me right... but then we need a addPaymentData sheet from your UI widget lib or something...
Our UIs are covered by our PCI compliance. If you use your own UIs for payment data collection:
If you continue to send card details directly to our API, youโll be required to upload your SAQ D annually to prove your business is PCI compliant. SAQ D is the most onerous of all the SAQs, with over 40 pages of requirements you must implement to remain PCI compliant. We highly recommend you migrate to client-side tokenization of card information to substantially reduce the scope of your PCI compliance.
ahhh i get it...
thanks for the info about all this. So... looks its easier to use your libs ๐
UI libs
and they support SEPA and CC ?
Yes, very few Stripe merchants handle card data. It's an integration path we strongly discourage
and i can use your UI libs just for gathering payment methods... not required to use a UI for each TX ?
Has a breakdown of what PMs support which UIs. You're looking at Mobile Payment Element
will take a look and hopefully see something which works in my flutter env
No, you don't need a UI for each off-session payments. More on that here: https://stripe.com/docs/payments/save-during-payment?platform=ios&ui=payment-sheet#ios-charge-saved-payment-method
I imagine you're scenario is something like:
- Create an account.
- Add payment details to be saved for payments.
- Use account to initiate a session.
- Charge previously saved payment details.
So the Setup Intent paired with Mobile Payment Element will take care of step 2 there.
Add then you'd use Payment Intents with the saved Payment Method from the Setup Intent for step 4.
Glad we intercepted this now then. Hopefully there's enough for you to work with there
Happy to answer any follow-up Qs
np!