#sammyboy_code

1 messages ¡ Page 1 of 1 (latest)

spare shellBOT
#

👋 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/1460745484447518730

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

thorn crane
#

Hello, can you send me the ID of a PM where that is the case? I think that may happen when Link is being used as a Wallet rather than a Payment Method. If so, you should be able to detect link by checking the card.wallet.type field on the payment method object

twilit sage
#

Oh interesting so I can use it as a Payment Method or a Wallet?

You want an ID of an existing payment method on my live site?

thorn crane
#

Yeah, though its not something you can directly control, I think it is usually controlled by an internal setting which can make things confusing. Any ID of a PM you've seen this on works, object IDs are typically considered safe to share because they aren't usable without your login/secret key, but if you don't want to share in this channel you can DM it to me.

#

Oh or you can just retrieve the object on your side and see if it has the wallet property

twilit sage
#

This is the payment method ID for Link coming from my payment intent in my sandbox environment. Does that work? "pi_3SpFBmB1JbW0UpxJ1x66uoTP"

I'm confused how I can check the payment method object. It looks like all I have access too really is the paymentElement and it's event handlers.

spare shellBOT
thorn crane
#

Do you have the ID of a customer that you have seen a PM like this saved to? If so you can list payment methods by customer in the API. Or if you print out the full on change event oject I think that should include the pm_ ID

twilit sage
#

The only property in the change event object is value.type which is set to 'card'

marsh jungle
#

Hi there,
taking over for my colleague who had to step away. The Payment Intent you shared, does not contain any Payment Method (yet) since it is still in state "requires_payment_method".
I have two questions:

  1. When receiving the change event, does it contain only value.type or is there also a value.payment_method object?
  2. Do you have another example of a successful payment? In the example you shared we don't have a Payment Method to look at yet. So we would need either a customer ID, that applies, or a PAyment Intent ID that applies, so I can take a look.
twilit sage
#

there's just value.type in the event object from the change event.

Here's a PI from the sandbox. I checked out with Link when it was rendered as the default option..

pi_3SpFTjB1JbW0UpxJ0qhFx1Tr

marsh jungle
#

Thanks, taking a look...

#

Ok, that Payment Intent has the Payment Method pm_1SpFmoB1JbW0UpxJPNkIrS03 attached

#

Which is of type: link

twilit sage
#

The event.value.type from the last change event read as card. Is this a bug potentially?

marsh jungle
#

What is the object in the log?