#soumya

1 messages ยท Page 1 of 1 (latest)

boreal fiberBOT
covert kestrel
#

Hi if the user is new and he is doing the subscription first time how will he be able to add a card ? because add-card needs client secret key which is generated via subscription api can some once help me here

exotic spruce
#

Hello

covert kestrel
exotic spruce
#

If first time the customer needs to do subscription am calling subscription api but tht gives this error

#

without calling subscription api client secret key is not retrived which is used to add card

covert kestrel
#

Did you read the doc I shared?

exotic spruce
#

how can we proceed?

covert kestrel
#

Please read the doc I shared. It covers everything you need

exotic spruce
#

Yes we have read

#

and lots of queries

#

using this as well

#

payment_settings: { save_default_payment_method: 'on_subscription' }

#

which means which ever card we add it will be the defualt one right

covert kestrel
#

Can you share the request ID where you're seeing the error?

exotic spruce
#

req_8WpYOKCldzqTue

#

first time a user is trying to add card to subscribe

covert kestrel
exotic spruce
#

If u can see the request am passing the Setting save_default_payment_method to on_subscription to save the payment method as per docs

#

Hence payment_behavior=default_incomplete will be completed from Frontend payment sheet?

#

and is this required to be set for subscriptoon with trail data?

boreal fiberBOT
covert kestrel
#

Not sure what you mean by that, can you elaborate? Have you tested what the docs are explaining first?

exotic spruce
#

payment_behavior=default_incomplete shd we pass this while calling subscription api with trail period

steel pewter
#

Basically, you can tell a subscription to start in an incomplete state if it requires an immediate payment but no payment method is provided. Trialing subscriptions should go in to a trialing status though so I don't think it is as relevant.

#

I would reccommend testing this with a test clock to see if the subscription behaves how you want once the trial ends

exotic spruce
#

I just want to create subscription with no payment menthod pass client secret key to FE and they will add card