#lucas-customer-defaultpm

1 messages ยท Page 1 of 1 (latest)

sweet valleyBOT
feral inlet
#

Hi ๐Ÿ‘‹

Where are you trying to set this?

green hatch
#

i have no idea about this

feral inlet
#

That is going to make this hard. What record are you looking at where. you see this?

green hatch
#

i need default payment method when subscription start

sweet valleyBOT
green hatch
#

automatic_payment_methods: {
enabled: true,
}
passing in create-payment-intent api

feral inlet
#

Are you collecting the Payment Method after you create the Subscription or do yo know it beforehand?

wintry path
#

lucas-customer-defaultpm

green hatch
#

let me share more information

#

i have two plans
and subscription will start after device deliverd
and it will take 4-5 days so now payment collect after checkout form i just need to store default payment method for particular customer

wintry path
#

How are you going to collect payment method details exactly?

green hatch
#

i am calling retrieve-customer api
Sorry I can't explain it to you

#

in short i just need to store default payment method.

wintry path
#

But to explain how to do that, I need to understand what you are doing

green hatch
#

i have two plan right now

  1. month, half year, year.
  2. device-1, device-2, device-3
    device prices based on plan
    its working nicely
    whenever i tried to update subscription subscription will update on same day.
    we need to update subscription in end of the period like
    if we select monthly plan with device-1 and after 10 days of subscription started user update his subscription subscriptio will update after remaining days(20 days) & charged after end of the subscription period
wintry path
#

Okay but how exactly are you creating the Subscription and how are you collecting card details? Like are you using Checkout? PaymentElement? Something else?

green hatch
#

using checkout

wintry path
#

Okay so if you use Checkout to collect card details for a Subscription it will set the right default payment method automatically for you

#

So I don't understand why you said it doesn't. Can you give a concrete example of a Customer id cus_123 for me to look at?

green hatch
#

sorry .PaymentElement

#

let me share

#

cus_NgewPMrIMcYAUr

wintry path
#

Ah PaymentElement is completely different

#

Looks like all you did is
1/ Create a Customer
2/ Create a PaymentIntent
3/ Confirm that PaymentIntent

You never created a Subscription. Why are you using a one-time PaymentIntent if you want to do Subscriptions?

green hatch
#

subscription will create after device deliverd.
so what can i do ?

wintry path
#

why would you create the Subscription after and take a payment upfront? That is not a really common flow

green hatch
#

ok dude

#

thank you

wintry path
#

Let me know if that doesn't work!

green hatch
#

ok sure brother ๐Ÿ™‚