#andrew_api
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/1346588306451861534
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, if you're asking if you can pass different sets of payment method types depending on some additional logic, you can use the payment method configurations: https://docs.stripe.com/payments/payment-method-configurations
When you create the PaymentIntent, you can pass that: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_configuration and the update it later https://docs.stripe.com/api/payment_intents/update#update_payment_intent-payment_method_configuration
With subscription, you'd pass the payment method types here: https://docs.stripe.com/api/subscriptions/create#create_subscription-payment_settings-payment_method_types and then update it later: https://docs.stripe.com/api/subscriptions/update#update_subscription-payment_settings-payment_method_types
Or pass the payment method types for one-off invoices: https://docs.stripe.com/api/invoices/create#create_invoice-payment_settings-payment_method_types and the update it later: https://docs.stripe.com/api/invoices/update#update_invoice-payment_settings-payment_method_types
Thank you! What about invoices generated by subscriptions set to collect automatically?
Is there a best practice recommended here? I turned off the default payment method types that we didn't want our existing self serve users to have access to and was surprised to see the payment methods remained visible on all active subscriptions. Almost like the subscription inherited and was sticking to whatever payment methods were default at the time it was created
I do not think you would be able to update that via the API at least. Let me look
That would track with what I'm seeing I think.. Thanks for double checking!
Updating the payment methods on the invoice, https://docs.stripe.com/api/invoices/update#update_invoice-payment_settings-payment_method_types might be possible for some payment method types. Are you able to try this?
Giving it a try!
Body like this?
{
"payment_settings[payment_method_types][0]": "card",
"payment_settings[payment_method_types][1]": "apple_pay",
"payment_settings[payment_method_types][2]": "google_pay",
"payment_settings[payment_method_types][3]": "amazon_pay",
"payment_settings[payment_method_types][4]": "link"
}
Looks like I got it. For some reason, it didn't like apple_pay and google_pay even though they're in my general list of available method types
Nice! Yeah, apple_pay and google_pay are under card payment method types so you do not pass those
@grim latch are you unblocked here?
Ah understood! Yep, I believe I am. Thank you!