#saucisse_dev
1 messages · Page 1 of 1 (latest)
Hello saucisse_dev, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• https://discord.com/channels/841573134531821608/1164479897150959626, 0 days ago, 18 messages
Yup! After setting up a card with a SetupIntent you need to create a PaymentIntent each time youw ant to charge the customer with that card
Except if this is for a subscription
Subscription Works only with setupintent right ?
A subscription does the same thing - you'd setup with a Setup Intent and then all future recurring transactions for the Subscription would create an Invoice, which generates a PaymentIntent under the hood
Okay I understand
I want to handle 3 cases :
- A case where user buy a subscription and upsells products (one time)
- A case where user buy only one time product
- A case where user buy only subscription
I just want to add one thing - with Subscrpitions you don't necessarilly need to use a Setup Intent. You'd only need a Setup Intent if your subscription is for a trial or you want to set up the card well in advance. Otherwise, you can create the Subscription and use the first Payment Intent w/ setup_future_usage to setup the card properly
Okay but sometimes we change the start date so I prefer use SetupIntent every time
So for my first case, here is my workflow :
- Retrieve customer
- Attach paymentMethod
- Create SetupIntent
- Validate 3D Secure
- Create the subscription
- Add the custom products in the invoice
- Valid payment
Am I right ?
YOu shouldn't need to attach the Payment MEthod separately - it'll do it automacally if you have a SetupIntent w/ a customer set
And if you want to add custom product to the invoice you should be creating them before the Subscription, not after
Is it the only way to perform a unique payment for subscription and products ?
Do I have to create an Invoice, add the products, then add the subscription to the invoice ?
No, if you want to do one-off payments you coudl just create standalone Invoices or Payment Intents, they don't have to be related to the Subscription at all
Yes but if I want to perform the subscription and product buying in ONE payment ?
Then you can create the Subscription and set add_invoice_items (https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items). That'll add those one-time product autoamtically to the Subscription's invoice
OK thanks I will cheeck 🙂