#mdubya - metadata
1 messages · Page 1 of 1 (latest)
What's your question?
on submit, assuming no errors, can i pass metadata regarding the payment method ?
if (error) {
// This point will only be reached if there is an immediate error when
// confirming the payment. Show error to your customer (for example, payment
// details incomplete)
const messageContainer = document.querySelector('#error-message');
$('#error-message').removeClass('d-none')
messageContainer.textContent = error.message;
} else {
// can i access the payment method here to give it a name?
}
});```
setupIntent is automatically creating the payment method, but i'd like to pass some meta to the payment method
I don't think you can do that at that point
You could add metadata on SI creation
Or use webhooks to see that it's been confirmed and add the metadata at that point
I recommend the webhook approach though
my use is i'd like to give the user the ability to name their payment methods
rather than: create->redirect->edit->add name-> save
thought id be able to pass it in confirmSetup
Discord is a bit busy, so I don't have time to look into this further at the moment unfortunately. If you want to write in to support over email and mention codename_duchess on Discord, I can take that thread later and investigate options
rgr that
Let me know once you've emailed in so I can grab it