#tom_api

1 messages ยท Page 1 of 1 (latest)

near pineBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1460736622180962518

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

  • tom_api, 2 hours ago, 24 messages
glacial kestrel
#

Hi Hanzo, if I do the following call:

var service = new InvoicePaymentService(stripeClient);
var invoicePayments = service.List(new InvoicePaymentListOptions
{
    Payment = new InvoicePaymentPaymentOptions
    {
        PaymentIntent = paymentIntentID,
        Type = "payment_intent"
    }
});

It returns nothing - is this correct? I am expecting an invoice in the response.

#

Given the PI pi_3SpCPyIq2o1LAhVT1HdilTfu, in the workbench inspector it returns an invoice ID but I just can't get it from the API any way I try.

waxen hedge
#

Hello
What API version are you currently on?

glacial kestrel
#

The latest

#

I will just confirm one second

#

2025-12-15.clover

waxen hedge
#

I think the Invoice Payments were introduced in Basil but your PaymentIntent was created on an older version (Acacia)

#

I could be wrong, let me double check

glacial kestrel
#

Yes I think the issue is with old subscriptions

#

We just upgraded from the API version from some time last year

waxen hedge
#

When you retrieve the Charge, can you expand invoice parameter and see if that makes a difference?

glacial kestrel
#

One moment

#

I don't think that added anything

#

var chargeService = new ChargeService(stripeClient);
var opts = new ChargeGetOptions();
opts.AddExpand("invoice");
var charge = chargeService.Get("ch_3SpCPyIq2o1LAhVT1vn4E66X", opts);

    JsonConvert.SerializeObject(charge).BasicLog();
waxen hedge
#

hmm

#

Yeah no invoice payments look wrong

glacial kestrel
#

It's breaking our implementation live unfortunately and rolling back is going to be really difficult at this stage.

#

I can retrieve a partial invoice ID from the payment intent

near pineBOT
waxen hedge
glacial kestrel
#

paymentdetails.order contains a truncated invoice ID which I could search for in customers invoices, but I'm not sure if that's particularly safe

#

One second

#

I'm not entirely sure how to get the request ID I'm afraid using .NET?

stoic briar
#

The returned object should have a RequestId property that you can print out.

Console.WriteLine(customer.RequestId);```
Or you can check your API logs in your dashboard https://dashboard.stripe.com/logs
glacial kestrel
#

req_2oNnuvQTVHyVKd

#

If I inspect the charge ID in workbench inspector (ch_3SpCPyIq2o1LAhVT1vn4E66X) it shows the invoice ID under invoice property, but I just can't get it through the API.

stoic briar
#

Ah that is expected though we should probably error there. The invoice property was removed in Basil, so it is expected to still not be there in clover.

glacial kestrel
#

The basic problem I'm trying to solve is given a charge ID, find the invoice ID.

#

Unfortunately this payments system is 10 years old so has to be this way.

stoic briar
#

Right, the expected way to do that now is to use that list Invoice Payments call, so the thing I am trying to look in to is why that list call returned no results for you earlier

#

It is slower and we've raised feedback about making a simpler way to do this but no ETA on the moment unfortunately.

#

Hmm our logs say we did return an item in the list for the requests that I've checked so far

glacial kestrel
#

let me try logging the raw jobject

#

Might be a bug in the .net

stoic briar
#

Exactly what I was about to ask! Can you also share the request ID from this run?

glacial kestrel
#

Returns same empty:
{"object":"list","data":[],"has_more":false,"url":"/v1/invoice_payments"}

#

req_Y7dS2JKUUzt4Iz

stoic briar
#

Can you double check that request ID? That request maps to a get request for the ch_3SpCPyIq2o1LAhVT1vn4E66X charge

glacial kestrel
#

Sorry one moment

stoic briar
#

Looking at the general logs, I am not seeing a new list call to the invoice payments endpoint. To be clear I am talking about this snippet from above:

    var invoicePayments = service.List(new InvoicePaymentListOptions
    {
        Payment = new InvoicePaymentPaymentOptions
        {
            PaymentIntent = paymentIntentID,
            Type = "payment_intent"
        }
    });```
glacial kestrel
#

I can't find it in the logs anywhere

#

Ah one second sorry

#

Give me a moment

#

I'm an idiot, it is returning the invoice's in the request, I was getting mixed up with different stripe clients in the debugging process ๐Ÿ™ I'm soooo sorry for wasting your time on this.

#

I feel like such a lemon

stoic briar
#

No worries and don't be hard on yourself! We're here to help debug and this kind of thing definitely happens to all of us

glacial kestrel
#

I would of expected it to return an error when calling InvoicePaymentService on a payment intent ID that doesn't exist maybe

#

As a small saving grace on my end ๐Ÿ™‚

#

My sinciere apologies you guys are always brilliant

stoic briar
#

Really no problem, and good call out. I'm very surprised we don't error out there too. Will file feedback on that