#pierre06-updating-sub-price

1 messages Β· Page 1 of 1 (latest)

prisma viper
quiet finch
#

Hello ynnoj πŸ™‚ prhaps this one : (ID of element of subscription) : si_KeDZkmDAiBvZpo

#

If it is not good where can I find this ID ?

prisma viper
#

Checking on it now

quiet finch
#

I take a look...

#

no this one is not the problem it is just a test I made

prisma viper
#

That's a request to the same Subscription ID you shared

#

Looks like req_xx

quiet finch
#

Yes now I made a new request : price_1JyvWjHPTdlDaHhkgNqKIpDI / si_KeDy41R1ttMuhX

#

OK I'm in the log and the last request didn't made any error (but created a new line while I would like to update)

prisma viper
#

Ok, let me check

quiet finch
#

Very good, please could you show me how to put this id in : $stripe->subscriptions->update(
'sub_JbUh2dGdG2qVJd',
['metadata' => ['order_id' => '6735']]
);

#

I tried to put it a few ways but no one worked

#

my line which add is items[0][price] if I put items[0][price][id]Β it doesn't work

#

oups sorry it is in your example !

#

sorry one more time, let me try it

prisma viper
#

Something like:

$stripe->subscriptions->update(
  'sub_JbUh2dGdG2qVJd',
  [
    'items' => [
      [
        'id' => 'si_xxx',
        'price' => 'price_xxx'
      ]
    ]
    'metadata' => ['order_id' => '6735']
  ]
);
quiet finch
#

Yes it works !!! Thank you so much ynnoj πŸ™‚

#

I'm very much obliged to you πŸ‘

prisma viper
#

Glad to hear it! πŸŽ‰

quiet finch
#

Have a good day, bye !