#nico_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/1233024128425005106
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
I'm not sure I understand your question. what exactly needs to work with shipping?
We have different shipping rates for different countries. Whereas it costs like 6 Bucks to ship to germany, it may cost 25 to ship to the US. Is it possible to add these rates according to the shipping-address of the customer when using the checkout?
you can pass shipping options/rates here in Checkout Session: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-shipping_options
Yeah, but as far as I understand, the customer can select between these options as he whishes?
If we have a scenario, where a customer goes to the checkout and wants us to ship the items to the us, he could still select the german shipping option which costs significantly less. This would lead to us needing to cancel the order.
Is there a way to restrict shipping options to a country?
I see what you mean. not sure, give me a few minutes to run some tests.
no I couldn't find a way to do this. one workaround would be to collect the users country before creating the Checkout Session, this way you can directly set the correct shipping rate.
Ok, and I could restrict the country the user can set on the shipping settings using the allowed countries: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-shipping_address_collection-allowed_countries
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This could lead to some confusion tho.
But probably the best workarround
Thnaks!
*Thanks!
Could you allso help me understand something about the webhooks?
Could you allso help me understand something about the webhooks?
sure, what's your question?
We're building a headless WooCommerce store. (WooCommerce backend, detached next.js frontend). In WooCommerce we're using the official stripe WooCommerce gateway to receive the webhooks. Unfortunatly ,altrough we receive the webhooks sucessfully, we're not able to get the gateway plugin to make the link between the webhook and the order.
We thought we probably have to do one of two things:
- Add an identifier to the stripe checkout session, so that stripe can return this identifier when firing the webhook, allowing the gateway to make the connection.
- Add an identifier to the WooCommerce Order, so that the gateway is able to identify the Order after receiving the webhook.
WOuld you be able to tell me the correct way, as well as letting me know what identifier to set and with what key?
here on Discord we know nothing about WooCommerce gateway, so I can't really help. all I can say is that it's possible to use the metadata field to store some identified on the Checkout Session: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-metadata
As it is a stripe developed plugin i think, would you be able to tell me where I could get support for that?
no this plugin was not made by Stripe. you can try contacting the plugin developer (or woocommerce) directly