#ebellotpu6
1 messages · Page 1 of 1 (latest)
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
'Some of the parameters you provided (payment_method_types) cannot be used when modifying a PaymentIntent that was created by an invoice. You can try again without those parameters.'
This is the exception I have catch when I call the update
Can you share the req_xxx ID please
I mean, the error is pretty verbose. You can't do what you're trying to do
I can't find it
So how to update the invoice to only allows card payment method?
What do you want to edit the payment_method_types field?
You'd do that on creation, not on update
so if I want to update the invoice, I have to create a new paymentIntent?
No, you can't create a new Payment Intent for an Invoice. You'd just void the Invoice and create a new one, and pass: https://stripe.com/docs/api/invoices/create#create_invoice-payment_settings-payment_method_types
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okey but this seams not to resolve my problem
beacuse my current invoice have "payment_settings": {
"default_mandate": null,
"payment_method_options": null,
"payment_method_types": null
},
but the link to pay have sepa and card payment methods
I only want to allow card payment method for this invoice
yes, but setting this field as { "card" } does not seams to solve my problem, because the links already allows sepa payment method...
I mean, if I create a new invoice and I set this field as { "card" }, nothing will be solve, because the paymentIntent have the payment_method_types obect { sepa_debit, card }
Can you share an in_xxx?
in_1N2kw2CHB7HFcdDc4n2xFu9U
Checking
Looks like it was created via a Subscription?
yes
In which case, you need to update this field: https://stripe.com/docs/api/subscriptions/update#update_subscription-payment_settings-payment_method_types
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That will control the payment methods available on Invoices generated by the Subscription
And for the existing Invoice, use this field: https://stripe.com/docs/api/invoices/update#update_invoice-payment_settings-payment_method_types
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can't update the Payment Intent directly like you are here: req_0m2X3aZ3Pr29CI
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
the subscription has payment_method_types as null
Then it'll likely be pulling those available from your Invoice settings: https://dashboard.stripe.com/settings/billing/invoice
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
As per the docs:
The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your invoice template settings.
my invoice payment settings has only card
okey, but you said that if I set the subscription payment_method_types to card, this will only allows card? https://invoice.stripe.com/i/acct_1M96VMCHB7HFcdDc/live_YWNjdF8xTTk2Vk1DSEI3SEZjZERjLF9Ob05oSHozMG5yc2Z4c29UTDZic1E0em4yMUpLU3pDLDc0NzY4NDM10200Rq9Z6EsK?s=db
No, you'd need to update that Invoice directly
The Subscription field will apply to any future Invoices created
okey
I have implemented my api endpoint to update the invoice
var options = new InvoiceUpdateOptions { PaymentSettings = new InvoicePaymentSettingsOptions() { PaymentMethodTypes = paymentMethodTypes } };
the options object now is:
-
AccountTaxIds null System.Collections.Generic.List<string> ApplicationFeeAmount null long? AutoAdvance null bool? AutomaticTax null Stripe.InvoiceAutomaticTaxOptions CollectionMethod null string -
CustomFields null System.Collections.Generic.List<Stripe.InvoiceCustomFieldOptions> DaysUntilDue null long? DefaultPaymentMethod null string DefaultSource null string -
DefaultTaxRates null System.Collections.Generic.List<string> Description null string -
Discounts null System.Collections.Generic.List<Stripe.InvoiceDiscountOptions> DueDate null System.DateTime? -
Expand null System.Collections.Generic.List<string> -
ExtraParams Count = 0 System.Collections.Generic.IDictionary<string, object> {System.Collections.Generic.Dictionary<string, object>} Footer null string Metadata null System.Collections.Generic.Dictionary<string, string> OnBehalfOf null string -
PaymentSettings {Stripe.InvoicePaymentSettingsOptions} Stripe.InvoicePaymentSettingsOptions RenderingOptions null Stripe.InvoiceRenderingOptionsOptions StatementDescriptor null string TransferData null Stripe.InvoiceTransferDataOptions
this will put to null all fields in invoice?
I only want to update the paymentSettings
no
any field you don't mention does not change in the update call
okey