#ericbirdsall

1 messages ยท Page 1 of 1 (latest)

past timberBOT
woven fiber
#

๐Ÿ‘‹

#

Can you provide the Subscription ID where you see this?

white siren
#

sub_1Ls7q0FfGUAEY6nDkwM3u97x

woven fiber
#

Thanks looking

white siren
#

Any luck?

woven fiber
#

Sorry, got pulled away for a moment

#

Hmm okay

#

Looks like you are passing an empty string for payment_settings.payment_method_types

white siren
#

Is this line possibly formatted incorrectly?

"payment_settings[payment_method_types]": [ "card" ],

woven fiber
#

Hmm that looks okay to me

white siren
#

Me too.... I just logged out the body variable and it shows everything correctly:

{
"metadata[netsuite_account_id]": "TSTDRV2034515",
"metadata[netsuite_license_id]": "1391",
"metadata[company]": "Netgain Development - NETCLOSE [TSTDRV2034515]",
"items[0][price]": "price_1LpfV8FfGUAEY6nDvAMpj06T",
"payment_behavior": "default_incomplete",
"payment_settings[save_default_payment_method]": "on_subscription",
"payment_settings[payment_method_types]": [
"card"
],
"items[0][quantity]": "1",
"expand[0]": "latest_invoice.payment_intent",
"customer": "cus_MYnoLYL2O1olUu"
}

woven fiber
#

Hrmm. Run a fresh test and let's take a look at that Sub?

white siren
#

Since it's an ENUM, should I not have it in quotes?

#

"payment_settings[payment_method_types]": [ card ]
instead of

"payment_settings[payment_method_types]": [ "card" ]

woven fiber
#

No it should still be an array of strings

#

Err actually. Maybe not.

#

Try it without an array

#

I thought we always handled payment_method_types as an array

#

But maybe we don't for this param

#

Try "payment_settings[payment_method_types]": "card"

white siren
#

^ Threw an error

#

invalid_request_error - payment_settings[payment_method_types]

Invalid array

woven fiber
#

Yeah okay I thought so. It really should be "payment_settings[payment_method_types]": [ "card" ] ....

#

hmm ๐Ÿค”

white siren
#

Yeah, I just tried adding other ones too, but the Request still shows blank

woven fiber
#

Try changing something else

#

Feels like something is cached here

#

Like change your metadata for a test

white siren
#

Side Note: I really appreciate your help on this ๐Ÿ™‚

woven fiber
#

Hmm so yeah when I test this myself in Node payment_settings: { payment_method_types: ['card'] }, works just fine

#

So it is something with the way your params are submitting here

#

I've got to step away but @snow sphinx will be able to assist further

white siren
#

Thank you, I'm going to reformat to see if that makes a difference

#

SOLVED: This did it...
"payment_settings[payment_method_types][0]": "card",

snow sphinx
#

Wow! Okay, I wouldn't have expected that to need an index value