#Devi
1 messages ยท Page 1 of 1 (latest)
You need the Update Subscription API. Make sure to read about Prorations
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 want to update recurrence price option for exisiting subscription
For ex:May month price is30$ and monthly subscription . Now i want to change June month price is 1000$ and Yearly subscription
When it's yearly subscription you will need price for a whole year
Refer the API Reference above!
ok, so i use same subscription token to update the plan month to year right. Please refer the below code and correct me if am wrong.
//Create reucrring Price
var Priceoptions = new PriceCreateOptions
{
UnitAmountDecimal = pay.PaidAmount * 100,
Currency = pay.CurrencyCode,
BillingScheme = "per_unit",
Recurring = new PriceRecurringOptions
{
Interval = pay.RecurrenceId == 1 ? "month" : "year",
IntervalCount = 1,
UsageType = "licensed"
},
Product = pay.ProductToken
};
var PriceService = new PriceService();
Stripe.Price PriceResponse = PriceService.Create(Priceoptions);
var options = new SubscriptionUpdateOptions
{
ProrationBehavior = "none",
};
var service = new SubscriptionService();
Stripe.Subscription subscription= service.Update(pay.SubscriptionToken, options);
You seem to haven't used PriceResponse in your Subscription Update call
which property can i use to reset PriceResponse in Subscription Update call?
This Doc should explain better than me ๐ https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#changing
Sure!
currently am getting card number details in my website.I want to use stripe page to get customer card details. Which url i need to redirect to get card details?