#yaman_55271
1 messages · Page 1 of 1 (latest)
hi! well the Subscription will eventually be created and you can add metadata then. For example listen to the customer.subscription.created webhook and check if the subscription object has the schedule field set to know that it was created by a certain Schedule.
so you mean save the metadata in the schdule and when the subscription is created take that metadata and update the new subscription metadata
yes that's one way of doing it
yes but I'm receiving the schedule as null always even when creating a subscription using a schedule
that's not correct then, you must be missing something
do you have an example you can show me where it was null?
I created a schedule with the end behavior as release and it creates a subscription but the schedule is null
for example try creating a schedule for next month, after creating it make the start date today and make sure to track the webhook events, you will find that the schedule updated and schedule released events are triggerd and right after them a subscription created event is triggerd with a null value for schdule
can you share some example IDs of the objects where you tested that?
sure
"sub_sched_1OjKV9AMVM1k0nlvgPZQoAd8"
"sub_1OjKVTAMVM1k0nlvNGKTVZ0F"
this is a schedule and a subscription id
two webhook events right after each other for a schdule being released and a subscription being created with a null schdule
but that subscription was not created by that schedule. You created it manually in the Dashboard.
it's not related to it at all, so it's normal schedule on it is null
sub_sched_1OjKV9AMVM1k0nlvgPZQoAd8 that one never created a Subscription. Its start date is 8pm UTC today, it hasn't happened yet.
Then how it got released and how the other subsciption was created
I'm the only one using it and it created the subscription when I changed the date to today
because of whatever buttons/actions you were interacting with in the Dashboard, you cancelled the schedule and instead created a subscription manually
I don't know how the Dashboard UI does things sorry, we work with developers directly calling the API here
yes even with api same thing