#lkcpo

1 messages · Page 1 of 1 (latest)

fleet lightBOT
lofty echo
#

Here's our NodeJS code:

// code in NodeJS

const paymentData = {
amount,
currency,
// Do we make this false if we want to hold funds for "X" weeks?
automatic_payment_methods: {
enabled: true,
},
};

if (config.isConnectedAccount) {
// Does this transfer the funds to the connected account right away?
// Can we distribute via the STRIPE UI vs. Sending $ right away (if this is true)
paymentData['transfer_data'] = {
destination: config.connectedAccountId,
};
const customer = email ? await getOrCreateCustomer(email,name,config.connectedAccountId,stripe) : '';
let application_fee_amount = await getAmount(330, 2.9, amount);
paymentData['application_fee_amount'] = application_fee_amount;
paymentData['customer'] = customer?.id || '';
}

const paymentIntent = await stripe.paymentIntents.create(paymentData);

// our fees is $3.00

#

  • If we want to refund, how do we take it from a connected account (if the above code is correct)?
#
  • also, what is this line doing:
    automatic_payment_methods: {
    enabled: true,
    },
indigo flume
#

Hello

lofty echo
#

Hi

#

love the name btw.

#

lol

indigo flume
#

What type of Connected Accounts are you working with?

lofty echo
#

So we have our main stripe account.

Then we have 2 client accounts that we move money into -- and I believe we're moving it at time of transaction -- that code above happens when someone "pays".

indigo flume
#

Okay but do you know what type of Connected Accounts these are?

#

If you have an example PaymentIntent ID that you can share I can also look at your integration directly

lofty echo
#

Ok. Let me snag it. Just looking for that thread in my TEAMS chats.

indigo flume
#

👍

lofty echo
#

destination: config.connectedAccountId

#

this is our account, just need to find the dang id. .one sec

#

Can I find this in my Stipe account dash or is this only in API?

#

of course, can't find thread, still looking for it

#

"connectedAccountId is our account - Lab3 Interactive "

#

but that probably doesn't help

indigo flume
#

It should look like acct_xxxx

lofty echo
#

got it

indigo flume
#

If you look at a Connected Account in the Dashboard the ID is in the top right

lofty echo
#

acct_1NXmBwPspnRWOyoF

#

This is 1 client account we are sending money too (and the majority)

#

FYI, I've paused payouts until I figure this out.

#

this is the other connected acct.

acct_1N6xaNQ5wcbB6Kcd

indigo flume
#

Okay looks to be an Express Account

#

So using a Destination Charge flow is indeed the recommended way to handle things as you are doing.

lofty echo
#

don't think I ever knew that.

indigo flume
#

And this does mean that refunds will come out of your platform account.

#

Are you setting reverse_transfer: true when you issue refunds?

lofty echo
#

Probably not.

#

We're kind of new at understanding best practices for handling refunds.

indigo flume
#

Let me take a look at a refund you have made in the past

lofty echo
#

Here's what happens:

  • $100 transaction
  • 2.9% + $0.30 - Stripe
  • $3.00 - us (Sketchplay)

$93.80 = sent to connected account.

lofty echo
indigo flume
#

Ah okay so that one you refunded via the Dashboard actually

#

When you do that, there is a little tickbox that indicates you want to reverse the associated transfer.

#

You want to tick that box if you are going to refund via the Dashboard

lofty echo
#

ahhhhh

indigo flume
#

You can test this out in test mode as well

lofty echo
#

Got it... Is there an API for this as well?

Eventually we're going to build in ADMIN ability to refund via our platform.

#

and, can you actually tell me how reverse_transfer works?

indigo flume
#

Really you should read through that whole doc if you haven't yet.

lofty echo
#

Got it.

Ok, so code wise at time of transaction, we're good --

but when/if we need to refund -- we should use reverse_transfer api to backout the transaction (assuming we also lose the stripe fee on the way in so refund is - the stripe fee?

indigo flume
#

Yep that's correct.

lofty echo
#

Ok, We'll read through this.. thank you! OH, one more quesiton ---

Is there a way to move money from connected account to main account. In other words, $885 that we paid, I want to take that back from the connected account?

#

(let's assume after I talk with client they are ok with this)

indigo flume
#

You can always reverse the transfer at any point.

#

Even if you didn't do it upon issuing the refund -- you can still do that now.

lofty echo
#

got it.

indigo flume
lofty echo
#

Ok, cool. Thank you for the help! Anyway to print this thread?

#

copy past sucks! haha

indigo flume
#

Unfortunately, no. But you can grab the URL and refer back to it later if you need to.

#

Otherwise copy/paste is the only way

lofty echo
#

Ahh, it will still be here -- just closed?