#sadeed-metadata

1 messages · Page 1 of 1 (latest)

formal needle
shrewd bison
#

req_SsDSxWCPmTgwMo

formal needle
#

right now you're creating mode=subscription

#

you have a format issue with your code, but even if you fixed it, the PaymentIntent metadata wouldn't be passed in

#

can you share more on why do you need the metadata on the PaymentIntent?

shrewd bison
#

I am trying to fetch the invoice using PaymentIntent object but the created session always returns null for payment intent hence I cant obtain it from there.

im usin the metadata to send some pk's from our db so I can create an object after the session has completed

formal needle
#

what are pk's?

shrewd bison
#

primary keys

formal needle
#

couldn't you add the metadata to the Checkout Session object and use the checkout.session.completed event instead?

shrewd bison
#

that works but since I dont get the payment intent id when a checkout session is created (it returns null for some reason) I have to use the payment_intent.succeeded event hence the metadata problem

formal needle
#

i think my question is why do you need the PaymentIntent event specifically?

#

there're multiple other events which you can use instead

#

for example checkout.session.completed or invoice.paid or customer.subscription.created

shrewd bison
#

I just need a way to retrieve the invoice but I am unable to find a straightforward way to do it. That is why im using payment intents to get the invoice.

I will look into the ones recommended above.

formal needle