#MaryCapp-external-ba

1 messages · Page 1 of 1 (latest)

tired panther
#

Hello 👋
do you have an example request ID i can look into?

worldly pawn
#

sure.

#

if (model.PracticeBankAccount != null)
{
model.StripeBankName = model.PracticeBankAccount.BankName;

                    PracticeBankAccount pbaModel = new PracticeBankAccount();
                    pbaModel.AccountHoldersName = model.PracticeBankAccount.AccountHoldersName;
                    pbaModel.AccountNumber = model.PracticeBankAccount.AccountNumber;
                    pbaModel.BankName = model.PracticeBankAccount.BankName;
                    pbaModel.Country = model.PracticeBankAccount.Country;
                    pbaModel.Currency = model.PracticeBankAccount.Currency;
                   
                    pbaModel.RoutingNumber = model.PracticeBankAccount.RoutingNumber;

                    var bankAccount = CreateStripeExternalBankAccount(pbaModel, customer.Id).Result;
                    
                    var externalBAs = bankAccount.Account.ExternalAccounts;
                    model.StripeBankAccount = externalBAs.Data[0].Id;
                }
#

protected Task<IExternalAccount> CreateStripeExternalBankAccount(PracticeBankAccount model, string customerId)
{

        //var banktoken = CreateStripeCustomerBankStripeTokenRequest(model);

        var options = new ExternalAccountCreateOptions
        {
            ExternalAccount = new AccountBankAccountOptions
            {
                AccountHolderName = model.AccountHoldersName,
                AccountHolderType = "Company", // model.PracticeBankAccount.AccountHolderType,
                AccountNumber = model.AccountNumber,
                Country = model.Country,
                Currency = model.Currency,
                RoutingNumber = model.RoutingNumber,
            },
        };
        var service = new ExternalAccountService();
        try
        {
            //return service.Create(customerId, options);
            return service.CreateAsync(customerId, options);
        }
        catch(Exception ex)
        {
            string err = ex.Message;
            return null;
        }
tired panther
worldly pawn
#

this is weird.. the one that is there shows this:

#

but I am using the secret key

#

the one I just tried is not showing in the log but I'm getting the same error

tired panther
#

I'd recommend verifying the API key and making sure you're using the right one

worldly pawn
#

I just looked.. I'm suing the secret key from the account: sk_test_51K9aLwHjGWiG4VL2GsFpef9ZKaPpQd6LE1qeIiNU71yt6BLFLRaK7I2bnIPI6al2ETjRKdnodkVn6UwvsvyPOnw400J7Y8VNTD

tired panther
#

I'd recommend rolling the key and using the new one
and can you copy paste the request ID here?
req_xxxx

worldly pawn
#

so the weird thing that is happening.. using the correct secret key.. i get the error from above but with this: "The provided key 'sktest*Y8VNTD' does not have access to account 'cusLkUAFiU7jD4NhI' (or that account does not exist). Application access may have been revoked."

#

but it's not showing up in the logs

#

so why would the application access have been revoked for the creating the external bank accounts but not for creating customer and credit card

#

do you think they didn't complete the set up of the connect

tired panther
#

if you can share the request ID, I can look into it

worldly pawn
#

the issue is it's not showing in the log

tired panther
#

Ah, I see!

worldly pawn
#

at all.. the one that is showing is from earlier and I changed the key to use the correct one

#

this may sound dumb.. but I'm looking thru the connect.. set up.. it looks like they didn't finish it.. so I'm trying to finish it.. but it looks like this is for receiving payments .. to for paying out..

#

oh never mind I see transfers

tired panther
#

Is there a guide you're following for this?

worldly pawn
#

I was just stepping thru to see what was there

tired panther
#

gotcha. np, let me take a look

worldly pawn
#

it fails on this line:

#

the createasync

#

and it is not showing up in the logs

#

and here you can see that connect is active:

tired panther
#

Okay let's step back here for a second

worldly pawn
#

ok

tired panther
#

are you trying to add an external account for a connected account or a customer?

worldly pawn
#

yes

#

to be used for payouts

tired panther
#

So that's for a connected account right? You would need to use the connected account ID for this then

worldly pawn
#

so the thing is it's a customer that is doing reselling.. so they are paying fees ect.. but each month they will be getting a pay out

#

so they are a customer with an externa bank account

#

they have a credit card to pay fees to medtrix

tired panther
#

That's not how this works though.
You can't use a customer object as a connected account

#

You can't do payout to customers
You can only payout to Connected Accounts

worldly pawn
#

so I have to create a connected account

tired panther
#

Yes!

worldly pawn
#

and in there have their credit card to pay their fiees

#

and external account for the bank

#

to pay out to

#

ok need to find an example of creating a connected account

tired panther
worldly pawn
#

is it techical or is it just an over view

tired panther
#

It is an overview with references to technical portions

worldly pawn
#

which account type would be used to be able to make payments with a credit card and receive payouts.. standard or custom

tired panther
worldly pawn
#

ok.. so i create an account.. but the examples are so dumbed down.. where do I actually add the information regarding the credit cards

#

this does not have any details for credit cards or information regarding the actual account

tired panther
#

Please take the time read through the resources I've shared with you as it explains how Connect works.

You'll run into similar issues as before if you skip things.

#

I don't fully understand what you mean by adding the information regarding the credit cards

worldly pawn
#

It's basically telling you to create a connected account but doesn't give you anything regarding where the details of the account go.. which is why it's so confusing.

#

I will look thru it.. but the documentation.. really should start with an example that shows where things like name of account etc would go

#

I will try it.. thank you for your help

#

OK so I have the account.. now need to figure out how to add a credit card to the account. and go from there.

sullen pasture
worldly pawn
#

Awesome. thank you so much!