#shalu-kumari_api
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/1285545753715933239
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- shalu-kumari_api, 15 minutes ago, 19 messages
What's the error message?
PaymentMethods of type us_bank_account must be verified before they can be attached to a customer.
I see you're creating the PaymentMethod by just calling POST /v1/payment_methods which won't work. You need to go through a Payment Method setup flow to be able to attach it to the Customer: https://docs.stripe.com/payments/save-and-reuse
But I need to used the API request
What do you mean?
Hey I need the payment Successful based on Ach method using curl rest api request
Here is the followed step
- create customer - done
- Create payment method - done
- create payment intent - done
- Verify the payment intent - done
Now I am using again same payment method id and customer id to create the payment intent then showing error
However, when I try to reuse the above payment method ID, I encounter an error.
The provided Payment Method cannot be attached. To reuse a PaymentMethod, you must attach it to a Customer first.
when i resolving this issue that need to attached the customer first in the payment method
Noted First time payment done successfully ,But need to future as i need those payment method attached their customer.
Please resolved this issue
Here is the followed step
Where did you get these steps from?
give a min i am creating the log in stripe account for all the step
hey i have creating the log
please checked
First time created successful payment - req_lgFKulwGtyEekw
Second time error shown - req_D8GboxzkPGdr5D
If you want to save a Payment Method to charge it in the future you should follow this guide: https://docs.stripe.com/payments/save-and-reuse
The way you described it here is not correct.
If I am using invalid param for payment method ,Can you provide the valid param so can i hit the API request and checked it,If you want some other another api please suggest me give the api ,Please don't provide the document
As explained by my colleague, your entire integration is build wrong if you're trying to save and reuse ACH payment methods. It's not a case of just changing a parameter, you need to start over and following the guide here: https://docs.stripe.com/payments/ach-debit/set-up-payment
Happy to answer any questions you have about that guide
I have tried with setup intent but they give the error here is the request id -req_YD3coUkBLXWtn5
If i have missed any with the create setup intent then please suggest me
Sure, the error is pretty verbose right? It explains the problem with that request quite clearly
If you follow the guide I linked, you'll see that the Setup Intent is created without the payment_method parameter. The pm_xxx is generated by the Setup Intent once it is successfully confirmed
when i go to setup intent confirmed then need to be payment method ,I'm passing the payment method id then showing an error
here is the error req_D8GboxzkPGdr5D
Yep, because pm_1PzyQa2KmEgiewTQ9VhdEuAZ is not attached to a customer. If you created it correctly via the Setup Intent flow I linked then that would handle this for you
so how we can attach the customer becuse already they give error
You follow the guide I linked earlier end-to-end
Right now you're creating Payment Method objects (pm_xxx) manualy through the API and that is not the corect way to integrate. It doesn't correctly save the details for reuse, it doesn't correctly setup the banking details with a mandate
when i attach the customer then shown an error
req_dniQOh1wpAwdCJ
The guide I've linked is the correct way to collect ACH details and save them for future payments
can you please do that ?
Can I please do what?
the above task
No, we don't write code here
if you are unable to do, kindly assign it to other agent
hi! I'm taking over this thread.
as mentioned previously, you need to follow this guide: https://docs.stripe.com/payments/ach-debit/set-up-payment
hey as per the documents i have 1 and 2 steps done but the 3 rd step for verify the setup intent then showing an error
request id - req_D8GboxzkPGdr5D
after that i have tried to attached the customer then also giving an error if i am wrong then can you please do that
here is the attached customer error- req_dniQOh1wpAwdCJ
my client don't want to used the payment method handle in the font side then want used in the backed side
you didn't follow the guide at all. you didn't use a SetupIntent to create the PaymentMethod.
here is the request id from create setup intent and i have not used the payment method- req_uyak1q3LLQAnrZ
there status is requires_payment_method
great! so now you need to do step 3 to collect the payment method for the SetupIntent.
In the third step they showing the client side -script.js
I need to used server side
you want the user to enter their banking information themselves, so you should use Stripe.js on the frontend for this.
hey i have already bank information in my data i want only used in the payment method
as you saw earlier (req_CgWec0ymD8QG0F), you cannot attach a bank account payment method to a customer without verifying it first. so you have to do this on the frontend with Stripe.js
yes you right ,I have tried to attached the bank account method to a customer so they give error req_dniQOh1wpAwdCJ and also i have mentioned to you don't used frontend side.
hey is there way to achived that then please provide me Otherwise you can provide the formate this is not possible so i can shared with the client
You can actually do this, but instead of attached it like this, you should use the PM to confirm a setup intent
that will allow your customer to verify the bank account and when the setup intent is successful, the bank account PM will be attached to the customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Create a setup intent specifying the customer, payment_method and confirm=true
๐ช
You already use that payment method. Unless set up for future use & attached, payment methods are one-time-use only.
Create the payment method again from the bank details and try that request
You need to do the setup intent as the very first thing you do with that payment method
What's the customer flow here, roughly speaking?
I have create new account yesterday's there is no any transaction is created only one payment method and one customer then also this type error i have verified
here is my new account you can also checked - acct_1PzZcnRvep6oj5IC
For the payment method in this request, you had previously created payment intent pi_3PzyyN2KmEgiewTQ0WIgQ4If
Check what, exactly?
That's a stripe account id
yes , this is new stripe account .i have created the customer ,and payment method .
when create the setup intent the show error req_vwAv1fA76LiwUS
the stripe account shouldn't matter here, just the sequence for the bank payment method
interesting. in this case there is no payment. OK.
I'm testing the flow, give me a few more min
When i test this flow, I'm able to confirm the setupintent and get into a requires_action state
yaa thanks
Trying to figure out how your flow is different
i am creating the PM the same as your example
then confirming a setup intent like this:
curl --request POST \
--url https://api.stripe.com/v1/setup_intents \
-u sk_test_123: \
--data 'payment_method_types[]=us_bank_account' \
--data confirm=true \
--data customer=cus_123 \
--data usage=off_session \
--data 'mandate_data[customer_acceptance][accepted_at]=1726580125' \
--data 'mandate_data[customer_acceptance][online][ip_address]=1.1.1.1' \
--data 'mandate_data[customer_acceptance][online][user_agent]=cooool' \
--data 'mandate_data[customer_acceptance][type]=online' \
--data payment_method=pm_456
same way
Oh, i see
you're re-using the PM after it was already consumed here: https://dashboard.stripe.com/test/logs/req_XK9YbzZukmrDxi
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
when you got the error about needed mandata_data
Create another new unused PM and try your now complete setup intent request again
mandata_data is required i have forgot ,
but i create the new the again setup intent for paymnet then you can checked the next log -req_o5eK2PIhChfBz9
You're still using that same PM id
You cannot use that
you need to create a new payment method
Throw away pm_1PzaANRvep6oj5ICJON3mR1U and forget it ever existed
you can't use it for anything any more
okay wait i trying
i have create the seti_1Q02VWRvep6oj5ICy8sy8zkm
then next step
hey are you available?
Glad you were able to get that part working! My colleague @devout dove can help you from here, but broadly you need to now handle the next_action to complete the verification, in this case your customer will receive microdeposit(s) to their account and will need to provide details from that at the URL
so how can achived this?
Hi there ๐ you either direct your customer to the hosted_verification_url provided in the next_action hash on the intent if you want to surface the verification flow to the customer, or you collect the mircodeposit amounts/verification code from your customer and make a request to verify the provided details:
https://docs.stripe.com/api/payment_intents/verify_microdeposits
i have verify done so how we can payment amount give
How to create the transaction after the setup inetnte is verified
Once you have the verified Payment Method you create a Payment Intent to process a payment with it.
so how we can paymnet method on this verifyed setup inetnt
I don't understand what you're trying to ask, would you mind trying to rephrase the question?