#ryancwalsh

1 messages · Page 1 of 1 (latest)

late geodeBOT
latent rock
#

As the error says, you cannot accept them automatically for Express or Standard accounts. You can do this with a Custom account, so if that would be sufficient for your tests you can try that and fill out the tos_acceptance hash https://stripe.com/docs/api/accounts/create#create_account-tos_acceptance

#

Otherwise unfortunately manually accepting the TOS would be the only way to go. Can you tell me more about what specifically you are trying to test that requires a lot of Stripe accounts to be set up like this?

heady verge
#

We have a marketplace where music teachers post profiles offering lessons, and students can come in and buy lessons.

There are lots of different permutations we want to test (via Cypress).

latent rock
#

Can you tell me more about the permutations and what you are testing about them?

heady verge
#

Since you mentioned Custom, I'm now looking at https://stripe.com/docs/connect/accounts#choosing-approach and wondering if maybe I should just set type: "custom" in my seed data so that automatic TOS acceptance is allowed.

Maybe the difference between Custom and Express isn't something we'd need to worry about for testing purposes?

#

Generally we want to keep our test environment as close to production as possible, so that makes me nervous.

Maybe I need to just accept the fact that we'll need to manually log in and accept TOS. I think it will drive us crazy, though.

latent rock
#

Express and custom do behave pretty similarly, so that definitely could be a valid option depending on what you are testing.

#

If you aren't testing things like Stripe API calls, it may make more sense to mock things out and just provide your system with, say, json of different permutations of account data and have your system handle that

latent rock
heady verge
#

When our students buy lessons via PaymentElement, we do a Transfer to the destination Connect account. That's the part that's failing because TOS isn't accepted.

latent rock
#

Gotcha, you can fill out most of the info for an Express account when creating it. So you may have luck filling out this info and then just directing your test users to our onboarding page to accept the TOS

heady verge
#

Yeah, it's just a hassle since it requires being logged in as a student and browsing the marketplace and finding a teacher and then manually logging in separately as that teacher to accept the TOS and then (back in the first browser as a student again) buying the lesson.

latent rock
#

Yep, definitely get that. I have to set up a lot of test accounts myself. Standard is especially fun but that is another story

#

One last idea I have is that you can ask our support team if it would be possible for them to convert some Custom account to Express accounts in test mode for you. If they can do that, you can create a bunch of these Custom accounts and do that conversion. To be completely honest I think it is unlikely that we can do that for you in test mode but I think it is worth asking

heady verge
#

Interesting. Ok, thanks for your help on this.