#xkernel

1 messages · Page 1 of 1 (latest)

edgy orbitBOT
#

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.

gusty grove
#

Have you completed the onboarding for the connected account?

split sparrow
#

no i wasn't aware of that.
So i am not sure what would be the flow exactly. but here is my marketplace flow.

  1. seller signup with our application
  2. the application creates Stripe Account for the seller
  3. the application also creates Stripe Customer
  4. let the user access out application dashboard.

why i do create Stripe Account & Customer? because i want the seller to be able to sell(get funds on their bank) and be able to by other items from other sellers(using the same bank account to purchase)

gusty grove
#

You need to onboard the connected properly and ask them to provide necessary information so that they can start accepting payments from customers.

split sparrow
#

should i redirect them to some url on stripe website?

gusty grove
split sparrow
#

actually i am making them express accounts but this doc is about standard account type. does it work?

gusty grove
split sparrow
#

ok this doc tells me that i need to collect that information from the user such as BusinessType and then in the code, i can just pass it as the parameter.

But you mentioned that i can create a link for them to use the stripe onboarding form instead. right?

gusty grove
#

Yes, you can use the same account link API

split sparrow
#

i can't find my answer about the actual values for the URLs on the doc

  RefreshURL: stripe.String("https://example.com/reauth"),
  ReturnURL: stripe.String("https://example.com/return"),

when i want to redirect my user to do the onboarding, i need to redirect them to the stripe's onboarding form.

gusty grove
#

have you checked the API reference?

split sparrow
#

yea i read. but still not very clear. What i guess is that i should redirect the user to https://myPlatform.com/reauth and on this page, i should run some sort of Stripe JS code ?

gusty grove
#

"The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link’s URL so they can continue with Connect Onboarding.'

#

So when you endpoint receives a request from that URL, it needs to create a new account link and direct your customer to the account link URL

split sparrow
#

here we have this code in our /signup endpoint so when they fill up the email/password after submitting the code below will be executed.
so i create the account link immediately after the account creation.

// for being a seller and receive funds
sellerParams := &stripe.AccountParams{
    Type: stripe.String(string(stripe.AccountTypeExpress)),
    Email: stripe.String(sellerEmail),
    Capabilities: &stripe.AccountCapabilitiesParams{
        CardPayments: &stripe.AccountCapabilitiesCardPaymentsParams{
            Requested: stripe.Bool(true),
        },
        Transfers: &stripe.AccountCapabilitiesTransfersParams{
            Requested: stripe.Bool(true),
        },
    },
    BusinessProfile: &stripe.AccountBusinessProfileParams{
        MCC: stripe.String("5734"),                           
    },
}
resultAsSeller, err := account.New(sellerParams)           
                                                                    
// for being a buyer and spend money to buy other's items           
sellerToBuyParams := &stripe.CustomerParams{                        
    Name:  stripe.String(sellerName),                               
    Email: stripe.String(sellerEmail),                              
}                                                                   
resultAsSellerToBuy, err := customer.New(sellerToBuyParams)

linkParams := &stripe.AccountLinkParams{
    Account:    stripe.String(resultAsSeller.ID),
    RefreshURL: stripe.String("https://example.com/reauth"),
    ReturnURL:  stripe.String("https://example.com/return"),
    Type:       stripe.String("account_onboarding"),
}
linkResult, err := accountlink.New(linkParams)
gusty grove
#

Is your question about how to pass the AccountID to the refreshURL so that it can create another account link with the same params?

split sparrow
#

no, my question is that should be replaced with "https://example.com/reauth" since i am creating the account in the same backend function.

versed edge
#

👋 Taking over this thread, catching up now

#

"https://example.com/reauth" is an endpoint at your server that creates a new account link on the existing connected account belonging to this connected account holder, so that he/she can complete the onboarding flow in case the onboarding page is being refreshed

split sparrow
#

is it possible to do so?

versed edge
#

If the connected account holder doesn't drop off during the onboarding, then this will be the case. However, if he/she refreshes the page or click return, your server should create a new account link for them to continue finishing the onboarding

split sparrow
#

ok but i am still not getting it. even if i have a separate endpoint for the link creation, how does the user land on stripe's onboarding pre-build form then?

versed edge
#

In the same endpoint that you create a new account link, you will redirect to the new account link URL for them to complete the onboarding

split sparrow
#

no. I mean how to redirect the user to this page? the url is not on my platform. it is on Stripe

#

this isn't the onboarding form provided by Stripe?

#

shouldn't redirect the user to that onboarding page in order to change the created account's status from Restricted to "Complete" or something?

versed edge
split sparrow
#

separate question:
i get an error from creating link params.

[ERROR] Request error from Stripe (status 400): {"status":400,"message":"You must update your Connect branding settings with business name, icon, brand col
or in order to create an account link. You can set the missing fields at https://dashboard.stripe.com/settings/connect"

i am using my test-mode keys and in the test-mode dashboard, i am unable to set any of those.