#gyungi_code
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/1392049493117108294
📝 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.
- gyungi_docs, 6 days ago, 6 messages
Hi there 👋 please give me a moment to catch up
No problem! In case it wasn't clear from my initial question, I essentially want to create a PaymentMethod for future use for a customer via the Stripe card reader with some metadata attached allowing us to give the card a nickname for future use.
it is generally not possible to add another type of identifier, like a nickname, to a payment method. You're right to use metadata: https://docs.stripe.com/api/payment_methods/create#create_payment_method-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Cool yup! That's kind of what I was seeing; my struggle is that I can't have the metadata object be present without specifying the "type" field on the PaymentMethodData field within the parameters, but once I have that specified, it either disallows "card_present" or requires information about a "card" that I won't have yet because I'm trying to collect it through the reader.
Hmm..do you mind sharing with me your Stripe account so I can take a closer look at your integration? You can find your account id by logging in to https://dashboard.stripe.com/settings/account . It'll have the prefix acct_
acct_1HQMA1JFfb8SRu7A
thanks!
for what it's worth everything I'm doing now is in test mode
thanks, i can look at test logs
Okay so let's use this request (req_qtdTg6fqkSAApv) for example, where the error says "Direct creation of PaymentMethods for type 'card_present' is disallowed." — it looks like you are creating a Setup Intent for a "card_present" payment method, but this is not the correct approach to save a "card_present" payment method, hence the error message.
The correct way to save a card collected from Terminal Reader is stated here: https://docs.stripe.com/terminal/features/saving-payment-details/overview
I see. So the only way I'd be able to save any metadata on that payment method is AFTER we've collected the generated_card from the stripe reader and then go update that payment method?
Yup, if you want to add a metadata to the collected payment method, you will have to retrieve the payment method and update it seperately
got it; yeah what i was looking for was whether there was a shortcut to kind of add it to the payment method pre-emptively with the new setup intent but fine if i just gotta add it after the payment method has been created. Thanks!
no problem, let us know if we can help with anything else!