#DominicB-test-mode-account

1 messages ยท Page 1 of 1 (latest)

olive turtle
#

Hi again ๐Ÿ‘‹ let's talk here

#

What's going on?

vernal fjord
#

Hey! Sorry was getting late yesterday and had to leave. Tried to make it work today but yeah after some testing I'm still confused about the "test-only" accounts.

What I have been doing so far is from connecting an account from the link provided by the dashboard "Connect" tab. Made sure I was in Test mode.

You mentionned creating a new account from this onboarding flow (or by the api, but wanted to try it with the UI first). I tried that but the flow requested real account information even in test mode. I then found some docs on test data for accounts here: https://stripe.com/docs/connect/testing#creating-accounts. But when using that, there was an error telling me that this was known test data (even though I was in test mode still).

So that left me perplex and not sure how to proceed with creating this "test-only" account. ๐Ÿ˜•

#

๐Ÿ˜ฎ Oh! I tried a lot of different things recently and just now 2 more accounts showed up in the connected tab of my platform account. One of them is restricted and looks like the google pay flow is working. Sadly, I'm not sure which of my attemps produced this connection... Could it be when I tried using a private window and skipped the form?

olive turtle
#

Could it be when I tried using a private window and skipped the form?
I'm not sure, but from what I recall from our conversation yesterday, it seemed that you had only tried updating an account that had already been created to make it test-mode only (which will not work with testing Google Pay), so I can only assume that you created a new account and did not activate it (which will work with testing Google Pay)

vernal fjord
#

I also tried to create a new account from the flow (in test mode), but encountered issue with using either real account informations or test account informations.
In all of these attemps, I was logged into my platform account. This seemed to be the real problem (and the unclear part, at least to me).

As soon as I tried in a private window (or if I logged out I imagine it would have worked too), I could now just use the SKip the form button, and it looks like that created the Restricted account (what I now understand is the "test-mode only" account)

#

Does my comprehension of the issue makes sense?

olive turtle
#

It does. I think Stripe just tries to be extra helpful about it so that you can link previously created accounts, but when you're testing it's not very helpful

vernal fjord
#

Yes there is a bit of confusion with this flow and the google pay edge case. About that, does this mean that it would be impossible to test the Google pay flow with a real (non-restricted) account connected to our platform account?

olive turtle
#

Yes. That would require you to create a live-mode charge with a real card, so you shouldn't test anything in live-mode

vernal fjord
#

That's too bad, and this is only for google pay, correct? Other wallets should work fine when using test mode on an unrestricted account?

serene flicker
#

Good question. two-shoes had to step out but I am catching up and looking in to it

#

To clarify, what is the error that you see when you try to test google pay now? Is it an error when creating the payment intent or something?

vernal fjord
#

It was the infamous DEVELOPER_ERROR in loadPaymentData: Invalid Stripe:publishableKey for current environment.. This happened when initializing stripe with the pk_test key and providing a connected account id

#

Seems like there is an edge case with google pay which forces us to use a restricted account for testing google pay.

serene flicker
#

Hey sorry for dropping off this thread for a bit. What call in your stripe code is producing that error?

vernal fjord
#

No problem! It was an error outputed by the stripe JS lib when using google pay (click on the Pay button in the Google pay desktop interface).
However, the error has been fix when I understood the quirks of connecting a "test-only" account (restricted). The cause from what I was explained is an edge case and limitation of Google pay in test mode which forces us to use a "test-only" account.

#

I wanted to confirm that this limitation only applies to Google pay and not Apple pay and other wallets

#

Since that means our connected accounts can't test the Google pay flow without making a live transaction

#

Does that makes sense?

serene flicker
#

I think that that makes sense but I am surprised by that behavior. I thought that in test mode you can still make google pay payments without activating an account. Can you send me the exact Stripe.js code that you are using here? I will try to see if I can get it to work myself

vernal fjord
#

Yes, in the meantime, apart from my own thread, you can search for the error in this channel has this is where I get most of my understanding of the issue. Here is an example: #933243456359370762 message (see karllekko's answers)

I'll send you the code asap

#

So this combination of pk and stripeAccount was problematic:

