#sun_docs
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/1264877437116747807
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
the metadata you added is on the Checkout Session and not on the charge itself
Hmm. How does checkout relates to the charge? does it mean the metadata should be in payment intent/setup intent?
possible create a payment intent then have checkout session?
yes you need to pass the metadata to https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Added payment_intent_data => [metadata => ['pricing_country' => 'MY']] to checkout session create, but it seems this way doesn't work under subscription mode.
correct, it wouldn't. If you're using subscriptions for this I think it's much more complex and not really possible unfortunately due to how metadata works/is not inherited down the Subscription->Invoice-PaymentIntent chain.
For checkout sessions, is it possible to make billing address country as default, and disabled (not allowed to change)?
I can't think of a solution that would block the payment before it happened in this setup where you're wanting to prevent regional price use. You'd probably have to implement a block/check on your own side (check the geoIP before redirecting to Checkout), or accept this can happen, or accept it can happen and refund/cancel orders when you detect it's happened.