#sinotz-paymentintents

1 messages · Page 1 of 1 (latest)

analog moss
quick latch
analog moss
quick latch
#

hi again lol

#

how about first time successful payment intents for all customers within a daterange?

#

in other words new sales for each month as an example

#

or each day

#

from people who never paid before but it is their first time paying

analog moss
#

same as above

#

that /list endpoint takes in time range param

#

params

quick latch
#

oh wow

analog moss
#

lemme link it to you

quick latch
#

no arrays or anything?

analog moss
#

what do you mean "no arrays" ?

quick latch
#

i think i have to put all the dates into an array to get the earliest one out of them

#

it is easy for 1 customer but now i want to do it for all customers

#

that is an example to get the total first time sales from all customers

analog moss
#

not sure I understand

#

but really, the date params I mentioned to you are "show me charges created before X date but after Y date"

#

so if you have a bunch of customers you want to look for PaymentIntents on, you'll have to make multiple requests to the List endpoint

quick latch
#

ok

#

If your account gets cancelled/banned can you still use sigma?

naive crow
#

Hello! Sigma requires Dashboard access, so if you can't log in you wouldn't be able to use Sigma.

quick latch
#

gotta do things the hard way then

#

would you happen to know how to get all customer first time payment amounts then total them all?

naive crow
#

You can do it via the API using the list calls above, but it would take a while depending on how many Customers you have.

#

You would first list all your Customers, then for each Customer list their payments until you got to the first one.

quick latch
#

so 2 loops?

#

loop through successful payment intents then pass the customer ids from the successful payment intents to another stripe list call?

naive crow
#

I would recommend doing it the other way around: list Customer loop with a get first Payment Intent loop inside that one.

quick latch
#

ok

naive crow
#

Can I ask why you need access to the first payment only for each Customer?

#

And you don't have Dashboard access?

quick latch
#

first time sales for a date range

#

gotta prepare in case you guys randomly shut off my account for no reason

#

i need to track payments for bookeeping purposes

naive crow
#

Why would we shut off your account?

quick latch
#

for political reasons who knows

#

could be anything

#

unfortunately that is the reality we are living

naive crow
quick latch
#

yes that i know how to do

rapid shell
#

Eve if we shut down your account you would still have full access, you just can't accept payments

#

but ultimately you should cache all of this in your database

quick latch
#

that is fine i need to use the api then to access the data

#

this is requiring me so much work just because we live in a cancel culture

rapid shell
#

Let's leave the politics out of it please

#

It's fairly easy to ingest all of that in your database, either via daily exports from Sigma or via the API itself + webhooks

quick latch
#

sigma can connect to my database?

rapid shell
#

no but you can use the reporting API to export whatever you need daily for example

quick latch
#

a reporting API? you mean prestodb queries?

rapid shell
quick latch
#

ok that i have used before i thought this was a new API with new objects

quick latch
rapid shell
#

I'm not sure what you're asking, there are 5 lines of code and it's just paginating the List PaymentIntents API

#

you do whatever you want with the data here. You store the information you care about in your own database

quick latch
#

that is an old query before payment intent time

rapid shell
#

Sure, but that's mostly up to you to figure this out, I can't just write your code

quick latch
#

get a total of first time sales (first time a customer ever paid) and add the totals up

rapid shell
#

you're getting a PAymentIntent. Dump the whole object and look for the information you care about and aggregate all of this in your own database

#

if you want to aggregate sales you really will need 200+ lines of code

#

it's not a 5 minutes script

#

does that make sense?

quick latch
#

yea but the way you said it makes me not want to do it anymore

rapid shell
#

I'm trying to explain that you can't replace one Sigma query with a few lines of code unfortunately. If you want to use the API, you'll usually aggregate all the data on your end (what Sigma does for you) and then run your own queries on your own data. This is a lot of work to put this in place

quick latch
#

yea while with cryptocurrency i set everything up in a day lol

#

this is why if stripe does not change i don't see things getting better for you guys

rapid shell
#

I mean we built all of Sigma, and you have all the info you want in one query, so we are doing something right. You seem to not want to trust Sigma, nor use the API daily to ingest the Sigma results. If you want to rebuild your own implementation of Sigma, it's expected that it won't take 5 minutes or even a day.

quick latch
#

yea you're right