#ebellotpu6

1 messages · Page 1 of 1 (latest)

fair nimbusBOT
ebon otter
tender elm
#

'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

ebon otter
#

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

tender elm
#

So how to update the invoice to only allows card payment method?

ebon otter
#

What do you want to edit the payment_method_types field?

ebon otter
tender elm
#

so if I want to update the invoice, I have to create a new paymentIntent?

ebon otter
tender elm
#

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

ebon otter
#

As explained, you can't update that field

#

You need to just create a new Invoice

tender elm
#

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 }

ebon otter
#

Can you share an in_xxx?

tender elm
#

in_1N2kw2CHB7HFcdDc4n2xFu9U

ebon otter
#

Checking

fair nimbusBOT
tender elm
#

okey

#

this is the req_id: req_0m2X3aZ3Pr29CI

ebon otter
#

Looks like it was created via a Subscription?

tender elm
#

yes

ebon otter
#

That will control the payment methods available on Invoices generated by the Subscription

#

You can't update the Payment Intent directly like you are here: req_0m2X3aZ3Pr29CI

tender elm
#

the subscription has payment_method_types as null

ebon otter
#

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.

tender elm
#

my invoice payment settings has only card

ebon otter
#

The Subscription field will apply to any future Invoices created

tender elm
#

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

night latch
#

any field you don't mention does not change in the update call

tender elm
#

okey