#seb_api
1 messages · Page 1 of 1 (latest)
👋 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/1436472350731145227
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- seb_generated-card-metadata, 1 day ago, 33 messages
- seb_api, 1 day ago, 6 messages
Hi, I created [this ticket](#dev-help message) yesterday and am trying to save a card present at checkout with a nickname. I was told to follow this guide but I'm a little confused as to where a confirmation token is introduced and how I can use it
payment_method_data is not supported for card_present as mentioned in the error message. payment_method_data is used to create a payment method, but the card_present can only be created during the payment method at confirmation, but not creation. That's why the error was thrown.
The metadata on the payment method can only be updated after the payment method is created for card_present: https://docs.stripe.com/api/payment_methods/update#update_payment_method-metadata
Have you tried to update the metadata after the payment method is created as suggested by my colleague earlier?
I have tried this yes. When I try and update the payment method right after I capture the payment intent, I get an error sayign the payment needs to be created before updating it
Could you share the request ID with the error when you attempt to update the metadata on the payment method?
Yes let me get it
There's the request ID when I try and save the card to the customer before capturing it req_BQPPz6xOTX4iwh
As mentioned in https://docs.stripe.com/terminal/features/saving-payment-details/save-after-payment?terminal-sdk-platform=server-driven#access-generated-card:
A successful payment with a method that supports future use returns a PaymentIntent in the requires_capture or succeeded state. You can retrieve the generated_card payment method by expanding the PaymentIntent’s latest_charge property and viewing payment_method_details.card_present.
The payment method that is saved to the customer will be under generated_card, which is pm_1SQy1ZJFfb8SRu7A3lfViQoF in https://dashboard.stripe.com/acct_1HQMA1JFfb8SRu7A/test/logs/req_550E10E571MOC1. However, you attempted to update pm_1SQy1ZJFfb8SRu7AXll2wPJU that wasn't from generated_card field
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Could you try updating the metatdata on the payment method from generated_card?
Awesome! That appeared to be my issue. I just added latest_charge as an expandable object and then made a call to update card with this id. It worked!
Thank you so much
No problem! Happy to help 😄
Out of curriosity, why doest the cardpresnet key still exist on payment method if it doens't actually mean anything?
Which card present key are you referring to? If you're referring to the type, this just indicates the payment method is created through card_present flow and you can read its details under card_present hash: https://docs.stripe.com/api/payment_methods/object#payment_method_object-card_present
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The key in the payment intent object. Like why are the card details stored in the payment_method key for all forms of payment other than card present and then for card present they're stored in the latest_charge key. That doesn't make a ton of sense to me