#thelittlewozniak-sub-trial-payment-details

1 messages · Page 1 of 1 (latest)

dreamy wraith
#

Hey there!

#

How are you currently integrating? Your own custom flow with Elements?

lunar lantern
#

Yup that's it !

#

I retrieve when the subscription is created a payment intent and with that, I send it to my front to a payment element

dreamy wraith
#

Yeah so the way you're creating subscriptions permits doing so without collecting a payment method. And, as you pointed out, in most cases there's no initial payment due (as they're within the free tier).

#

This is all perfectly normal. What you're going to need to do is adjust your integration to collect payment details before/at the time of when the users decides to upgrade their usage beyond the free tier (and at the point payment becomes due)

#

Can you share a sub_xxx ID?

lunar lantern
#

yup of course

#

sub_1LIAS1KAOjPpFa36IRxxxNoM

dreamy wraith
#

Yep so there's no default payment method on either the Subscription or the related Customer object

lunar lantern
#

Yes

dreamy wraith
#

2 options:

Learn how to integrate the customer portal.

Create and manage subscriptions to accept recurring payments.

lunar lantern
#

Yes, I already use Payment Element when the subscription is created and it's not free

#

and It returns client secret to pass it to the payment element

dreamy wraith
#

Got it. In that case you just want to implement that same approach, but somewhere in your application logic before they upgrade

#

Or during the upgrade process

#

'You're upgrading today to X and it'll cost $Y p/m. Please provide payment details'

#

The first link I shared there can be adapted to fit your update flow

lunar lantern
#

okay, so I need to retrieve first the details of the user without a client secret to add them inside stripe and after that, I will be able to make that

dreamy wraith
#
  • They click upgrade
  • You present the upgrade details (via invoice preview)
  • Update the subscription which will create a new invoice with associated PI if payment is due
  • Collect payment details with Payment Element and confirm the PI on the invoice following the upgrade
lunar lantern
#

Yes, but how I receive the client secret for the payment element?

dreamy wraith
#

Update the subscription which will create a new invoice with associated PI if payment is due

lunar lantern
#

okay thank you i will check for that!