#aistudent_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1374341528532811828
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
we know nothing about the "Drupal Commerce Payment module" here.
so I think you would need to ask the payment modul developer directly.
Alright, but my question is more about Stripe letting developers save Payment methods for ACH. Is it allowed to store payment information for later use? I want to present users a form where they may put their banking details and this will be saved as a payment method for a user. I read somewhere that Stripe does not allow this and may block my id because of some PCI related issues.
Is it allowed to store payment information for later use?
in general, yes! but not all payment method support this.
For ACH, it is supported: https://docs.stripe.com/payments/payment-methods/payment-method-support#bank-debits-api-support
Thanks @finite wharf. So is it called Setup Future Usage? Do you know of any tutorial which can guide me setting up ACH custom payment form rather than Stripe Elements?
So is it called Setup Future Usage?
yes
Do you know of any tutorial which can guide me setting up ACH custom payment form rather than Stripe Elements?
our main doc use Stripe Element: https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=elements
why don't you want to use Stripe Element?
using Checkout Session or the Payment Element are our recommended integration paths
Checkout Session? Which one would you recommend to me in my case?
Also in this resource, I have a confusion about setting up future payment info, is this supposed to be on my server i.e my website, or on the Stripe dashboard? Should the info be saved on Stripe end or on my end?
not sure I understand your question.
it's every time you create the payment on your backend that you will define if you want to save it for later or not
Yeh, that is my question please, so should I save it via API on Stripe servers, or save it on my website?
assuming you using PaymentIntent + Payment Element, you create a PaymentIntent with setup_future_usage (or create a SetupIntent) on the backend, and that will eventually save the payment method on your Stripe account.
Also, what is difference between Payment Intent and Setup Intent, which one should I use here in my case, if I have to manage saving customer ACH payment info on my website.
it depends. do you want to make a payment and also save the payment method for later, or only save the payment method for later?
if it's the first, then PaymentIntent + setup_future_usage
if it's the second, then SetupIntent
I will like to do both, make a payment adn save it for later, but if a user creates his preferred payment method as ACH, so it should be used for later which he or admin wants to pay for something
I want Admin of the site to pay on the user behalf for certain payments or due payments.
I will like to do both
ok, then you should use both PaymentIntent and SetupIntent
Okay Thanks. One last question please, sorry I have wasted a lot of your time,
no worries, happy to help!
Thanks
These are my customers, is there a way to uniquely identify my site customers with customers on Stripe End. Right now each time I try a payment, a new customer with the same email is created, or it works this way?
well that's up to you. instead of creating a new customer every time, you could reuse existing customer.
how are you currenctly accpeting payments? Payment Link, Chekcout Session, Payment Element, something else?
Payment Element
so you are creating PaymentIntent? Then it's up to you to set an existing customer when you create the PaymentIntent: https://docs.stripe.com/api/payment_intents/create?api-version=2025-04-30.preview#create_payment_intent-customer
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
@finite wharf The Payment Element is technically Offiste Payment method right? For my further research, and i am sorry I have asked an extra question, Please refer to me any ACH onsite payment tutorial or guide. Because currently the Drupal Commerce Stripe module assumes Stripe Elements to be offsite and some part of the functionality does not permit admins using Offisite Stripe ACH payments. So my whole aim of this discussion is to create an onsite ACH payment gateway for my Drupal site, which will overcome the limitation for Admins creating admin payments. So if there is a way to create onsite ACH payment mechanisms in PHP, I will study that. And thanks for all the help so far. I am currently ready Payment Intents and Setup Intents
The Payment Element is technically Offiste Payment method right?
what do you mean by that?
and i am sorry I have asked an extra question,
you can ask as many questions as you need, we're here to help
are you referring to off_session vs on_session setup_future_usage ?
No, In my understanding of Onsite Payments on commerce platforms, your website renders a form which collects payment info, but offsite is a payment form hosted on the payment gateway site like Stripe. If an iframe is also used, it is techinically an offsite payment gateway.
if you need to collect the information yourself you need to be PCI compliant
and you can then use Stripe.js to confirm the PaymentIntent by PaymentMethod https://docs.stripe.com/js/payment_intents/payment_method
and pass in the payment_method_data
here's an example with ACH DD https://docs.stripe.com/js/payment_intents/confirm_us_bank_account_payment
but I highly recommend not going that path since it's a lot of effort to build, maintain and scale it
Thanks for the suggestion @raw burrow . I reckon this PCI compliance will also need some doing.
@raw burrow your colleague suggested me this link, so Would you also recommend me this?
https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=elements
yes but this is for SetupIntents
My requirement is that Admin should pay on behalf of cusomters for unpaid orders. Also customers should save ACH stripe as its payment method of choice on my website, so any subsequent purchasing will have their payment gateway preselected.
what I suggested is more for paying directly
you can always save the payment method while confirming a payment at the same time
But you said I should not go for that, that is hard to achieve and needs PCI compliance right?
by passing setup_future_usage to the PaymentIntent on creation
I wasn't just talking about ACH
I meant if you wanted to collect other payment method types
especially cards
@raw burrow for this, please give me your final suggestion and if you have any guide or tutorial from the documentation for it, please refer it.
are you only concerned with ACH DD?
Yes, I only need ACH DD
if you are, the next question would be, what your customer's flow looks like? do you want them to be able to save their PM without having to pay? or is the saving part always happening while paying?
I recommend the latter if that's the use case you'll be facing
instead of making it a 2 steps flow
saving then paying
so that's https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment?web-or-mobile=web&payments-ui-type=direct-api what I recommend
I will like to have both, so during checkout if they are purchasing a product, they should be able to give payment details for ACH and payment will be done. But on subsequent usage, they can just reuse their existing info.
On the other hand, if they want to add their payment info in their profile, they should be able to add ACH credentials, which will appear when they purchase some products.
Also there are times when admin of the site gets payment details from our customers for ACH. In such cases, admins should be able to pay for unpaid invoices for the customers or add payment details of for the customer which will appear in their profile.
I will like to have both, so during checkout if they are purchasing a product, they should be able to give payment details for ACH and payment will be done. But on subsequent usage, they can just reuse their existing info.
that's the flow I sent you in my previous mesage
On the other hand, if they want to add their payment info in their profile, they should be able to add ACH credentials, which will appear when they purchase some products.
that's the flow that my colleague sent you https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=elements
In the first one, https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment?web-or-mobile=web&payments-ui-type=direct-api Does it need that PCI compliance, as it says to create a custom form.
Also I ended up on this tutorial yesterday also, but the file names are confusing. There is index.php , then checkout.php, then checkout.html and some scripts like client.js and script.js but nothing is said about where to use these scripts in which file and what role the checkout.html plays, and checkout.php has the form rather than checkout.html. Please if you can elaborate on it.