#skoshkarli-Subscription

1 messages · Page 1 of 1 (latest)

regal dust
#

hi, taking a look here

vapid mortar
#

i'd be updating an item in subscription

#

deleting an item and adding another

regal dust
#

Yes, in this case, that is correct

vapid mortar
#

so it will update?

regal dust
#

Have you tried testing it?

vapid mortar
#

no i have not

#

where could i test it?

regal dust
#

You can enable test mode on your account and use test API keys when making calls to test these

vapid mortar
#

i have test mode, i am just trying to think through this before i write all the code

#

would this be the same if added a trial on a subscription? the client secret would change?

regal dust
#

Let me test this on my end, just give a moment please

#

Yes, it does. You'd get client secret to each unique payment intent.

vapid mortar
#

i have another follow up question

regal dust
#

Sure!

vapid mortar
#

is there a way to prevent a subscription created with a trial (trialing status) from emailing the customer until payment is collected?

#

or until payment information has been setup

regal dust
vapid mortar
#

but it does allow you to create a subscription with trial_days without payment

#

and returns a subscription in 'trialing' status

regal dust
#

Ah, I was thinking Checkout Subscriptions. Can you confirm how you're integration? What documents are you working with?

vapid mortar
regal dust
#

Thank you, testing it now

vapid mortar
#

but i was told to create a subscription right off the bat instead of creating a payment intent separately

#

is it possible for me to pass the payment intent to a subscription on creation somehow?

regal dust
#

Yes, since it's not checkout you can.. sorry I made an assumption here

vapid mortar
#

i really have alot of problems due to having to create a subscription before collecting payment

regal dust
vapid mortar
#

so default payment method is the payment intent id?

regal dust
#

So you'd collect the PaymentMethod for the customer first, then create the subscription

vapid mortar
#

so to clarify the flow:

#
  1. Create a customer
  2. Create a payment intent
  3. Use the clientsecret from the above payment intent to render PaymentForm using StripeElements.
  4. Create a subscription using the payment form id
#

is there a step somewhere where i call stripe.confirmPayment like i do right now?

#

or stripe.confirmSetup

regal dust
#

I think SetupIntent: is what you should use here

vapid mortar
#

so in step 2, use setup intent instead of payment intent

regal dust
#

yep!

vapid mortar
#

got it

regal dust
vapid mortar
#

is there another step i have to do if i wanted to activate a sub on creation (in cases where there is no trial) ?

regal dust
vapid mortar
#

thats excellent