#Matty (AloysiusS)

1 messages · Page 1 of 1 (latest)

solid vineBOT
glossy badge
#

Hey there

#

The recommended route here is to mock the API for this.

#

Otherwise you can ues the CLI to trigger events

fading mesa
#

we are doing some investigatory research and want to see what the responses look like. how would I do that with the command line tools

#

there is no button in the dashboard to trigger those events?

glossy badge
#

It is just harder to test automatic payouts here

fading mesa
#

is that going to actually make a payout record or just trigger a simulated event?

glossy badge
#

Well it would actively create a payout to simulate the event, but this is in test mode

#

The way the CLI works is it runs fixtures which are a series of requests in order to generate the desired event

fading mesa
#

ok that is fine. I ran stripe trigger payout.created from https://stripe.com/docs/stripe-cli?shell=true and it didn't create a payout for my connect account I just made a payment and charge too. is there a way to specify which connect account to make the payout for ?

glossy badge
#

The stripe account flag

fading mesa
#

I tried the flag and it didn't seem to work. it also seemed to make a manual transaction that I cant user in this kind of follow up api call
Stripe::BalanceTransaction.list({payout: 'po_1MZHLFD0S8kEChynwMCrHEIE'})

gave me this error

Stripe::InvalidRequestError ((Status 400) (Request req_HsC0oDv9T1jHVC) Balance transaction history can only be filtered on automatic transfers, not manual.)

glossy badge
#

That request didn't come from the CLI

#

That was your backend

#

Can you show me the exact CLI syntax you used?

fading mesa
#

sure

stripe trigger payout.created --stripe-account acct_1MXBjjRk580m4RTU

it had these details


Request

{

"url"

: 

"https://api.stripe.com/v1/payouts"

,

"method"

: 

"post"

,

"parameters"

: 

{… 3 items}

,

}

Response

{

"id"

: 

"po_1MZHLFD0S8kEChynwMCrHEIE"

,

"object"

: 

"payout"

,

"amount"

: 

1100

,

"arrival_date"

: 

1675814400

,

"automatic"

: 

false

,

"balance_transaction"

: 

"txn_1MZHLFD0S8kEChyn8UFbElTD"

,

"created"

: 

1675876917

,

"currency"

: 

"usd"

,

"description"

: 

"(created by Stripe CLI)"

,

"destination"

: 

"ba_1DXFqbD0S8kEChyndoSR47dW"

,

"failure_balance_transaction"

: 

null

,

"failure_code"

: 

null

,

"failure_message"

: 

null

,

"livemode"

: 

false

,

"metadata"

: 

{}

,

"method"

: 

"standard"

,

"original_payout"

: 

null

,

"reversed_by"

: 

null

,

"source_type"

: 

"card"

,

"statement_descriptor"

: 

null

,

"status"

: 

"pending"

,

"type"

: 

"bank_account"

,

}```
glossy badge
#

yeah that looks fine

#

Oh actually no that is on your platform

#

One sec

fading mesa
#

I wanted create the payout for the connect account it seemed to add it to our main account

glossy badge
#

Ah yeah you are missing the =

#

stripe trigger payout.created --stripe-account=acct_1MXBjjRk580m4RTU

fading mesa
#

thanks last two questions I think.

so the payout that the previous calls triggers seem to be manual. which I can't use with a balance call. is there anyway to trigger an automatic payout?

transactions from a automatic payout with Stripe::BalanceTransaction.list({payout: 'po_1DY2MAD0S8kEChynd09jgTFt'}) but it only worked for payout that were attached to the main account and couldn't find one for a connected account

urban stirrup
#

Hi there 👋 taking over, as my colleague needs to step away

Give me a few minutes to get caught up.

#

You can't unfortunately trigger an automatic payout via the CLI, you'd be better off testing that by setting the account's payout schedule to automatic and then waiting a day for it to create the payout

fading mesa
#

that is a bummer we are trying to prototype a solution of a time sensitive problem. ya should send a request up the engineering food chain to allow people to trigger those. np though if its not possible then its not possible for today.

#

any idea why I can't list the balance transactions for the connected account ?

urban stirrup
#

Happy to add that as a feature request. I can see the need for it here.

#

any idea why I can't list the balance transactions for the connected account ?
via the CLI?

fading mesa
#

found it irb(main):003:0> Stripe::BalanceTransaction.list({payout: 'po_1MXwtSRk580m4RTUZowXc2HE'}, {stripe_account: 'acct_1MXBjjRk580m4RTU'})