#ijsje

1 messages · Page 1 of 1 (latest)

finite sphinxBOT
wide fulcrum
normal zinc
#

I added metadata in the stripe dashboard to my product. It doesn't show up when requesting a stripe subscription

#

In result['items']['data'] from result = stripe.Subscription.retrieve(subscription_id)
{ "id": "<>", "object": "subscription_item", "billing_thresholds": null, "created": 1677776381, "metadata": {}, "plan": { "id": "<>", "object": "plan", "active": true, "aggregate_usage": null, "amount": null, "amount_decimal": null, "billing_scheme": "tiered", "created": 1677754066, "currency": "eur", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "<>", "tiers_mode": "volume", "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "price": { "id": "<>", "object": "price", "active": true, "billing_scheme": "tiered", "created": 1677754066, "currency": "eur", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "<>", "recurring": { "aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tax_behavior": "exclusive", "tiers_mode": "volume", "transform_quantity": null, "type": "recurring", "unit_amount": null, "unit_amount_decimal": null }, "quantity": 2, "subscription": "<>", "tax_rates": [] }

#

Added the metadata here:

wide fulcrum
#

The metadata are at the Product level. You need to expand  items.data.price.product when you retrieve the subscription Item

normal zinc
#

ok thnx