#Tilkinik-subscription-qs
1 messages ยท Page 1 of 1 (latest)
We have a project like onlyfans, people can subscripe models. I integrated subscriptions but i wanna transfer money between two accounts. If model has a agency, subscription price split between agency connected account and model's connected account.
I can that in one-time payment with payment intent's metadata. Using webhooks i take charge and reach "charge's payment intent"
But while i create subscriptions, i cannot add metadata to subscription's payment intent
My code :
i just wanna reach subscription's payment intent for add metadata
That's my webhook, i have to use metadata because of non-eu and eu economic zone transfer differences
Gotcha, so you basically want to make two transfers based on the information stored in the metadata?
Yes exactly
Give me a few to look into it please ๐
OK i am waitin'
So as you've already found out, there isn't a way to set the metadata on the PaymentIntent while creating a subscription unfortunately.
The workaround would be to go from PaymentIntent -> Invoice -> Subscription and then look at the metadata on subscription object
Let me know if that makes sense or if you have a follow up question
Can i reach subscription metadata and subscription's charge?
Not sure what you mean by that
can you elaborate?
I mean, i create subscription with metadata and catch with webhooks. In webhooks Can i reach subscription's charge object and transfer money between accounts?
I believe so, You can look at subscription's latest invoice -> PaymentIntent
Ideally, you'd want to listen for invoice.paid event
from the invoice object, you'd find the subscription as well as the PaymentIntent
Oh i got it i just listen for ChargeSucceeded
if i listen invoice.paid i can reach ok i got it
thanks for help
NP! ๐ Happy to help
Have a good day!