#skoshkarli-Subscription
1 messages · Page 1 of 1 (latest)
Yes, in this case, that is correct
so it will update?
Have you tried testing it?
You can enable test mode on your account and use test API keys when making calls to test these
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?
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.
i have another follow up question
Sure!
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
There is not a way to start a free trial without collecting the payment information first. And due to compliance regulations, with free trials emails must be sent: https://stripe.com/docs/billing/subscriptions/trials#compliance with trial subscriptions.
but it does allow you to create a subscription with trial_days without payment
and returns a subscription in 'trialing' status
Ah, I was thinking Checkout Subscriptions. Can you confirm how you're integration? What documents are you working with?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you, testing it now
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?
Yes, since it's not checkout you can.. sorry I made an assumption here
i really have alot of problems due to having to create a subscription before collecting payment
You'd pass the default payment method: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method for that customer during the subscription creation
so default payment method is the payment intent id?
No, that is the PaymentMethod: https://stripe.com/docs/api/payment_methods
So you'd collect the PaymentMethod for the customer first, then create the subscription
so to clarify the flow:
- Create a customer
- Create a payment intent
- Use the clientsecret from the above payment intent to render PaymentForm using StripeElements.
- 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
so in step 2, use setup intent instead of payment intent
yep!
got it
This document, https://stripe.com/docs/payments/save-and-reuse is what you shoulf reference to
is there another step i have to do if i wanted to activate a sub on creation (in cases where there is no trial) ?
Yes, you'd want to review this: https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_behavior
thats excellent