#kapuma-sub-pi

1 messages · Page 1 of 1 (latest)

solid phoenix
#

hello, you want expand: ['latest_invoice.payment_intent']

viscid ether
#

Let me try it

#

But, Can I do that from subscription webhook?

solid phoenix
#

yes, you get the webhook Event, you make a retrieve call to fetch the Sub again and pass those expand options

viscid ether
#

I mean, Can webhook expand itself?

solid phoenix
#

nope

viscid ether
#

This is my payment intent

#

pi_3JkWBGBsqpjvsBOG1Vyrzv5R

solid phoenix
#

what request are you making that is resulting in that error

viscid ether
#

Ahmm

#

payment intent retrieve

#

With payment intent ID and expand key

solid phoenix
#

well in that case you need no expands

#

my recommendation was if you were fetching the Subscription

#

I was explaining how you go from Sub -> Invoice -> PaymentIntent

but you already have PaymentIntent

#

so you just retrieve it

#

and pass no expands

viscid ether
#

But I receive payment intent object from subscription webhook

#

I need to subscription object cuz i need metadata object

#

So how can i get that from payment intent object?

solid phoenix
#

oh I see

#

you want the reverse

viscid ether
#

Yep

solid phoenix
#

PI -> Invoice -> Sub

#

you pass expand: ['invoice.subscription']

viscid ether
#

Let me try

solid phoenix
#

sorry it wasn't clear originally so I suggested the opposite!

viscid ether
#

Great!, it works

#

Thank you dude

#

My Apologies if i wasn't clear