#harshil-ahir_code

1 messages ¡ Page 1 of 1 (latest)

burnt anchorBOT
#

👋 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/1286545412173332512

📝 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.

untold otter
#

hello! I see bismarck mentioned that you should be passing in mandate data : https://docs.stripe.com/api/setup_intents/create#create_setup_intent-mandate_data-customer_acceptance when creating the SetupIntent.

Going back a couple of steps, is there a reason why you're not creating a SetupIntent with payment_method_types: ['us_bank_account'] and then using the Payment Element to collect the payment method details? In that way you won't have to explicitly pass in the mandate data via the API

uncut parrot
#

But thats the issue how can i pass tha mandate data

uncut parrot
untold otter
#

what do you mean by how to pass the mandate data? What have you tried?

#

the API specs seem fairly clear to me - is there something specifically that you don't understand?

uncut parrot
#

Yeah i am getting error on these api that mandate data is null

#

So how can i pass tha t

untold otter
#

what's your code snippet where you're passing in the mandate data?

#

in the initial code snippet that you shared, you aren't passing in any mandate data at all

uncut parrot
#

right now i am not passing mandate data so i am getting error of mandate data

untold otter
#

well, then why don't you pass in mandate data?

uncut parrot
uncut parrot
untold otter
#

to be clear, we're not freelancers that you pay to write your code for you. You are the developer here, and you need to write and own the code here.

I'm still not sure what specifically you mean by how can I pass it when we've been repeatedly pointing you to our API specifications which mentions what are the parameters / values to input. If you're looking for our Java docs, they're here : https://stripe.dev/stripe-java/index.html

uncut parrot
untold otter
#

what do you mean by there is no mandate data available in documentation? Do you not see the above in our API specs?

uncut parrot
#

I am writing code for its still its showing error brother

#

Error show no suggestion

untold otter
#

Please share clear details of what you're doing right now and what you expect to see. We cannot help without any details.

#

When you're asking for help, think of it from the perspective of what details would you need if someone went to you for help.

uncut parrot
#

SetupIntentCreateParams params = SetupIntentCreateParams.builder()
.addPaymentMethodType("us_bank_account")
.setCustomer(customer.getId())
.setPaymentMethod(paymentMethod.getId())
.setConfirm(true)
.setMandateData(
SetupIntentCreateParams.MandateData.builder()
.setNotificationMethod(SetupIntentCreateParams.MandateData.CustomerAcceptance.Online)
.build()
)
.build();

i am passing mandatedata like these and i am getting error in line seNotificationMethod which is not showing any error type but in IDE its showing error

untold otter
#

what's the error in the IDE that you're seeing?

#

also, you should be passing in IP address and user agent for online mandates, I don't see that anywhere in your code snippet

uncut parrot
#

but i am thinking of another way like from dashboard payment if i create a token and add attach that token to the customer and i can verify it from dashboard will it work

#

like if the credentials are wrong then token can't generate so i will show an error for that

#

and the admin can directly verify through stripe dashboard what you say will it work

untold otter
#

do you mean the IDE is not giving any code suggestions for mandateData related methods?

uncut parrot
#

But can you tell me something related to my 2 idea where admin ka verify by sending small amount through dashboard

untold otter
#

what version of the stripe-java SDK are you using?

#

but i am thinking of another way like from dashboard payment if i create a token and add attach that token to the customer and i can verify it from dashboard will it work
like if the credentials are wrong then token can't generate so i will show an error for that
and the admin can directly verify through stripe dashboard what you say will it work

I don't know off the top of my head if that will work. We mainly handle API integrations here. You can test it out and see if it works

uncut parrot
untold otter
#

going back to your code, is this what you're seeing?

uncut parrot
#

Yes

untold otter
uncut parrot