#ayesha-shaikh_api
1 messages ¡ Page 1 of 1 (latest)
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.
- ayesha-shaikh_api, 5 days ago, 16 messages
- ayesha-shaikh_api, 5 days ago, 12 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1255405402061803614
đ Have more to share? Add details, code, screenshots, videos, etc. below.
What do you mean by "card ID" ?
I don't quite follow you, is you question related to a payment method https://docs.stripe.com/api/payment_methods/object or card https://docs.stripe.com/api/issuing/cards/object ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so, this customer (cus_Q7KpchZFMkmqr2) has card payment method (9729), but I dont see any card id there
I just checked and yes they have a card payment method, the payment method object ID starts with pm_
and how to get card id for that?
There's no card ID here because there's no card object
Can you tell why you need a card ID?
to create invoices for them
and we are using card id & storing it in our system as well
You can also use a payment method to create an invoice. Have you tried it?
this is how I am creating invoice req_NsQQdPz4uFcbUL
https://docs.stripe.com/api/invoices/create#create_invoice-default_payment_method use default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yeah that can be used - but I am using sources and card only - to use default_payment_method will require additional code changes which is not planned yet and this is the only customer with no card id -- so is there anyway i can get card id for that payment method?
No
And I'd highly recommend you upgrading to the PaymentMethod API.
https://docs.stripe.com/payments/payment-methods/transitioning#compatibility you can still use card object ID in any API that accepts a PaymentMethod object.
Meaning you can pass a card ID to default_payment_method when creating an invoice.
yes, that was my follow up question thanks
but cant pass pm_id to default source?
is there anyway for billing portal to create card instead of payment method? like can I change this -- is there any setting for that?
No you can't use PM ID with default_source I'm afraid.
No, there's no options to make billing portal create card objects intead of payment methods
so that when customer adds a method through billing portal it will have card id and my current implementation will work as is
okay thanks!
just to confirm again, for this customer's payment method there is no card id. if I have to create invoice for them, only way is to have pm_id passed to default payment method instead of default source
To summarize, all you need to do is change your code and replace default_source with default_payment_method.
And it will work for both payment methods, and legacy card objects
any other changes that I'll have to care of if I use default_payment_method instead of source? like web hook etc.
Sure, your webhook endpoint should expect the invoice object has default_payment_method instead of default_source.
thanks
one more thing - I am also using ba_id for bank accounts, this will work for that too?
Is it about ACH direct debit?
Yes you can use bank account as a payment method https://docs.stripe.com/payments/ach-debit/migrating-from-charges#retrieving-a-bankaccount-as-a-paymentmethod