#bishal-biswas_api

1 messages ยท Page 1 of 1 (latest)

echo craneBOT
pale flameBOT
#

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.

echo craneBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1239906923038638181

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rocky egret
#

Can you provide me step by step guide which will set the payment method used by the user for zero dollar sub as default mode of payment

gusty fractal
#

unfortunately I don't understand what you mean.
let's start over. You are using Checkout to create a Subscription for a customer?

rocky egret
#

Yes! I want the mode of payment they used for the checkout page should be automatically set to default mode of payment for them.

gusty fractal
#

that's already the case, when you use Checkout it sets the default_payment_method of the Subscription to the payment method that was used.

#

is that not enough? do you want to set the customer-level default as well?

pale flameBOT
rocky egret
#

Let explain the issue,
We are trying to only onboard customer who has either credit card or debit card with balance in there account. We check the stripe when user complete the checkout session,
what type of card they used,
if that's a debit then we initiate a payment of 50 cents using PaymentIntent.create
for that we need payment_method_id
and for getting the payment_method_id I am using
payment_intent = stripe.PaymentIntent.retrieve(payment_intent_id, expand=["payment_method"])
which is not working as the default payment is not set for the customer.

gusty fractal
#

maybe share more code showing how you create the CheckoutSession and handle the webhooks where you're trying to get that payment method to charge.

rocky egret
west quarry
#

hi! I'm taking over this thread.

#

this code will create a Checkout Session in Subscription mode. what's your question exactly?

rocky egret
#

Please I cannot explain it again, I have explained it already

west quarry
#

is your goal to retrieve the payment method saved on the customer?

rocky egret
#

Yes! I need the payment method id for the customer who just made zero dollar checkout

west quarry
#

then yes, check the link I shared above.

rocky egret
#

Yes I have checked and implemented the code but it does not work for the customer who has zero dollar checkout as the payment_intent is null

#

can we use stripe.SetupIntent.retrieve to retrieve setup_intent.payment_method ?

west quarry
#

Yes I have checked and implemented the code but it does not work for the customer who has zero dollar checkout as the payment_intent is null
what does not work? when you list the payment method there's nothing returned? can you share the customer ID (cus_xxx)?

rocky egret
#

Yes! For customer who just onboard using zero dollar checkout return no payment method,
For this customer I have to set the default mode of payment from the dashboard "cus_Q6F6Tkvykb3rMd"

west quarry
#

this customer does have a payment method

rocky egret
#

Okay wait let create new customer

echo craneBOT
rocky egret
#

Hi! Actually it worked for new customer and I was able to fetch the payment method.

#

I want to know, why it was not worked for the this "cus_Q6F6Tkvykb3rMd" customer. After setting the visa card as default mode of payment from the dashboard it worked? Is anything special about this customer?

fast phoenix
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away soon. Can you share the ID of the request where you tried to list Payment Methods for that Customer?

rocky egret
#

ok

fast phoenix
#

Just checking to see if you were able to get the ID of that request you made to list Payment Methods that didn't return any results?