#BRData
1 messages ยท Page 1 of 1 (latest)
Hi ๐ we no longer recommend leveraging OAuth flows that allow people with existing Stripe accounts to connect to your Platform, instead we recommend that you create an account for them (similar to how you do for Express) and provide them with an Account Link so they can provide any necessary onboarding information.
This process is covered in more detail here:
https://stripe.com/docs/connect/standard-accounts
Okay then on a payment intent how do insure that the payment goes to the correct account id?
[HttpPost]
public ActionResult Create(PaymentIntentCreateRequest request)
{
var paymentIntentService = new PaymentIntentService();
var paymentIntent = paymentIntentService.Create(new PaymentIntentCreateOptions
{
Amount = CalculateOrderAmount(request.Items),
Currency = "usd",
AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions
{
Enabled = true,
},
});
return Json(new { clientSecret = paymentIntent.ClientSecret });
}
Where do I include the account id that the money is sent to?
If you're using Standard Accounts then you should be using Direct Charges:
https://stripe.com/docs/connect/direct-charges
The code snippets in the above document will show you how to leverage the Stripe-Account header to make requests for your Connected Accounts:
https://stripe.com/docs/api/connected_accounts
Hmm
When using direct charges how do I go about changing my current setup https://stripe.com/docs/payments/quickstart which is there in .net
because right now my create method returns a json of the clientsecret - do I not need that anymore if I am using direct charges?
I'm not following. You still need the client secret. Did you run into problems when following the instructions from the document for creating Direct Charges? It walks through how to create a Payment Intent.
You will need to replace {{CONNECTED_STRIPE_ACCOUNT_ID}} with the ID of the Connected Account, at the very least to get the server-side code correct. What is your frontend approach for processing payments, the Payment Element?
Yes ofcourse I know that I am more talking about backend
My exact approach right now is from herE:
It is basically copy and pasted from there
Then yup. Are you encountering errors when trying to run that updated code?
No I havent ran it yet because I havent created a connected account (unless there is a test connected account ID I can use) but it doesnt make much sense to me how does adding these two lines "var requestOptions = new RequestOptions();
requestOptions.StripeAccount = "{{CONNECTED_STRIPE_ACCOUNT_ID}}";" change the payment intent?
It seems like Im not altering the payment intent at all by including those two lines of code
Did you want to alter the Payment Intent? Those lines change the Account that the intent is created in. Without those the intent would be created on your Platform account, which is not the correct process for Direct Charges, including those lines causes the intent to be created in your Connected Account instead.
Yes I want the payment intent to happen on the connected account.
Just seems like those two lines dont alter the payment intent to do that as its just altering the requestoptions object which doesnt seem to be used by the paymentintent object?
Oh, sorry, I didn't spot the discrepancy between the code you share and our sample code at first. Your code won't use the requestOptions as written, you run .Create before those are created and don't pass the options to that function.
Is this the snippet you're seeing in the docs that I linked?
Yes!
Thats what im trying to incorporate into this: https://stripe.com/docs/payments/quickstart
Then you will want to replace the Payment Intent creation code from the quick start (looks like lines 53-61) with the code from the Direct Charges doc.
Yes but what would I return?
The client secret
Do I need the service.Create line as well?
Along with that how do I get the client secret?
is it service.clientSecret?
๐ stepping in for my teammate! As toby mentioned, the major difference between the quickstart code and the direct charge for Connect code is adding the Stripe Account header when creating the PaymentIntent
That is what I currently have
is having the .Create method neccessary? Along with that how do I get the clientSecret?
Looks like the direct charge code uses a variable for .Create while the quickstart guide does not. Really up to you how you want to handle
I think you can do something like:
var paymentIntent = service.Create(createOptions, requestOptions);
then obtain the client secret with paymentIntent.ClientSecret
I recommend trying this out
I think that worked!
How would you go about testing this if you dont have a connected stripe account ID as this is not in production yet
is there any test account id's I can use?
You can create test connected accounts and go through "onboarding" using an account link
You can use the information here to onboard a connected account that simulates successful verification: https://stripe.com/docs/connect/testing
Hi, so I just created a stripe test account and got the test account account ID
and placed it in my code for testing purposes - but it says the test account is restricted and cant accept payments
Right, exactly. You'll need to create an account link for that test account in order to go through onboarding (this is similar to onboarding that live connected accounts will need to go through before they can accept payments)
I did create an account link and it said "youre in test mode" and gave me a button to skip the form
Also im getting this error:
Okay, let's take a step back.
After creating the account link, you should open that link in a new browser or incognito window. You might see some options to skip certain onboarding steps (or autofill them with test data) but you should make it to a final page that says something like "submit" or "complete". Did you make it to that step?
Should I skip this?
Or actually put in real information?
I would rather fill all of this out with test data, like it asks me for my phone number and I need to verify it and stuff but why would I need to do that in test mode
You shouldn't skip this
Here's the test information you should use: https://stripe.com/docs/connect/testing
ah, you can try your real phone number here
this will just be used for login/2fa I believe
Is there no way to do a test number?
Also more importantly do you have any idea why this is showing up?
Is that because the test account isnt verified yet?
Not for this specific part of the flow, no
Also I put in my phone number
Looks like you're also implementing the Link Authentication Element in your frontend?
and its now asking for this
I dont think this is how to test standard accounts
as the documentation says thats only for express and custom accounts
This is good progress! Yes, this is how to onboard test standard accounts. You can use the 1901-01-01 date of birth, any first name, last name, and email address
For the address, you can use your real address or use address_full_match for line_1 and real values for city, state, and postal code
phone and social?
I believe this is where you can use 000 000 0000 for phone and social (or 0000 if only four digits are needed)
The account owner needs to provide more information to Stripe to enable payments and payouts on this account.
INFORMATION NEEDED - DUE NOW
Bank account verification
why do I need bank account verification when i setup the stripe test bank
Is this what you saw in the onboarding flow?
That's odd, why would the external account in the screenshot above end in 9991 instead of 6789 if you used the test bank account?
Since it's a standard account, you'll need to log in with the test email and password you set up during test onboarding
alternatively, you can create a new test standard connected account, create a new account link, and go through onboarding again. When you get to the payouts page, click on "use test account" to auto fill the details
Payments and payouts are paused while Stripe tries to verify recently provided details about this account.
INFORMATION PENDING VERIFICATION
SSN
i made a whole new account
and now its saying information pending SSN
Okay. If you log into that standard account, do you see a banner at the top of your Dashboard prompting you to complete onboarding?