#binod-subscription
1 messages ยท Page 1 of 1 (latest)
I am able to create subscription. but having issue on update i.e. Upgrade/Downgrade subscription
Can you give me more details? What issues are you have seeing?
Im using clientSecret to pay using PaymentElement. so the issue is, clientSecret is being generated on subscriptions CREATE API but not on UPDATE API.
const updated = await stripe.subscriptions.update(subscription_id, { cancel_at_period_end: false, payment_behavior: 'default_incomplete', expand: ['latest_invoice.payment_intent'], proration_behavior: 'always_invoice', payment_settings: { save_default_payment_method: 'on_subscription' }, items: [{ id: existing_subs.items.data[0].id, price: data.plan_id, }] });
This is my code
It doesnt have a updated.latest_invoice.payment_intent.client_secret
Can you share one of the update requests?
you mean requestID?
yup!
Yes, I'm looking
This is a send_invoice subscription - so the invoice isn't finalized when the update request is complete. The invoice is automatically finalized an hour later, and that's when the payment intent is created
No, that's not the issue. It's issue with Card payment as well
Im using send_invoice only for iDeal payment
Can you show me an example where you're seeing this with card payment?
I get an error only if subscription has been expired. Otherwise, I can switch (upgrade/downgrade) subscriptions smoothly
So this isn't an issue with card payments then?
I think so.
Then we're back to what I mentioned before - I'm fairly sure this is because you're using send_invoice with ideal subscriptions and it has a different finalization timeline than charge_automatically
But, card payment also doesnt work
What about it doesn't work?
Yes, so can you give me an example of a card Subscription update where you didn't get back a client secret?
Im not sure. this might be the one req_XUOXWq4XGCAxDY
That's a send invoice request (not an update subscription request) and it's for the same invoice we talked about earlier - it's ideal + send_invoice
I deleted the sub due to the issue I was facing. So, now it's working. But the problem is when subscription expires. I can't update because I don't get clientSecret. Thant's where Im stuck
By expired, do you mean canceled?
Right now sub is active so, Im not being able to reproduce error
No, I mean due date is passed but no payment done
Is it possible that the invoice that was created did not need payment (like if you were downgrading, so the invoiec was just crediting back funds)?
I have put 1 day as recurring payment so It will expire tomorrow and I will reach out again
๐
I'm fairly sure this is because of send_invoice, or because the Invoice doesn't need payment so when you have other examples of a card subscription update request that isn't giving you back a client secret feel free to ask
Also, can I auto renew subscriptions with SEPA Direct Debit along with iDeal?
Yes, when you setup an ideal payment method you should be able to get back a sepa debit payment method to be used for auto renewal (https://stripe.com/docs/payments/ideal/set-up-payment)
It's quite confusing. Can you tell me how does it work in high level?
SEPA looks like a different payment method.
How does it work along with iDeal?
Have you read the doc I sent you? Ideal can't be used for future payments (which is why it requires an invoice to be sent everytime with send_invoice), but we offer the ability to save the ideal details as a sepa payment method, which does allow you to charge it automatically in the future
yeah, going through doc, Im little bit confused
what I want is, if SEPA is setup, auto renew else send_invoice for iDeal. Is that possible?
Hi there ๐ taking over for karbi
Give me a few minutes to get caught up.
sure
what I want is, if SEPA is setup, auto renew else send_invoice for iDeal. Is that possible?
This is possible. What have you tried so far?
Im just doing research right now. Just figuring out how does it work
I just need high level flow
I'm using PaymentElement
Card and iDeal payment are working fine.
Just need to integrate SEPA along with iDeal
I'm not sure I understand where you're running into an issue. These are separate payment methods. There are a myriad of different ways that this flow could work, so you'll have to be more specific
okay so If I pay with iDeal, I will need send_invoice and if I pay with SEPA, it will automatically charge right?
It depends on if you're creating a one-off charge or using Subscriptions or Invoices or Payment Links. Like I said, the specifics will detirmine how this stuff works: https://stripe.com/docs/payments/sepa-debit
As you said iDeal and SEPA are different payment methods. Im confused about, I have 2 payment options right now 1. Credit Card 2. iDeal
So, do I implement SEPA as a third payment method or withing a 2nd payment method i.e. iDeal
?
A 3rd Payment Method
But, there is a doc to use iDeal with SEPA https://stripe.com/docs/payments/ideal/set-up-payment?html-or-react=react
what's the difference?
Ahhh, I see. iDeal exists on top of SEPA (e.g. it uses SEPA to function)
I would recommend doing some independent research if you want more information on the difference between the payment methods. We are mainly here to help with integration specifics, as opposed to high-level explanations of different aspects of global payment avenues
yeah, but there is not much resources online.
It would be nice to know, which one is better approach, use SEPA as a third payment method or with iDeail
It will depend on the specifics of what you're going for. I'm not sure what the pros and cons are, as they are related to how you want your integration to behave.