#mattk5r
1 messages · Page 1 of 1 (latest)
Hello! How are your customer's paying invoices? Through your own UI? Through stripe's hosted invoice page?
Through Stripes hosted invoice page
Gotcha - so the reason this was happening is because previously the hosted invoice page was using legacy Sources, which will always set the first source attached to the customer as the default
I believe we're slowly moving to PaymentElement/PAyment Methods on that page, so this shouldn't be happenign in the future
We're seeing it as recently as last week, does that sound right?
Yeah, this is a VERY new change that's still in the process of being rolled out
Also it's not "always" happening, as far as we can tell either, is that expected?
It would only happen if they didn't have ANY payment methods/sources initially (it would only be set as the default if it's the first source they're adding)
Ok, thanks for the help! I think we can work with this. It is possible to "Unset" a default payment method, and not have a default payment method for a customer, correct?
Also is there a way to prevent this payment method from getting attached to the customer at all?
With the hosted invoice page flow there's no way to prevent it from being attached to the customer
and let me double check on the unsetting
Thanks!!
Also if we stopped using the stripe hosted invoice pages, is it possible to have the "Pay Now" button on the invoice pdf go to a different page than the stripe hosted invoice page.
Also I'm seeing on the dashboard that there is no way to delete the default payment method entirely, is it possible to do that over the API?
So yes, you should be able to delete/detach a Source through the API (https://stripe.com/docs/api/sources/detach?lang=cli)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And no, I don't think there's a way to add a "Pay Now" button to the Invoice PDF - you'd need to build your own flow that you direct users to not through the PDF
and for unsetting the default - with sources the only way to do it would be to delete/detach the source
Is there a way to remove the Pay Now button from the PDF?
Can you show me a screenshot of the button you're talking about?
Sorry the text is "Pay online"
I think there's a way to remove it - just trying out a couple of things
Also I'm seeing that in the dashboard a payment method is marked as "Default", but the api returns customer.invoice_settings.default_payment_method = null
Ahh, but they do have a default_source
Is it ever possible for these to get out of sync?
Found the setting! You're going to want to change the "Include a Stripe-hosted link" setting at https://dashboard.stripe.com/settings/billing/invoice
and yes, those can definitely get out of sync because sources and payment methods are different
Even when you have both set, those are two completely different payment methods/sources (they don't necessarilly represent the same "card" or payment method used to pay)
Is there a way to deduplicate source/payment_methods? Would they both still have the same fingerprint?
Yes, they would both have the same fingerprint
Ok, that should make things easier to reason with. With 'hosted invoice pages' switching from sources to payment methods, will that do anything to the customer.invoice_settings.default_payment_method?
I don't think it should, but I haven't had the chance to test the new flow yet since it's not fully rolled out
Ok, another thing I'm noticing with payment methods, is that a card added in the dashboard has an id of card_123, which seems to be different than a payment_method which have ids of pm_123. Where on the customer object could we identify a default card object?
There's two places - default_source and invoice_settings.default_payment_method
Sources (like card_123 or src_123) can also be used as paymetn method
But Payment Methods (like pm_123) cannot be used as sources
Ok, I think you have answered all my questions! Thank you so much!!
happy to help!