#damored61
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.
- damored61, 3 days ago, 8 messages
- damored61, 5 days ago, 7 messages
- damo-pm-details-apm, 5 days ago, 11 messages
Hi
Actually you need to set the Stripe Account Header, when creating the Checkout Sesison
https://stripe.com/docs/connect/authentication#stripe-account-header
hi, sorry we're already doing that, that's what I meant by
"passing the account into the "request_params" "
currently we creae the request option using the builder :
RequestOptions requestOptions = RequestOptions.builder().setApiKey(apiKey).setStripeAccount(stripeConnectedAccountId).build();
then passing that into our session :
SessionCreateParams.Builder params = SessionCreateParams.builder()
.addPaymentMethodType(type)
.setMode(SessionCreateParams.Mode.SUBSCRIPTION)
.setCustomer(customerId)
.setClientReferenceId(reference)
.addLineItem(new SessionCreateParams.LineItem.Builder()
.setQuantity(1L)
.setPriceData(SessionCreateParams.LineItem.PriceData.builder()
.setProduct(productId)
.setUnitAmount(unitAmount)
.setCurrency(currency)
.setRecurring(SessionCreateParams.LineItem.PriceData.Recurring.builder()
.setInterval(stripeInterval)
.setIntervalCount(intervalCount.longValue())
.build()
)
.build())
.build())
.setSuccessUrl(successUrl.toString())
.setCancelUrl(failureURL.toString());
Session session = Session.create(params.build(), requestOptions)
but what we're seeing is that it still creates the subscription against the main account , not the specified connected account
Can you share the Checkout Session Id ?
i believe so yeah, this should be the id of a checkout session that was made with a connected account id set to "acct_1NXlIhHDZYLSKlzY" :
"cs_test_a1MOG2kWdMTgEbifohI34hquz9ocdy97JhdqG0B7YvrvTK4QahTMTFkUL8"
the specific event in the dashboard is : "evt_1OdsvvBAfHXJh6DisieOmxbz"
According to the creation request req_VwrqvKLrPwg8wc
You are not passing the Connect account header
Have you had the chance to debug your code ? what was the value of stripeConnectedAccountId
that's odd, could be that we're missing setting the header somewhere. It should have been "acct_1NXlIhHDZYLSKlzY". I'll steo through the code again just to be sure it's actually being set as I expect
Yes please, and don't hesitate to debug it and double check that all values are set correctly.
hey, have done some more thorough debugging and found the issue on our end (account id being pulled from the wrong place) thank you so much for your advice and patience!