#hoffemberg_api

1 messages ¡ Page 1 of 1 (latest)

subtle kiteBOT
rich nymphBOT
#

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.

subtle kiteBOT
#

👋 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/1267960179463426212

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

edgy tapir
#

Hi there

noble patrol
#

hi

noble patrol
#

And that'll work even if there's a Price associated with it? My issue is that because each of these Products is going to be custom and created when the PaymentLink is generated, the users' connected accounts will get clogged up with a million products.

edgy tapir
#

Wait, can you provide more context?

noble patrol
#

To generate a payment link, I have to provide a Price id, and I need a Product id for that, correct? Our users are photographers who are using our platform to create custom products for their customers, such as a albums, cards, prints, etc. Each line item is a unique product and price so I am generating these at the same time the payment link is generated. Thus, if the photographer has three line items for Customer A, and 5 for B, now he has 8 products and 8 prices in his connected account.

#

But once the customer pays for the order, those products and prices will not need to be used again.

edgy tapir
#

Okay, so Prices and Products created inline are automatically archived/cannot be used for other payments

#

I assume each photographer has a set list of item categories they sell (e.g. albums, cards, prints, etc.) but the prices within these might be unique, correct?

noble patrol
#

Correct.

edgy tapir
#

So it seems like photographers will have a set number of Products but can have many Prices within these Products, right?

noble patrol
#

Well, each Product could be unique too. For example, Customer A wants an 10-page album with a black leather cover, and Customer B wants a 20-page album with a canvas cover. They're both albums, but besides that everything else about them might be different, including their descriptions.

edgy tapir
#

Could these all just fit under the "Album" Product, where each Price has a unique description?

noble patrol
#

I'm not really sure. I think my boss' vision is that the users don't necessarily have to go into their Stripe dashboards and set up products and prices. They just generate the order on our platform, and we send the information to Stripe to generate the payment link.

#

In which case they might not care if their accounts are cluttered with products and prices, but some of the users may also use their Stripe accounts for other types of transactions and so if they do go into their dashboards we don't want them to see a big mess.

#

Are you still there? Is the solution maybe to grab the product and price ids off the line items after an order is paid and then archive them?

edgy tapir
#

Yep, sorry, the server is a little busy

#

Is the solution maybe to grab the product and price ids off the line items after an order is paid and then archive them?
You shouldn't have to manually archive them if you're creating inline Products and Prices. We'll automatically archive these for you

noble patrol
#

And when you say "creating inline Products and Prices" do you mean generating them with the API when the PaymentLink is created?

#

Because I'm looking at the connected account (I'm in Test mode) that I've been playing with. I've got several Products in there that were generated when I generated the payment link, but none of them is archived.

edgy tapir
#

Can you share one of those Product IDs?

noble patrol
#

prod_QZRNvITWswxPeY

edgy tapir
#

So, if you create a Price using price_data, we automatically archive that Price. In your case, the Price and parent Product will remain active until archived manually

#

The Product you shared was created by your platform on the connected account by calling /v1/products

noble patrol
#

Yes. So are you telling me that if I provide my own price_data object when I created the PaymentLink, then it will be automatically archived? Or are you saying that if I am generating a PaymentLink then I have to create the Product and Price so I can provide the Price id to the PaymentLink.create()?

edgy tapir
#

The latter since PaymentLinks don't currently offer a way to create a Price inline with price_data. Your only option is to pass a Price ID

noble patrol
#

But it sounds like if I use a CheckoutSession instead of a PaymentLink, then the products and prices will be automatically archived after the checkout session is finished?

#

If I provide a price_data object instead of a Price ID?

edgy tapir
#

That's right. This means that if you're flexible and can pivot to using Checkout instead, you get the auto archive functionality if you create Prices via price_data and/or Products via product_data

noble patrol
#

Ah, okay, I see. Thank you for clarifying. I'll check with my team and see which way they want to go.