#mattiaferrari_code

1 messages · Page 1 of 1 (latest)

maiden breachBOT
#

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

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

boreal shell
#

hi there!

sturdy forum
#

hi

boreal shell
#

you are creating the PaymentIntent in .NET?

sturdy forum
#

Nope this is the stripe terminal java/kotlin sdk

#

the payment intent is created from the on device app in the client

boreal shell
#

the payment intent is created from the on device app in the client
the PaymentIntent need to be created from the backend.

sturdy forum
#

what

#

and then why there is the possibility to create it from the client sdk?

boreal shell
#

I'm a bit confused about your flow. can you share more details on what exactly you are tying to do?

sturdy forum
#

Ok

#

I have the app deployed on the terminal device

#

the terminal is authenticated with the connection token retrieved from my backend

#

once my merchants that have a connected account insert an amount in the app, the app creates a payment intent

#

From what i see here the intent is created on the client

boreal shell
#

yes, you are right, sorry about the confusion.

#

are you creating a Direct Charge, a Destination Charge, or a Separate Charge & Transfer?

sturdy forum
#

the thing that i m missing is how to set the connected account id from this create payment intent client call

#

are yuo creating a Direct Charge, a Destination Charge, or a Separate Charge & Transfer?
I am still testing

#

Im trying with direct in this case

boreal shell
#
val params = PaymentIntentParameters.Builder()
        .setAmount(1000)
        .setCurrency("usd")
        .setOnBehalfOf("{{CONNECTED_ACCOUNT_ID}}")
        .setTransferDataDestination("{{CONNECTED_ACCOUNT_ID}}")
        .setApplicationFeeAmount(200)
        .build()
sturdy forum
#

how much does it change using direct vs destination from the code perspective

boreal shell
sturdy forum
#

Mhh but isn't that header a server side only thing?

#

I don't know how to set that header from the java client

boreal shell
#

not sure either, looking.

#

can you try something like this:

val params = PaymentIntentParameters.Builder()
        .setAmount(1000)
        .setCurrency("usd")
        .setApplicationFeeAmount(200)
        .setStripeAccount("acct_xxx")
        .build()
sturdy forum
#

there is no method like that

boreal shell
#

looking into this

boreal shell
#

wait, there is some informaiton about this here:

When creating a PaymentIntent client-side for direct charges, you don’t need to specify any additional parameters for the PaymentIntent. Instead, when creating a ConnectionToken, set the Stripe-Account header to the connected account accepting payments. The client SDKs create the PaymentIntent on the same connected account the ConnectionToken belongs to. For more information, see Create PaymentIntents Client-side.
https://docs.stripe.com/terminal/features/connect?terminal-sdk-platform=android#direct-payment-intents-client-side

sturdy forum
#

Ahhhhh

#

Ok thats good

#

One last thing

#

Reguarding the most recent thread that i opened, the one about the terminal app review