#amar_api

1 messages ¡ Page 1 of 1 (latest)

trail capeBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1246097942339915787

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

merry belfry
#

Here's my checkout code: const session = await stripe.checkout.sessions.create({
customer: customer_id,
mode: 'subscription',
line_items: [
{
price_data: {
currency: currency,
unit_amount: price,
recurring: {
interval: interval,
interval_count: interval_count
},
product_data: {
name: name,
description: desc,
metadata:{
"coverage_zone" : coverage_zone,
}
},
},
quantity: 1}
],
subscription_data: subscription_data,
allow_promotion_codes: true,
//success_url: return_url_root+'success?session_id={Setup_SESSION_ID}',
success_url: return_url+'/success',
cancel_url: return_url+'/'+return_page,
customer_update: {"address":"auto"},
automatic_tax: {"enabled": true}
//https://support.stripe.com/questions/supported-languages-for-stripe-checkout-and-payment-links?locale=en-GB
//locale: language
});

opal summit
#

Can you share a subscription id or checkout session id where the payment method didn't save?

merry belfry
opal summit
#

It saved

#

I see it attached to the customer and set as the default payment method on the subscription

opal summit
#

Ah ok

merry belfry
#

Sorry, should've been clearer

#

How do I update my code to restore this?

opal summit
#

See above

#

Please read the whole thing because there's countries' laws that affect this