const stripe = Stripe(
            'pk_test_51KnOpQEL4e65GS5odGbpu8WdWUpkpEO2eDqlixCnRcALo7A9UUPNYh7rnY7HFD10E3I17V2YrLhX5ZB97Quz8zmm00daIeU7an',
            {
                stripeAccount: 'acct_1JysR3LiY5F9tBM7'
            }
        );

Afterward, you can create a basic paymentRequest and create a paymentRequestButton element on a google pay enabled device to test it

#

From the dashboard, you can see both connected account (in test mode). The Restricted one works, while the Complete one does not.

serene flicker
#

Thank you for the clarification. I am still looking in to the Google Pay side of this but I do have a solid answer on ApplePay that I think is worth sharing in the meantime

#

Wait actually, taking a step back. You are using direct charges here with Standard connect accounts, correct?

vernal fjord
#

Yes, correct!

serene flicker
#

Gotcha. I am still trying to wrap my head around some of how you can best enable your users to test this here.

The Apple Pay equivalent of this is that connections need to be in live mode for Apple Pay to work, even in test mode. So if my understanding is correct you may need a live mode and test mode connection to each account if you want to test with both ApplePay and Google Pay.

#

I am double checking on my understanding here. The restrictions here make it a bit unclear what is needed to be able to test both wallets

vernal fjord
#

Hehe, yeah it gets confusing fast. Just so I validate some terminology:

  • The connection can be either made in live or test mode. This is only the mode of the connection from the "platform" account, not the state of the connected account.
  • The connected account can be either test-mode only or live account. Is this the same as Complete vs Restricted? Or is this another distinction that does not map to live vs test-mode?
slow yarrow
#

Yes to the first part

Is this the same as Complete vs Restricted? Or is this another distinction that does not map to live vs test-mode?
this is unrelated, this is just a badge in the Dashboard to tell you the state of the account and the verification of its PII

vernal fjord
#

Ok thanks, that helps. So how do we distinguish between a test-only and live account?

slow yarrow
#

you don't really it doesn't matter, it's the wrong way to look at it

#

you only get a Test-mode only account if you actively create one via the API in Test mode.

vernal fjord
#

Ok perfect, couldn't get this clear answer before. Looks like creating one from the oauth onboarding generated from the dashboard in test mode (and then opening it in private window) also creates a test-only account, no?

slow yarrow
#

No

#

but really what is your real question, those are things you don't really need to know/dig into so you must want to know something completely different

vernal fjord
#

Well I'm digging into this because I get told on one side that Google pay can only be tested with a connected account when this account is test-mode only.
And then that test-mode only accounts can only be created from the API. But the connected account that finally worked was not created using the API, it was created using exactly the steps mentionned above:

from the oauth onboarding generated from the dashboard in test mode (and then opening it in private window)

#

So what am I missing?

slow yarrow
#

Google pay can only be tested with a connected account when this account is test-mode only.
I have never heard of this so I'm fairly sure this is confusion overall

#

do you have a URL I can look at where Google Pay doesn't appear?

vernal fjord
#

The button appears, but stripe.js throws "DEVELOPER_ERROR in loadPaymentData: Invalid stripe:publishableKey for current environment. Make sure you are using Stripe's test key." when trying to complete the payment.

#

I was told yesterday in the thread linked initially about having to use a test-mode only account, but maybe it was a miscommunication or misunderstanding on my part

slow yarrow
#

what's the account id?

vernal fjord
#

platform account: acct_1KnOpQEL4e65GS5o
connected account (not working): acct_1JysR3LiY5F9tBM7
connected account (working): acct_1LDXmpBtGoUrThhA

slow yarrow
#

Can you share a URL where I can reproduce myself?

vernal fjord
#

This is not live yet but let me try and build a minimal example real quick

vernal fjord
#

Created a minimal example and it worked with the previously non working account.
Tested in app and it also works. So I guess the problem is really solved! Still remain a bit unclear what happened but there maybe was a delay between the account appearing in the dashboard and it actually working. Or I did something stupid, who knows!

Anyway, thanks for taking the time to dig into it.
Cheers!

slow yarrow
#

yeah there shouldn't be a delay