#dpetrovaliev

1 messages · Page 1 of 1 (latest)

elder rivetBOT
fallen mesa
#

Hey there

#

So the error indicates which parameter is incorrect: ``` message: "Invalid array",
param: "features[subscription_update][products]",

#

Looks like you just passed a string there instead of an array

#

It should be an array of hashes which contains prices and products within the array

tall lodge
#

are you sure i'm passing a string instead of array?

fallen mesa
#

Ah you are actually passing an object instead of an array of objects

tall lodge
#

ok, could you send me an example of how exactly shoul be?

fallen mesa
#

Looks like you are using PHP... so that part would be something like:

    'subscription_update' => [
      'products' => [
          ['product' => 'prod_123',
            'prices' => ['price_123']
          ]
        ],
      'enabled' => true,
    ],```
#

I'm not a PHP dev but I believe that is right

#

Try it out