#Bas

1 messages · Page 1 of 1 (latest)

quartz gorgeBOT
iron hornet
#
  "end_behavior": "release",
  "start_date": "1697714055",
  "phases": {
    "0": {
      "items": {
        "0": {
          "price_data": {
            "recurring": {
              "interval": "month",
              "interval_count": "1"
            },
            "product": "prod_O2SzdFkZ9H1DQI",
            "currency": "EUR",
            "unit_amount_decimal": "995"
          },
          "quantity": "1",
          "metadata": {
            "user": "624004",
            "identifier": "premium"
          }
        }
      },
      "collection_method": "charge_automatically"
    }
  },
  "customer": "cus_OI8TFWE75vWf1x"
}```
#

I don't get any metadata out of it when I retrieve the schedule later.
Where are you expecting to see the metadata?

#

Whats the sub_sched_xxx ID?

#

My guess is because that phase hasn't started, so the metadata hasn't been set on the associated Subscription item:

Set of key-value pairs that you can attach to an item. Metadata on this item will update the underlying subscription item’s metadata when the phase is entered.
https://stripe.com/docs/api/subscription_schedules/object#subscription_schedule_object-phases-items-metadata

sand vine
#

The weird thing is: the list of subscriptions is empty for this user

#

when I'm having a subscription schedule with 1 phase with 1 item starting in the future

#

even if I filter on status=all

iron hornet
#

You need to share the ID of the schedule

#

There wouldn't be a Subscription created until the start_date of the Schedule

sand vine
#

Sorry, it's already solved 🙂 I did an update after the initial create without the metadata and thus losing the metadata upon retrieval

#

thanks for the rubber duck!