#abdullah-farooq_docs

1 messages · Page 1 of 1 (latest)

signal horizonBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1220258124498472980

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

violet raftBOT
crisp quartz
#

@spark lichen Could you help me please?

spark lichen
#

What error do you get specifically?

crisp quartz
#

Okay, here is my code, I am in test mode. I simply want to send $2 dollars from my Stripe account (Not Connect Account) to a bank account.

First I create token from bank details like this

token = stripe.Token.create(
bank_account={
"country": "US",
"currency": "usd",
"account_holder_name": "Abdullah",
"account_holder_type": "individual",
"routing_number": "110000000",
"account_number": "000123456789",
},
)

Then I create a payout like this

payout = stripe.Payout.create(
amount=data.get("amount"),
currency=data.get("currency"),
method="standard",
destination=token.id,
statement_descriptor="Withdrawl",
)

The token id = "btok_1OwfPGKUUbRGFzos858PGrrZ"

The errors says

No such external account: 'btok_1OwfPGKUUbRGFzos858PGrrZ'

#

I have no knowledge of Connect Account/External Account.
Could you tell me what that is and why do we need it to implement Payouts?

Can't we simply send funds into a bank account with this hussle?

spark lichen
#

Okie so btok_xxx is a token and you need an external account to pass into the Payout API

crisp quartz
#

Okay, I have created an external account like this

account = stripe.Account.create(
type="express",
country="US",
email="abdullah.farooq@camp1.tkxel.com",
capabilities={
"card_payments": {"requested": True},
"transfers": {"requested": True},
},
)

external_account = stripe.Account.create_external_account(
account.id,
external_account=token.id,
)

Now, what's next?

#

A connect account is created in my dashboard but the payouts and transfers are paused in it.

spark lichen
#

Okie can you call the Payout API with that external account in destination?

crisp quartz
#

payout = stripe.Payout.create(
amount=data.get("amount"),
currency=data.get("currency"),
method="standard",
destination=external_account.account,
statement_descriptor="Withdrawl",
)

Like this?

spark lichen
#

Yes

#

I suppose I will still error but with a different error message

crisp quartz
#

It says

Request req_B9qhspenqxHsWx: No such external account: 'acct_1OwfPpQLEJ3F9B42'

#

""acct_1OwfPpQLEJ3F9B42" is created but it is in restricted mode, I think I need to verify it because it is saying payouts are paused

spark lichen
#

Wait acct_xxx is a Stripe Account Id

#

you want the bank account id create dfrom Account.create_external_account

crisp quartz
#

Okay, lets try that way

#

Back to squre one,

Request req_IknrwUxcCvlSFX: No such external account: 'btok_1OwfPGKUUbRGFzos858PGrrZ'

spark lichen
#

That's still a btok

crisp quartz
spark lichen
#
external_account = stripe.Account.create_external_account(
account.id,
  external_account=token.id,
)

What do you get from here?

crisp quartz
#

<BankAccount bank_account id=ba_1OwfRjQLEJ3F9B42Z0KgFnGS at 0x74b67ed3d4e0> JSON: {
"account": "acct_1OwfPpQLEJ3F9B42",
"account_holder_name": "Abdullah Farooq",
"account_holder_type": "individual",
"account_type": null,
"available_payout_methods": [
"standard"
],
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"default_for_currency": true,
"fingerprint": "W9CxlOYXqbQ68Npj",
"future_requirements": {
"currently_due": [],
"errors": [],
"past_due": [],
"pending_verification": []
},
"id": "ba_1OwfRjQLEJ3F9B42Z0KgFnGS",
"last4": "6789",
"metadata": {},
"object": "bank_account",
"requirements": {
"currently_due": [],
"errors": [],
"past_due": [],
"pending_verification": []
},
"routing_number": "110000000",
"status": "new"
}

#

This object

spark lichen
#

alright can you use this ba_xxx into the destination of Payout Create API

violet raftBOT
crisp quartz
#

Okay

#

I got an error
No such external account: 'ba_1OwfRjQLEJ3F9B42Z0KgFnGS'

plucky oak
crisp quartz
#

Request ID: req_B9qhspenqxHsWx

plucky oak
#

ba_1OwfRjQLEJ3F9B42Z0KgFnGS was created on the connected account. Your request should include Stripe-Account header as connected account ID for manual payout. The destination should be ba_xxx not acct_xxx

crisp quartz
#

This is my order
1- Create Token

token = stripe.Token.create(
bank_account={
"country": "US",
"currency": "usd",
"account_holder_name": "Abdullah",
"account_holder_type": "individual",
"routing_number": "110000000",
"account_number": "000123456789",
},
)

2- Create Account

account = stripe.Account.create(
type="express",
country="US",
email="abdullah.farooq@camp1.tkxel.com",
capabilities={
"card_payments": {"requested": True},
"transfers": {"requested": True},
},
)

3- Create External Account

external_account = stripe.Account.create_external_account(
account.id,
external_account=token.id,
)

4- Payout

payout = stripe.Payout.create(
amount=data.get("amount"),
currency=data.get("currency"),
method="standard",
destination=external_account.bank_account.id,
statement_descriptor="Withdrawl",
)

plucky oak
#

The last step should be:

payout = stripe.Payout.create(
    amount=data.get("amount"),
    currency=data.get("currency"),
    method="standard",
    destination=external_account.bank_account.id,
    statement_descriptor="Withdrawl",
    stripe_account='{{CONNECTED_ACCOUNT_ID}}',
)

stripe_account is missing. Reference from: https://docs.stripe.com/connect/manual-payouts#regular-payouts

Send manual payouts to your connected accounts.

crisp quartz
#

Let me try

#

Really close one. Thanks previous errors areresolved.

Request req_32BVwXZR3nQeAI: Cannot create payouts: this account has requirements that need to be collected. Please provide those fields to re-enable payouts.

#

How can I enable it?

plucky oak
#

After creating an Express connect account, your system should use Account Link to complete the onboarding before paying out: https://docs.stripe.com/connect/express-accounts#create-link with the test data here: https://docs.stripe.com/connect/testing

Before going live, test your Connect integration for account creation, identity verification, and payouts.

Express accounts enable your platform to manage payout schedules, customize the flow of funds, and control branding. Stripe will handle onboarding, account management, and identity verification for your platform.

crisp quartz
#

Okay, what is the difference among Express Account, Standard Account and Custom Account?

plucky oak
crisp quartz
#

If user is an individual, what type of connect account it should use in order to fill out only details required for an indivdual, I have seen, it asks for business details, whereas an individual option is selected.

plucky oak
#

The connected account type should be chosen based on the comparisons listed above, not based on whether an user is an individual. An individual will be asked same onboarding information regardless which connected account type is chosen

crisp quartz
#

Okay

#

Thank you so much for the help.

plucky oak
#

No problem! Happy to help 😄

crisp quartz
#

Could you help me with 1 more thing, When I am creating account link, it gives an error

account_link = stripe.AccountLink.create(
account=account.id,
refresh_url="https://chattelz-dev.azurewebsites.net/docs/",
return_url="https://chattelz-dev.azurewebsites.net/docs/",
type="account_onboarding",
)

Request req_NJPUvHFG2PXIZH: You must update your Connect branding settings with icon in order to create an account link. You can set the missing fields at https://dashboard.stripe.com/settings/connect

I am in test mode.

plucky oak
#

As described in the message, branding settings should be done even in test mode

violet raftBOT
crisp quartz
#

Okay, when I create the Connect Account manually, it gives me account link to fill out the information.

When I do it through API, it says me add brand setting

sick tendon
#

it just is what is is really, they're different systems