#bhanu365-proration

1 messages ยท Page 1 of 1 (latest)

idle adder
#

The way it works is we credit for unused time on the old plan, and bill for a prorated amount on the new plan according to the remaining time

icy rune
#

Got it

#

Do I need to render payment element at the time to upgrade the subscription?

rustic willow
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

rustic willow
#

but this is also subject to having a default payment method, either on the subscription or on the customer's invoice_settings.default_payment_method

icy rune
#

Ok, If the payment fails from any reason, then I have to update the card details from the customer right?

#

unless the payment will be deducted from the default payment method everytime

#

?

#

@rustic willow

rustic willow
#

you have 2 options

#

either send them to the Customer Portal to collect a new payment method

#

or build your own page where you use Stripe Elements with the PI from that invoice

#

you can find it either directly on the invoice payment_intent.client_secret

#

or on the Subscription latest_invoice.payment_intent.client_secret

icy rune
#

ch_3LZw8uFmM52WOkSo0quwSS3o
What is this parameter?

rustic willow
#

What is this parameter?
do you mean the Charge id?

icy rune
#

yes, i don't have charge ID

#

so how can I get the client secret

icy rune
#

I need my own page

rustic willow
#

ok

#

PaymentIntents are built on top of the Charges API

#

so basically each PI would have at least one if not multiple Charges

icy rune
#

How I can get the card details so when any customer want to upgrade their subscription we can show their card details before the upgradation.

rustic willow
#

and it's not PCI compliant

#

once the User passes the Card info we tokenize it and we don't store the info as is

storm mica
#

Hi there ๐Ÿ‘‹ jumping in so my teammate can take a break. If you're referring to viewing the information regarding a Customer's existing Payment Method, then you can retrieve the associated Payment Method object and review the available information for it. If you're working card payment methods, then the card hash is probably going to be what you're looking for.
https://stripe.com/docs/api/payment_methods/object#payment_method_object-card
https://stripe.com/docs/api/payment_methods/retrieve