#dineshkumar_error

1 messages ยท Page 1 of 1 (latest)

grand axleBOT
shut ospreyBOT
#

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.

grand axleBOT
#

๐Ÿ‘‹ 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/1255477486456930347

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

sudden forum
#

The likelihood is your call to create the Subscription reduces the initial invoice amount to 0 (e.g. trial period, discount). In which case there'd no payment due and no Payment Intent. Instead, in those scenarios you'd use the pending_setup_intent on the Subscription: https://docs.stripe.com/api/subscriptions/object#subscription_object-pending_setup_intent

delicate smelt
#

wnen i use payment behavoir allow_incomplete with 100%off promocode i got null value on Subscription.LatestInvoice.PaymentIntent

sudden forum
#

Yep, I just explained why

#

Use Subscription.PendingSetupIntent instead

delicate smelt
#

i want also save card details(paymentmethod) if trial or discount for future payment

#

when amount 0

sudden forum
#

Yep, the Setup Intent will facilitate the saving of payment method details too. You can use if with the Payment Element

delicate smelt
#

please give me example code

sudden forum
#

You need to adjust your code to expand both latest_invoice.payment_intent and pending_setup_intent fields when creating the Subsciption. Only one of those will be set โ€“ pending_setup_intent in the case of a zero-amount invoice (i.e. 100% discount) or latest_invoice.payment_intent if there is a payment due

Whichever is set, you can use the client_secret with the Payment Element to collect payment info and pay/save the details

delicate smelt
#

understood now thank you very much.. for more details....