Reputation: 1
I'm trying to make a checkout session with a connect stripe account.
@main.route('/create-checkout-session', methods=['POST'])
@login_required
@inject_business
def create_checkout_session(business):
data = json.loads(request.data)
checkout_session = stripe.checkout.Session.create(
payment_method_types=['card'],
line_items=[
{
'price': PRICE_ID,
'quantity': 1
},
],
subscription_data={
'application_fee_percent': 10,
},
mode='subscription',
success_url=SUCCESS_URL,
cancel_url=CANCEL_URL,
stripe_account=STRIPE_ACCOUNT,
)
return{"sessionId": checkout_session["id"]}
Here is the response I get:
InvalidRequestError: Request req_xxxxxxx: Before you can start using Checkout, you must provide a business URL for this account.
I don't know where to provide this business URL, the documentation is not really clear about this.
Upvotes: 0
Views: 851
Reputation: 1354
You will want to direct the owner of your connected account to complete their onboarding. This will be slightly different depending on if you are using Standard[1], Express[2], or Custom[3] Connect but you will likely want to generate another onboarding link for them so they can fill out any missing information.
If this is Custom connect you may also update this value directly through the Account update call[4].
[2] https://stripe.com/docs/connect/express-accounts
[3] https://stripe.com/docs/connect/connect-onboarding
[4] https://stripe.com/docs/api/accounts/update#update_account-business_profile-url
Upvotes: 1