#stripe_connect_platform4242
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- stripe_connect_platform4242, 3 hours ago, 12 messages
- stripeconnectplatform-stripe-app, 4 days ago, 7 messages
- stripe_connect_platform4242, 5 days ago, 54 messages
- stripe_connect_platform4242, 6 days ago, 22 messages
hello! can you share the corresponding Charge id for me to take a look?
I am actually writing code to list all Charges and then if it has an Invoice, I am expanding Invoice and getting the Product name via the Invoice, but if invoice is null, is there going to be a product? I'm in a loop now so don't have an ID but can get one.
product_id = charge_obj.invoice.lines.data[0].plan.product
product_obj = Stripe::Product.retrieve({ id: product_id })
product_name = product_obj.name
That I think is if it does have an invoice but if it does not?
https://docs.stripe.com/api/charges/object
If you need a Charge without an invoice I'll make one but it is a general question
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Per your request:
pi_3Om5KlGkntF0z1iA1fkEYH0M
I am confused a bit by that being a pi_ and not a Charge. I just went into the dashboard and hit the test customer with a $99 USD payment per your request.
I basically want to show the customer everything they paid me with a link to view details. So sometimes it is a one-time payment with no invoice and I want to make sure to show those. If there is an invoice, it is easier. I was looping through Charges but maybe that is not sufficient?
Real Use Case:
Customer question is "I am doing 2023 taxes. Please give me documentation of everything I paid you in 2023" for example.
If the Invoice is null, there won't be a product
i think that makes sense, i.e. to list all Charges linked to a specific Customer : https://docs.stripe.com/api/charges/list#list_charges-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is looping through the Charge objects sufficient to get all payments to us both one-time and subscription and ones with Invoices and without?
yes, and you can test it out to confirm that's the case
ok working on it thank you!
hi
I see 4 payments in 2024
3 subs, 1 charge with no invoice and the bottom one was 2023 so is not in my date range. I want to get something like that for my customer showing all "payments/charges" and give the customer an url to the best thing possible - a hosted invoice url if it exists (invoices) or a receipt url if not.
current_year = Date.today.year
start_date = Date.new(current_year, 1, 1)
end_date = Date.today.end_of_day
start_timestamp = start_date.to_time.to_i
end_timestamp = end_date.to_time.to_i
charges = Stripe::Charge.list(customer: customer_id, created: { gte: start_timestamp, lte: end_timestamp }, limit: 100)
Where do those all exist if not in the Charge list?
3 were made today? Maybe an issue with UTC? Or maybe there is a delay on them being available?
yup/
yup
Can you explain? I just got back 4 payments with this?
end_date = (Date.today + 1.days).end_of_day
pushing the end date one day to capture payments I just created. Hmmmm.
So question is just what should my end date be to deal with maybe UTC time issue?
UTC
i think your timing is wrong, using one of the payments as an example, it was made 2024-02-21 02:38:55 UTC, your end datetime is 2024-02-20 23:59:59 UTC in the request