#somewolfy_code
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/1310795358015852625
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! taking a look, gimme a while
I'm assuming that you're using Checkout Sessions?
If you're using Checkout Sessions, it is possible to do a cross sell, but you can only cross sell one product. If you want to offer multiple optional add-ons for products, you'll need to build that functionality into your own site so that the customer can select whatever they want. Then you create the Checkout Session with the selected products
I am building the functionality of choosing those options into my own site. Im mostly wondering, how do I display those options as add-ons to a single product in the Checkout Session?
For exemple :
Product1
-Size : Large
-Color : Red
-Options : Grippy base
I already created different pricing for each size in the Dashboard
So I do have their PriceIds. Its adding those add-ons on top of that and make then appear as options onto one product thats concerning me
how do you want then to appear as options on one product? How do you envision them to look?
Let me do a little mock up in paint
Kinda something like this for when you check out
I'll do another mock up for the page Im buidling
that's on your site though, how do you want it to look like in the Checkout Session?
In the checkout session, Id like it to look like one product with options attached to it, not as a large mug item, a candy red item and a grippy base item
It's so it dosent look like 3 different items to the buyer. Just one with customised add-ons
ah, that's not going to be possible. The way I would do it would probably be to tack on a [Add on] to the product name so that it's more evident it's an add on
Aaah okay that's a bit unfortunate. I'll try and figure out something to make sure the user is really aware of what they get when ordering then!
hi
@nova ore looks like you're in the wrong place, this thread is for someone else's question.
- If you have your own thread please chat there.
- If you have a question or a followup to a closed thread use one of the buttons in https://discord.com/channels/841573134531821608/842637025524842496 to get help (we don't reopen closed threads).
Note that posting inappropriate messages in other people's threads is against the rules. No worries if this was just an honest mistake, but anyone who violates the rules multiple times will be removed from this server.
api stripe with whmcs no work
#help api stripe with whmcs no work, before October it worked and now it doesn't work anymore, I've updated whmcs but it keeps giving an error when completing the payment
@nova ore again, this is someone else's thread / question. Please go to #help to start a new thread / question.
I may have found a work around! I think I might be able to set a custom descrition to my priceId when creating a session :
const session = await stripe.checkout.sessions.create({
line_items: [
{
price: '{{PRICEID}}',
quantity: 1,
description: 'Custom description for the product',
},
],
mode: 'payment',
success_url: `${YOUR_DOMAIN}/success.html`,
cancel_url: `${YOUR_DOMAIN}/cancel.html`,
automatic_tax: {enabled: true},
})
res.redirect(303, session.url);
});
It seems that the stripe API does not allow that change anymore, tho. Is there some sort of work around so I could set the options in the description before opening the session?
You could create the Price and Product data inline : https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-price_data
That would mean creating a new Price and Product for every Checkout Session, but as long as you don't mind that, it'll work
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I would not mind that! In the end, all my data for my products is sent to me from stripe to my database so all my up to date prices are on there. Would that keep adding new products in my stripe dashboard at every purchase?