#xandert.93

1 messages ยท Page 1 of 1 (latest)

weary muskBOT
zealous crown
#

๐Ÿ‘‹ happy to help

#

any more context?

bright magnet
#

Haha no just a simple question. Accidentally created a shipping rate I no longer want

#

I can't find a deletion method in the API nor dashboard

zealous crown
#

you can visit https://dashboard.stripe.com/test/shipping-rates for test mode shipping rates or https://dashboard.stripe.com/shipping-rates for live mode

bright magnet
#

Yeah that's great

#

But in test mode I can't find a deletion button?

zealous crown
#

do you have an example? a shipping rate id?

bright magnet
#

Lol sure

#

shr_1M1nxaHlXJfTMfJmdHOO64UA

zealous crown
#

taking a look

bright magnet
#

Thanks

#

But broader picture, I'd also like to know whether I can delete them. Odd that there isn't a method for it

zealous crown
#

the shipping rate you shared is already Archived

#

meaning it can't be used anymore

bright magnet
#

Yes

#

I'm aware

#

But that's because I can't delete it

#

So kindly, for the third time of asking, can I or you delete it?

zealous crown
#

Archived = deleted

bright magnet
#

I'm sorry

#

But it's not

zealous crown
#

there is no hard delete

bright magnet
#

Because this means that when fetching shipping rates, I need to pass the active option to ensure I don't fetch those that are archived

bright magnet
zealous crown
bright magnet
#

Well, it would also be useful if you gave me the rationale for being unable to perform a hard delete

#

But you haven't.

#

API resources should be CRUD-able. I don't understand why CRU is only possible with shipping rates

zealous crown
#

as I explained we don't perform hard deletes for many reasons and instead we Archive the shipping rates

bright magnet
#

Okay, that answer would have sufficed 38 minutes ago

#

Secondly, in which event can I access the purchased product details following checkout completion? I am using Stripe Checkout

zealous crown
bright magnet
#

Which attribute?

#

I want the product details and quantities etc

#

I can't find them in that event

zealous crown
bright magnet
#

You're not answering me

zealous crown
#

I did answer you

bright magnet
#

Just say you don't know if you don't know. There's no shame in it

#

I've inspected that object heavily

zealous crown
#

you just need to go to that link

bright magnet
#

I have

zealous crown
bright magnet
#

But nowhere do any of its attributes pertain to what I'm looking for

zealous crown
bright magnet
#

That's great

#

But I'm talking about a specific event here

zealous crown
#

would you mind sharing that event id?

#

maybe it would be easier to see what you're looking at

bright magnet
#

Sure

#

evt_1M1nwaHlXJfTMfJmqEgDz5e1

#

Again, I'm just looking for the product ID's of the purchased products as well as their quantities

zealous crown
#

sure thing will take a look

bright magnet
#

Okay

zealous crown
#

ok so recently we changed the API to help reduce latency so we no longer send the line_items on the checkout object related events instead you should be using https://stripe.com/docs/api/checkout/sessions/line_items to retrieve the line_items and then get the data you need

bright magnet
#

Finally!

#

Wow

#

Instead you sent me 4 unhelpful links to begin with

#

Please don't half-ass your responses in the future. It would be appreciated ๐Ÿ™‚

neat mortar
#

Hi there, in Stripe Checkout, is there a way to configure the ordering of listed shipping rates?
[10:25]xandert.93: For example, I'd like the Free rate to be at the bottom

#

let me check!

bright magnet
#

Thanks

neat mortar
#

it's based on the order that you pass the items in the shipping_options array.

bright magnet
#

Okay

#

So since I'm fetching them from Stripe

#

I'd need to manually perform a sort on them myself before passing them as shipping_options?

neat mortar
#

they're returned in reverse chronological order by created date when you list objects in the API, if you want a different sorting applied to the CheckoutSession then yes.

bright magnet
#

And to double check, it's impossible to delete shipping orders, right?

#

Because that would enable me to recreate them in an order that suits me

neat mortar
#

what is a 'shipping order'?

bright magnet
#

Sorry

#

ShippingRate!

neat mortar
#

my colleague answered that already. No, you can't delete them. You can update their active boolean to false and then pass an active filter to the list endpoint