#GiGStartr-sigma

1 messages · Page 1 of 1 (latest)

vale burrow
#

From what I understand I thought sigma would also work in test mode - are you running into issues getting it to work?

muted prairie
#

Just initial poking before writing API code - console only. I have various test customers & connect accounts, etc etc - but so far can't get any valid queries from sigma. Could just be me (I'm a decade rusty on SQL)

#

background is I'm writing code to find available balance SPECIFICALLY AND ONLY associated with a transfer_group. There's no clean way in the existing API (trust me, we've gone down that road a long way), but it looks like it wouldn't be hard to get what I need from a Sigma query

#

yeah, unlike other console features, there seems to be no "test mode" flag associated with Sigma

vale burrow
#

Can you give me more specifics on how you're currently trying this out? I don't know very much about how folks test sigma so the more information you can give the better

muted prairie
#

Just started myself. Just open sigma; the console page has various things like "Queries", "Schema", "Template". Just trying some of the mode basic queries to see what results if any I get - so far they all fail, and I see nothing that indicates how to specifically access test data. Once I know test data can be accessed, then I'll start wrting API code

#

mode => "most"

#

As I said previously, I'm trying to get specific information that is quite unfortunately not yet accessible in the Stripe API (not even the Search API; I looked).so I figured I try a run-around using Sigma. It's not an operation that will run very often, so it shouldn't be a resource hog.

vale burrow
#

Ah I see the issue (and this is my fault for not catching it earlier) - using Sigma with testmode data is supported, but you need to be gated into it. I'd suggest writing in to support (https://support.stripe.com/contact) to get properly gated in

muted prairie
#

well, that's silly, but OK. Thanks.

vale burrow
#

yeah sorry about that! I had assumed it was public 🤦

muted prairie
#

Well, I could tell you what I REALLY want from the Stripe API, and you could just go lickity-split and implement it for me - but I figured I go the longer way 'round

#

"just"

vale burrow
#

I'm curious what road you went down to try and find the available balance for a transfer_group through the API - does listing all Transfers for a transfer_group and checking the associated balance transaction not accomplish what you want?

muted prairie
#

Nope. You have to separately then query for the balance_transaction to get the available balances. Obscene load on, and many many round-trips to, your servers

#

Situation: event ticketing. 1 to 200 customers purchasing tickets, which are then split (AFTER the event) amongst 1 to 3 providers, I use separate chargbes & transfers

#

just search your API documentation for "transfer_group" and see HOW FEW endpoints actually use it

#

as it turns out, your transfer_group support is only very partial. just a tag in a few places.

#

but the concept of transfer_groups is perfect for my app

vale burrow
#

Nope. You have to separately then query for the balance_transaction to get the available balances. Obscene load on, and many many round-trips to, your servers
You should be able to to just expand balance_transaction when you get the list of transfers so you wouldn't have to do the extra request to retreive the balance transaction. You'll get it fully expanded in the transfer object

muted prairie
#

I've looked at that before and it was not there, but I'll look again

#

ah yes. the issue is the CHARGES that go INTO the transfer_group, not the transfers that go OUT of the transfer_group

#

I've already spect many days being assured that it could be done - but each was a dead-end

#

yeah, stripe.charges.list, with parameter transfer_group. Don't see where the "expandable" option is on that one

vale burrow
muted prairie
#

checking...

#

so the net call would look like:
const charges = await stripe.charges.list({
limit: 3,
});

#

oops, give mo in another editor

#

const charges = await stripe.charges.list({
transfer_group: {transfer_group_Id},
expand: [data.balance_transaction],
limit: {wev},
});

#

then .map() the lot to get an available amount (also tracking against possible previous Transfers out)

#

can certainly try.

vale burrow
#

Yeah try it out and see if that works for you - you're certainly welcome to keep using Sigma if that's the route you want to go down, but I just wanted to suggest this in case it was helpful

muted prairie
#

hey, I'd rather keep it "simple"

#

net-net, the "expand" is more-or-less kinda-sorta just invoking the SQL behind the scenes

vale burrow
#

👍