#saucisse_dev

1 messages · Page 1 of 1 (latest)

hasty orbitBOT
ember lichen
#

Hi, let me help you with this.

latent island
#

For exemple here : req_M1amMB1gGhCiZ4

#

I explain my problem.

I create a subscription, and add custom products to invoice, and expand payment_intent.

I update payment_intent to inject metadata.

I confirm the payment_intent to inject return_url and confirm.

And in my wehbook, the payment_intent ID is not the same, so I didn't get de metadata to retrive my order server side.

ember lichen
latent island
#

Yes but : And in my wehbook, the payment_intent ID is not the same, so I didn't get de metadata to retrive my order server side.

ember lichen
#

Maybe that was a different PaymentIntent?

latent island
#

evt_3O7ER0DY4NUh1pUi28NpXYg1

#

Here is the event

#

I try to understand WHY it's not the same payment intent I confirmed.... :/

ember lichen
#

It's actually the same. What ID did you take from the event?

#

The pi_xxx or evt_xxx?

hasty orbitBOT
latent island
#

I édited : pi_3O7ER0DY4NUh1pUi2S5gFrIB
And I didn't get the metadata in the event

#

Do I have to retrieve the payment_intent to see the metadata updated ?

ember lichen
#

I see the metadata field as empty. It might be possible that the event was created before you updated the metadata field. In this case, you can retrieve the PaymentIntent via API.

#

But, it's not quite clear to me, are you having trouble retrieving the metadata field or updating?

latent island
#

Well I guess you give me the answer. The event is fired before I update the payment intent.

ember lichen
#

You can add the metadata field when creating the PaymentIntent, or inside the webhook handler

latent island
#

It's seem I can't in this case because the PI is created my the subscription creation

#

so it link metadata to subscription and not payment intent

ember lichen
#

You can access the Subscription metadata via webhooks too.

#

PaymentIntent.invoice.subscription

latent island
#

Thanks I will try that

ember lichen
#

Happy to help.