Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding "stripeAccount" param for direct charges fails the transaction #10

Closed
yosefsun opened this issue Oct 31, 2018 · 4 comments
Closed
Assignees
Labels
integration Integration help

Comments

@yosefsun
Copy link

yosefsun commented Oct 31, 2018

When I try to create a direct charge on behalf of a connected (stripe connect) account, I recieve an error.

I added to the paymentParams the following param (after initialization of the params with amount and currency) :

paymentParams.stripeAccount = "[some_stripe_connect_acct_id]"

I recieve :

Confirm PaymentIntent Failed
No such paymentIntent: [some_payment_intent_id]

  • btw, destination charges for the same account are working

screenshots :

screen shot 2018-10-30 at 10 50 50 pm

screen shot 2018-10-30 at 10 51 08 pm

@yosefsun yosefsun changed the title Adding "stripeAccount" param fails the transaction Adding "stripeAccount" param for direct charges fails the transaction Oct 31, 2018
@bg-stripe
Copy link
Contributor

Hey @yosefsun ,

Thanks for reporting this issue. I think you've indeed found a bug – we'll be sure to get a fix into the next SDK release (~1-2 weeks from now).

I'll update the issue when the fix is out!

@bg-stripe
Copy link
Contributor

Following up – just had a chance to look into this a bit more closely. The issue here is actually that you'll need to set a Stripe-Account header when creating the connection token on your backend.

Previously, this wasn't supported in the example app's BackendSimulator, so I've updated the example app in #12 to support passing a stripeAccount when creating a connection token. If you want to try this out in the example now, you would set your stripeAccount here:

self.backend.createConnectionToken(stripeAccount: nil, completion: completion)

Note that in your own app, you should not create the connection token or capture the PaymentIntent client-side (we do this in the example app for demonstration purposes only). Be sure to create the connection token by setting up an endpoint on your backend.

Let me know if you have any additional questions!

@crawler
Copy link

crawler commented Oct 18, 2019

What if Terminal should process both, direct charges tho the connected account, and the charges to the platform account, that being split later with the Transfers? If i create connection token to the platform account, then the terminal can't see payment intent that i created for the destination charge with connected account id. If the connection token is created for the connected account, then the Terminal can't see payment intents created for the platform account.

@jil-stripe
Copy link
Collaborator

Hi @crawler!
To process for different accounts (including connected & platform accounts) using the same reader, you'll need to disconnect and reconnect the reader to switch from one to the other.

Could you tell us a little bit more about how you're using Terminal, either here or by emailing support-terminal@stripe.com? We might be able to give you more specific advice if we have more information about what you're trying to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Integration help
Projects
None yet
Development

No branches or pull requests

4 participants