#seb_api

1 messages · Page 1 of 1 (latest)

snow sonnetBOT
#

👋 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.

warm yoke
#

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

Build an integration where you render the Payment Element before you create a PaymentIntent or SetupIntent, then confirm the Intent from your server.

high saffron
#

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?

warm yoke
#

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

high saffron
#

Could you share the request ID with the error when you attempt to update the metadata on the payment method?

warm yoke
#

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

high saffron
#

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

#

Could you try updating the metatdata on the payment method from generated_card?

warm yoke
#

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

high saffron
#

No problem! Happy to help 😄

warm yoke
#

Out of curriosity, why doest the cardpresnet key still exist on payment method if it doens't actually mean anything?

high saffron
warm yoke
#

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