#steph-embedded-payouts

1 messages · Page 1 of 1 (latest)

sly mangoBOT
oblique cape
#

Can you share more details on how you created the Account Session?

wary garden
#

Thanks for jumping in! Yup - I really just followed the quick start guide for the create params.

Rather than a REST endpoint, we have a graphQL mutation/resolver that ultimately calls this and returns the accountSession object.

const accountSession = await this.stripe.accountSessions.create({
  account: stripeAccountId,
  components: {
    payouts: {
      enabled: true,
      features: {
        instant_payouts: true,
        standard_payouts: true,
        edit_payout_schedule: true,
      },
    },
  },
});
oblique cape
#

I'm pretty sure that button is controlled by passing instant_payouts: true and standard_payouts: true; you can just set these to false instead

#

Double checking if you can hide the export and filter options

#

I don't think these can be hidden. Could you share more details about your use case for hiding these?

wary garden
#

Hmmm, I updated the params to have both of those as false and the button is still not rendering. Have tested with with the same two test users, as well:

{
  account: stripeAccountId,
  components: {
    payouts: {
      enabled: true,
      features: {
        instant_payouts: false,
        standard_payouts: false,
        edit_payout_schedule: true,
      },
    },
  },
}
#

Thanks for checking on whether or not they can be hidden. I believe it was to keep the Stripe experience within the app simplified and have the user access that functionality within Stripe itself

oblique cape
#

Oh, I got mixed up with what you were trying to hide vs. show. So just to be clear, instant_payouts: true and standard_payouts: true did not show the "Pay out" button even with an account with a non zero "available" balance?

wary garden
#

Ah all good, I want to show the Pay Out button. So Il'l set em back to true. But yes, even with a non-zero available balance, the button does not show

sly mangoBOT
stark timber
#

steph-embedded-payouts

#

do you have an exact page where I can see what you're doing and debug it?

wary garden
#

Heya! Thanks for jumping in on this too 🙂 Unfortunately I'm unable to share it publicly :\

stark timber
#

Going to be tough to debug without that unfortunately

#

Looking but Discord is extremely busy right now unfortunately so will take some time

#

Can you share the exact account id you are looking at in Test mode and the exact balance they currently have?

wary garden
#

Totally understand, thanks for your support!

Here are the two test mode users:

  • acct_1OmLjsQoLmgsoMQp - no existing payouts, but has non-negative balance
  • acct_1OhGfOQw6pTvdzkY - has existing payouts, and non-negative balance
stark timber
#

Okay what exact code are you using to retrieve their balance, and what is their exact balance right now?

wary garden
stark timber
#

I'm not fetching their balance! Is that needed to output the Pay Out button in the Payouts component?
No, this is me asking so tat I can help you debug this

#

you should be able to fetch their exact balance right now first

wary garden
#

Oh I see, I'm not fetching the balances via the API. I'm logged into the Stripe dashboard in test mode and can see both of those users have non-negative balances.

As well, when the Payout component renders, the "available balance" part of the UI outputs a non-negative number

#

I'll grab those numbers for you

#

Here's what the Payout component looks like for the account with id acct_1OhGfOQw6pTvdzkY for reference

#

For acct_1OmLjsQoLmgsoMQp: Total balance is $4.04 CAD

For acct_1OhGfOQw6pTvdzkY: Total balance is $3,439.14 CAD

stark timber
#

All good I was really hoping you could write full code for this and share the exact raw JSON to talk developer to developer instead of with no-code UIs to start

#

(Discord calmed down a bit so I'm trying to test this end to end myself too)

#

Okay so I'm seeing the same, trying to debug why

#

okay hum

#

you explicitly are passing false to those features right? I just copied your code so didn't double check but that's expected right?

#

yeah if I swap to true it just works

wary garden
#

I'm passing true for all three to start. Changed them to false due to a miscommunication in this thread, and now they're set back to true

stark timber
#

ah

#

What is under See details exactly? Are those accounts on manual Payouts already?

wary garden
#

This is the modal that opens when See details is clicked

stark timber
#

Okay so that's the problem I think

#

look at the bottom it says you're on daily automated Payouts, so there's no manual Payout creation

#

change that with the Update button to manual and then it will work

wary garden
#

Ahhh i see that now. The payouts for both accounts are set to daily

stark timber
#

yep too me a while to see that too

#

I just asked the team to consider the button greyed out with a hover that explains why :p

wary garden
#

Awesome, thanks for relaying that over. Appreciate you both for helping look into this!

I know you wanted more code/live examples but I unfortunately could not share any details about this project, nor was it necessary for me to write code to fetch the balance when our implementation did not require it and the values were readily available in the UI. Very glad we were able to figure this out despite this, as this is about the extent I could have shared. Hopefully in the future I can share more code examples when asking for support, but also hoping that you can understand the circumstances. Thank you again!

stark timber
#

sure thing