#nova-connect-oauth
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- nova-card-cloning, 2 days ago, 25 messages
nova-connect-oauth
๐ I'm sorry I don't understand most of the question right now. What do you mean "test payout accounts" exactly?
๐ A picture might help
This config won't let me continue. The account numbers are pulled from your 'Testing Stripe Connect' documentation. If I inspect the network call I get this
The error message mentioned it. Can you paste its content here ๐
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such token: 'btok_1O7pG4Iw1p1PjYxmcLBNRikB'; a similar object exists in test mode, but a live mode key was used to make this request.",
"message_code": "missing_resource_with_message_about_livemode",
"param": "external_account",
"request_log_url": "https://dashboard.stripe.com/logs/req_vQHHiMnr703MR3?t=1698886780",
"type": "invalid_request_error"
}
}
However this makes no sense. The picture above shows I am in test mode, and I have verified I am using a test mode key.
I should also add, the web page doesn't actually show the error. I have to inspect to see what went wrong, the page just spins for a bit then does/shows nothing.
You sure? https://dashboard.stripe.com/logs/req_vQHHiMnr703MR3 on your Dashboard made in Live mode
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
If I am in live mode, why is there 'Test Mode' on the page*
Can you share the URL for me to double check?
If it helps, here is the code I am using.
@Override
public ResponseEntity<Void> initiateOauth2Authorization () throws AuthenticationException, InvalidRequestException, URISyntaxException
{
Map<String, Object> params = new HashMap<>();
params.putAll(Map.of("scope", "read_write", "redirect_uri", this.connectRedirect));
String url = OAuth.authorizeUrl(params, null);
return ResponseEntity.status(HttpStatus.FOUND).location(new URI(url)).build();
}
The URL returned from the code is
https://connect.stripe.com/oauth/authorize?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapi%2Fv1%2Fstripe%2Foauth%2Fconnect&client_id=ca_IVPIlXPWG1btoakCoNBoyBCT63Hxw6a0&scope=read_write
And the test mode client ID is ca_IVPIlXPWG1btoakCoNBoyBCT63Hxw6a0
So at least to me, it looks like Oauth,authorizeUrl pulls the correct client ID automatically.
Okie I am trying to reproduce. When completing this form, do you see or use this "Skip this form" button?
I see the skip this form button yes. I do have an issue however where the account ID I get from connecting my account this way is incorrect.
Its a totally unrelated account ID, and creating a customer (and then immediately retrieving it) fails, and the customer is never created on the connected account.
That account ID is neither of my accounts (the platform, nor the test account)
Let's focus on this part
If i don't skip the form, I cannot proceed past the step where I add a payout address. The web call comes back telling me that the account token was made in test mode, but a live mode key was provided. At this point, I am unsure what I am doing wrong, and could use any help I can get.
I am trying to reproduce, 1 min
Understood. Both of these issues are preventing me from continuing, so im hoping they are related to me doing something wrong
I can get pass that page
With the exact bank account credentials I am using?
No with some other information. But yes the request was created in Test mode as expected https://dashboard.stripe.com/test/logs/req_XHcz96Y3d48TA5
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Don't think the information would change the mode
Is it possible that account/transit combination is the one that is broken then?
Not sure. Can you provide some screenshot about this?
If I skip the form, the return URL I provided is completely ignored and tells me that the URI needs to match exactly one of the uris specified in my application settings (it does)
I have fixed the other two errors on my own.
One of them is (imho) a bug in stripe, caused by a bug in my code.
Glad to hear you sorted out! But what was it?
When you receive the oauth grant back from the stripe service, it can be parsed into an oauth token like this.
TokenResponse response = OAuth.token(ImmutableMap.of("grant_type", "authorization_code", "code", code), null);
JsonObject rawResponse = response.getRawJsonObject();
com.stripe.model.Account account = com.stripe.model.Account.retrieve(response.getStripeUserId());
The account ID from response.getStripeUserId was the one I was storing, expecting that to be connected stripe account. It is not, and the one I need to store is account.getId(). The bug however, is that I can still use the response.getStripeUserId value in my Stripe-Account header and it works perfectly fine (returns a 200 response, customer objects and everything).
However, anything created using that getStripeUserId call is ephemeral, and cannot be retrieved.
I see. So have it resolved your original question? It looks like you finished the Onboarding flow and reached the token exchange step successfully