#bensontrent_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1372981492036276254
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi hi! Those were removed in the most recent API version.
Are you trying to find the Invoice for a Payment Intent, or the Payment Intent for an Invoice?
I'm trying to find the invoice for a Payment Intent.
Ahh I see.
Ok I was unaware of this. I'll use the stripe.invoicePayments.list method. Cheers and thank you!
There is another way, wait one:
ok.
You can expand payments.data.payment.payment_intent when you retrieve an Invoice and you will find it there.
Ok. Is there any way to exapand the invoice from paymentIntents.search
Search API doesn't support expand parameter. Could you share the use case why you're looking for expanding feature via Search API when you already have the Payment Intent?
In our Stripe Marketplace app, Parcelcraft Shipping (see https://marketplace.stripe.com/apps/parcelcraft-shipping ). Users can create shipments from Payments, Invoices or from customers. Users can see a list of unshipped payments or invoices:
If they select the unshipped "Payments" list, we search their paymentIntents for a metadata with a key of "ship_status" and a value of "unshipped". Before the breaking change in the API, our app would automatically link a payment intent to an invoice so we could know more about their order (we need to know what is in the order to prefill customs info, and preselect the shipping rate). However, now that we can't reference the invoice, the user's experiance is degraded when shipping from a payment since we're missing more details about their order.
Previously when shipping from a payment, we knew the invoice number and could provide a fuller experiance. Here's what shipping from a payment on a payment detail viewport.
But this page should look more like the screenshot below. We're missing the invioce ID, so we'll have to do additional calls to get the invoiceID associated with a paymentIntent:
In a list view of payment intents, this will require considerably more API calls.
Thanks for sharing the details. We generally don't recommend to keep track of shipping status using Stripe API. Stripe enforces rate limit to 20 read operations per second for Search API. I'd recommend storing the shipping status in your own database and retrieve the data from your system instead of using Stripe API.
You can find more details about rate limit here: https://docs.stripe.com/rate-limits
Ok, thanks for the info. I'll work on engineering our backend to accommodate this.