#vinkesh
1 messages · Page 1 of 1 (latest)
when a subscription get created from scheduled one then there is no end date for that subscription
Hi there, yes you can specify the meta-data through phases.metadata hash (https://stripe.com/docs/api/subscription_schedules/object#subscription_schedule_object-phases-metadata), and the metadata is automatically copied to subscription when the phase happens
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
what about the end date of subscription
The metadata set in invoice is not automatically copied to charge. You can listen to invoice.paid event and set the metadata to charge object by yourself,
okay thanks about these clarification
You can set an end_date for the phase https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-end_date
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
{
"id": "sub_sched_1LvHM3K8SGfgbRnhz6ii1fqn",
"object": "subscription_schedule",
"application": null,
"canceled_at": null,
"completed_at": null,
"created": 1666343847,
"current_phase": null,
"customer": "cus_MbYE60MywObacD",
"default_settings": {
"application_fee_percent": null,
"automatic_tax": {
"enabled": false
},
"billing_cycle_anchor": "automatic",
"billing_thresholds": null,
"collection_method": "charge_automatically",
"default_payment_method": null,
"default_source": null,
"description": null,
"invoice_settings": null,
"transfer_data": null
},
"end_behavior": "release",
"livemode": false,
"metadata": {
},
"phases": [
{
"add_invoice_items": [
],
"application_fee_percent": null,
"billing_cycle_anchor": null,
"billing_thresholds": null,
"collection_method": null,
"coupon": "uAMaE5gk",
"currency": "cad",
"default_payment_method": null,
"default_tax_rates": [
],
"description": null,
"end_date": 1676433600,
"invoice_settings": null,
"items": [
{
"billing_thresholds": null,
"plan": "price_1LvHM3K8SGfgbRnhWCgR4rMl",
"price": "price_1LvHM3K8SGfgbRnhWCgR4rMl",
"quantity": 1,
"tax_rates": [
]
}
],
"metadata": {
},
"proration_behavior": "create_prorations",
"start_date": 1668484800,
"transfer_data": null,
"trial_end": null
}
],
}
here i have end date
but its not reflecting here
Can you share with me the subscription ID?
sub_1M4GMJK8SGfgbRnh1cYZ26XX
Thanks. A subscription doesn't have an end_date property. It has a end_at (https://stripe.com/docs/api/subscriptions/object#subscription_object-ended_at) which will be set when the subscription ends.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So currently the Dashboard show the associated schedule's end_date. If you believe it should be feature request, please let Stripe support know https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
thanks
Hi
I have a scheduled subsscription
that is supposed to be end still continue
{
"end_behavior": "release",
"metadata": {
"School Name": "Hyde Park Masjid",
"Account InvoiceId": "28110",
"Student Name": "07jul 2022",
"Parent Name": "vaneyo 6654",
"Parent Email": "vaneyo6654@storypo.com",
"Date": "10/21/2022 3:20:20 PM",
"School Identifier": "miss-icco",
"Amount": "500",
"Invoice Identifier": "01a6c808-ae1b-4224-800d-91d6ce030dbc"
},
"phases": {
"0": {
"items": {
"0": {
"price_data": {
"recurring": {
"interval": "month",
"interval_count": "1"
},
"unit_amount": "25000",
"product": "prod_MeWU9pCZ398m0v",
"currency": "cad"
},
"quantity": "1"
}
},
"coupon": "eUNfMXrK",
"iterations": "2"
}
},
"start_date": "1667255400",
"customer": "cus_MeFEeyVzTzcdo1"
}
this is post body
I can see here both invoices are paid for this but it still showing next invoice upcoming on jan 1
its showing those are forever
Can you tell me what's the question?
here this subscription that should end this month
but its saying next invoice on jan1
subscription ID?
sub_1Lz6WPDRnKcRFds7chcvx4BF
The next invoice is a just preview invoice, it won't be created until 1 Jan.
But it should end with shedule end date
As I explained before, the subscription doesn't have an end_date property, and currently Dashboard doesn't show the side effect from subscription schedule.
phases": [
{
"add_invoice_items": [
],
"application_fee_percent": null,
"billing_cycle_anchor": null,
"billing_thresholds": null,
"collection_method": null,
"coupon": "eUNfMXrK",
"currency": "cad",
"default_payment_method": null,
"default_tax_rates": [
],
"description": null,
"end_date": 1672525800,
"invoice_settings": null,
"items": [
{
"billing_thresholds": null,
"plan": "price_1LvHruDRnKcRFds7J7BRteVY",
"price": "price_1LvHruDRnKcRFds7J7BRteVY",
"quantity": 1,
"tax_rates": [
]
}
],