#binod-subscription

1 messages ยท Page 1 of 1 (latest)

marsh plover
#

Hello! What question do you have?

median shuttle
#

I am able to create subscription. but having issue on update i.e. Upgrade/Downgrade subscription

marsh plover
#

Can you give me more details? What issues are you have seeing?

median shuttle
#

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

marsh plover
#

Can you share one of the update requests?

median shuttle
#

you mean requestID?

marsh plover
#

yup!

median shuttle
#

req_JppmP4NAqSSAWK

#

are you looking at it?

marsh plover
#

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

median shuttle
#

No, that's not the issue. It's issue with Card payment as well

#

Im using send_invoice only for iDeal payment

marsh plover
#

Can you show me an example where you're seeing this with card payment?

median shuttle
#

I get an error only if subscription has been expired. Otherwise, I can switch (upgrade/downgrade) subscriptions smoothly

marsh plover
#

So this isn't an issue with card payments then?

median shuttle
#

I think so.

marsh plover
#

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

median shuttle
#

But, card payment also doesnt work

marsh plover
#

What about it doesn't work?

median shuttle
#

I don't get clientSecret

#

as a result I cant pay with card

marsh plover
#

Yes, so can you give me an example of a card Subscription update where you didn't get back a client secret?

median shuttle
#

Im not sure. this might be the one req_XUOXWq4XGCAxDY

marsh plover
#

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

median shuttle
#

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

marsh plover
#

By expired, do you mean canceled?

median shuttle
#

Right now sub is active so, Im not being able to reproduce error

#

No, I mean due date is passed but no payment done

marsh plover
#

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)?

median shuttle
#

I have put 1 day as recurring payment so It will expire tomorrow and I will reach out again

marsh plover
#

๐Ÿ‘

#

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

median shuttle
#

Also, can I auto renew subscriptions with SEPA Direct Debit along with iDeal?

marsh plover
median shuttle
#

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?

marsh plover
#

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

median shuttle
#

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?

quasi spoke
#

Hi there ๐Ÿ‘‹ taking over for karbi

Give me a few minutes to get caught up.

median shuttle
#

sure

quasi spoke
#

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?

median shuttle
#

Im just doing research right now. Just figuring out how does it work

#

I just need high level flow

quasi spoke
#

What Stripe products are you using to accept payments?

#

Custom form? Checkout?

median shuttle
#

I'm using PaymentElement

#

Card and iDeal payment are working fine.

#

Just need to integrate SEPA along with iDeal

quasi spoke
#

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

median shuttle
#

okay so If I pay with iDeal, I will need send_invoice and if I pay with SEPA, it will automatically charge right?

quasi spoke
median shuttle
#

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

#

?

quasi spoke
#

A 3rd Payment Method

median shuttle
#

what's the difference?

quasi spoke
#

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

median shuttle
#

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

quasi spoke
#

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.