#skoshkarli-subs-payments

1 messages ยท Page 1 of 1 (latest)

keen furnace
#

Yes, that's correct - when using Subscriptions you don't need to separately create a Payment Intent because we'll create one for you.

#

It shows how you'd use Subscriptions + the Payment Element

serene bloom
#

so the subscription is created before a payment is received?

#

this seems weird

keen furnace
#

That's what we recommend

serene bloom
#

what if the customer doesn't complete the payment?

keen furnace
#

Then the subscription will expire in 23 hours automatically

serene bloom
#

but it stays inactive, correct?

keen furnace
#

Yes, expiration is the same as cancellation

serene bloom
#

so if someone goes through my checkout flow multiple times, without completing payment, they could end up with multiple subscriptions that are inactive?

#

Also, i have choices on my payment page for subscription product, annual vs monthly. How will i create a subscription without a product since i don't yet know which product the user will select?

keen furnace
#

You would create the subscription AFTER they select the product, not behfore

serene bloom
#

but thats not how our product team wants it implemented

#

the product selection happens on the payment page

#

how can i do that using your api?

late flicker
#

Hi there ๐Ÿ‘‹ taking over for karbi

You can have a product selection on the payment page, you just wouldn't create the Subscription until the product was selected.

serene bloom
#

but the paymentElements requires the secret

keen furnace
#

If you want your flow to work like that, I'd recommend not using the Payment Element - the Payment Element relies heavily on the payment intent being available BEFORE you display the element

#

In comparison, with the card element you don't need the client secret until confirmation, and that would allow you to delay creating the Subscription until later

serene bloom
#

oh interesting

#

so if I used card element, what would i do for apple pay/google pay ?

keen furnace
serene bloom
#

it looks like payment request button also requires paymentIntent ?

late flicker
#

Hi there ๐Ÿ‘‹ taking over for Karbi

Give me a few minutes to get caught up.

#

Yes. You would have to create a Payment Intent as part of the integration flow

serene bloom
#

so how can i avoid creating a paymentIntent when doing apple pay on the page that also has product selection?

late flicker
#

I don't think you can. You have to have a Payment Intent in order for payment to occur.

#

When you say product selection, I didn't think the Apple Pay modal gave the option for that

serene bloom
#

no, the way we have it designed is that the product selection will be on the payment page, where the apple pay button will also be present as well as the card element.

#

Once the user clicks on the product they want, they then either fill the card info or click apple pay and we want the subscription to be created at that point and payment completed

#

thats what i am trying to achieve

#

we figured out that we can render CardElement without paymentIntent, so i am trying to figure out how we do apple pay as well

late flicker
serene bloom
#

my concern is specifically around PaymentIntent

#

and having to create that or a subscription prior to displaying the PaymentRequestButton

late flicker
serene bloom
#

So you are saying create a paymentIntent with some default product, then on the Payment/Product Selection page, update the paymentIntent with the appropriate product/price and create the subscription?

#

Also, how do i pass the paymentIntent to the subscription?

late flicker
#

Let's back up a little here. The Subscription creates an Invoice, which creates a Payment Intent. This whole process has nothing to do with the payment request button or creating a Payment Intent.

#

That's why I'm suggesting you not display a payment window/div until the customer selects what they want, because the payment modal you choose to display is going to be entirely different depending on the selection when you mix one-off payments and Subscriptions

serene bloom
#

so if i create a Subscription for the customer before they land on the payment page and use the PaymentElement (using the client_secret from the subscription created beforehand), would there be any issue with potential Subscriptions that never get activated? Are there any notifications that go out to the user as part of creating a subscription before collecting a payment?

scenic cosmos
#

Hello ๐Ÿ‘‹
Taking over here as two-shoes needs to step away soon
Give me a moment to catch up here ๐Ÿ™‚ Thanks

scenic cosmos
#

So if the user never pays the subscription invoice, its status would be past_due.

#

You can specify subscription's default behavior when the payment fails or is incomplete

#

A subscription creation is different than a subscription that's active ๐Ÿ™‚

serene bloom
#

does subscription creation cause any communication to go out to the customer?