#niral_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1260104025412472893
đ Have more to share? Add details, code, screenshots, videos, etc. below.
i want to update billing cycle of already subscribed subscription that are already running ,
i have many periodicity and i want to change its billing cycle from next cycle with proration
@gleaming quail please respond
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i already used this but i want to update all subscription like :
for yearly next billing cycle will be from 1st jan of next year
for monthly next billing cycle will be from 1st of next month
for every 3 months next billing cycle will be from 1st of next quarters
and every 6 months next billing cycle will be from 1st of next semi annual period
for weekly next monday
There's no API for batch update, you need to update your susbsriptions one-by-one.
I've already shared with you the API reference, you can pass it your developer and they should know how to code it.
i am developer , but from that i can not directly update billing cycle anchot as it accepts only now and unchanged enum value
but i want to set long value as per my requirement
That's not possible I'm afraid. The workaround is to create a subscription schedule from a subscription, where you can set phases for the subscription, and set the billing_cycle_anchor to phase_start
thats ok i can create schedule but i want to create schedule for particular subscription and set billing cycle anchor please give java code for that
I'd recommend checking the guides here that include code example:
- Create a subscription schedule on existing subscription: https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#changing-subscriptions
- Set the
billing_cycle_anchortophase_startof the Subscription Schedule created in step 1 as what Jack suggested earlier: https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#resetting-anchor
please give curl of java code for this
i want to create subcription schedule for already existing subscribed subscription to update its billing cycle
Have you checked the guides above? They provide the code examples
yes i checked that
What's the request ID?
{
"id": "sub_sched_1PaYWJSBOWg2gNqsVetOeTKF",
"object": "subscription_schedule",
"created": 1720510287,
"current_phase": {
"end_date": 1746272447,
"start_date": 1714736447
},
"customer": "cus_Pw3S66GOXq8Cnw",
"default_settings": {
"application_fee_percent": null,
"automatic_tax": {
"enabled": false,
"liability": null
},
"billing_cycle_anchor": "automatic",
"billing_thresholds": null,
"collection_method": "charge_automatically",
"default_payment_method": null,
"default_source": null,
"description": null,
"invoice_settings": {
"account_tax_ids": null,
"days_until_due": null,
"issuer": {
"type": "self"
}
},
},
"phases": [
{
"add_invoice_items": [],
"application_fee_percent": null,
"automatic_tax": {
"enabled": false,
"liability": null
},
"billing_cycle_anchor": null,
"currency": "usd",
"end_date": 1746272447,
"metadata": {},
"on_behalf_of": null,
"proration_behavior": "create_prorations",
"start_date": 1714736447,
"transfer_data": null,
"trial_end": null
}
],
"released_at": null,
"released_subscription": null,
"renewal_interval": null,
"status": "active",
"subscription": "sub_1PCKTsSBOWg2gNqsoNDvSALj",
"test_clock": null
}
this is schedule tHAT I CREATED now i want to update its current period end_date please provide curl for this
No I can't help you write code or curl command.