#pankaj-metadata

1 messages · Page 1 of 1 (latest)

umbral canopy
#

hi! not sure I follow the question really.

#

to update with based on meta order
what does that mean?

pearl glacier
#

I am placing order from a webstore so id get generated in strip not from my website

#

So I dont have where clause for update

#

cus_LhPRq1qmXgSmk0

#

For more clarification I want pass order number in strip description but order number get generated after complete the payment process

#

So I need one more API call to update order number in strip

umbral canopy
#

Stripe, not Strip.

pearl glacier
#

Oh Yeah

#

Strip

umbral canopy
#

I'm still completely lost on your question, I'm really sorry. I don't understand you.

pearl glacier
#

I want make a strip API

#

where I want to update metadata description

umbral canopy
#

ok. you shared code that does that, though.

#

like the code you shared in the main channel seems like it would do what you want.

pearl glacier
#

I just taken an example

umbral canopy
#

hmm

#

I mean, like it's just

  'cus_xxxx',
  ['metadata' => ['description' => 'whatever you want']]
);

for example. Where are you stuck?

pearl glacier
#

Yes

#

But I dont have cus_xxxxx

umbral canopy
#

then what are you trying to update the description on?

pearl glacier
#

I am here to know that how i can achieve this

#

i have order in strip

umbral canopy
#

Stripe

#

Again, I'm sorry, but I have no idea what you're asking, the language barrier is really difficult.

pearl glacier
#

This the order

#

where descrption is Order Id:

#

I want to update it with #order-number

umbral canopy
#
$stripe->charges->update(
  'ch_3L00kc2svt92FOo90MIm4Uzy', // intent.charges.data[0].id
  ['metadata' => ['description' => 'whatever you want']]
);

maybe?

pearl glacier
#

$stripe = new \Stripe\StripeClient(
'sk_test_5BnGdnyXCjwGzvKpKUAEGbkS'
);
$stripe->paymentIntents->update(
'pi_1Dr1jX2eZvKYlo2C6r0iT7PO',
['metadata' => ['order_id' => '6735']]
);

#

Is this work?

umbral canopy
#

you can try it in test mode and see. But yes

pearl glacier
#

pi_1Dr1jX2eZvKYlo2C6r0iT7PO

#

Is this ID autogenerated by stripe?

umbral canopy
#

yes

pearl glacier
#

So how i can retrieve that Id in my website?

#

I need to retrieve this ID every time a order is placed

umbral canopy
#

you'd use webhooks.