#dineshkumar_docs
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1308391448433004554
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Customers will receive an invoice on the first day of each month, listing all their purchased products, and the payment for the remaining days of the current (or first) month should be collected immediately as a one-time payment.
is this doable on stripe, please help me for this scenario....
hi! sure, passing
billing_cycle_anchor: <start of the next month>
proration_behavior: 'always_invoice',
when creating a Subscription should just do that.
please doc link?
Customers will receive an single invoice on the first day of each month, listing all their purchased products?
yes
I am asking different day purchased same products, but will generate single invoice/subscription?
I don't understand the question. Can you show me the code and API calls you're making?
no implement done yet, doing discovery on stripe doc...
sounds good, then it's hard to answer really. A lot of things are possible, you can have a customer with multiple subscriptions, to different products, and so on.
previously we done separate subscription/invoice for each purchase for customer, but now we need to a single invoice/subscription
previous code i will share..
// Create the subscription
// Note: we're expanding the Subscription's latest invoice and that invoice's payment_intent so we can pass it to the front end to confirm the payment
var subscriptionOptions = new SubscriptionCreateOptions
{
Customer = customer.Id,
Items = subscriptionItems,
/* Automatically save the payment method to the subscription when the first payment is successful. */
PaymentSettings = customer.InvoiceSettings.DefaultPaymentMethodId == null ? new SubscriptionPaymentSettingsOptions { SaveDefaultPaymentMethod = "on_subscription" } : null,
PaymentBehavior = paymentBehavior,
PromotionCode = promocodeId
};
subscriptionOptions.AddExpand("latest_invoice.payment_intent");
subscriptionOptions.AddExpand("pending_setup_intent");
var subscriptionService = new SubscriptionService();
var subscription = await subscriptionService.CreateAsync(subscriptionOptions);
looks good
- we will need a single invoice/subscription for all purchase for customer.
- current month amount immediately collect when made purchase.
- the invoice will generate first day of each month.
Could you please help me above 3 point we will need to implement?
I can try but what specifically are you stuck with?
if you create one subscription, that recurs every month and generates one invoice
a subscription can have multiple products https://docs.stripe.com/billing/subscriptions/multiple-products
at any point during a period you can add an invoice item to be charged in the next recurring invoice https://docs.stripe.com/billing/invoices/subscription#adding-upcoming-invoice-items
lots of things are possible really. I'd suggest building some proofs-of-concept and experimenting in test mode, and let us know when you have specific problems.
ok i will check above doc and let you know any problem..
just asking confirmation,
current month amount immediately collects?
I don't know what you mean by that I'm sorry. Could you try and explain in more detail and depth?
examples would be great too
current month amount immediately collect? at any point during a period you can add an invoice item to be charged in the next recurring invoice .
can you read the docs page? I think it answers it really.
adding invoice items don't get charged immediately. If you do want to charge immediately, there are ways to do that.
My scenario is
1.Customer purchase a monthly plan Item A today, this month remaining amount will receive immediately and next recurring invoice will generate first day of each month.
hi! I'm taking over this thread.
- same item A can customer purchase different day this also include same invoice for next recurring invoice will generate first day of each month but this month remaining amount will receive immediately
- Customer also purchase another Item B, this also include same invoice with above 2 scenarios.
what's your question?
My question is
- we will need a single invoice/subscription for all purchased multiple items for customer.
- current month amount immediately collect when made purchase for items.
- the next recurring invoice will generate first day of each month.
Items Qty UnitPrice Total
Item A 5 $5 $25
Item B 7 $7 $49
Item C 6 $9 $54
if you create a monthly subscription, Stripe will create an Invoice once per month. if in the milddle of the month you want to add additional items to the Subscription, you can. and then it's up to you to charge the user immediately or in the next invoice.
but each purchase one item one quantity but we need a single invoice to geneare each month of first day.
yes that's possible by updating the existing Subscription.
I recommend testing this in test mode
ok , please give me docs, please this scenarios
you can use Test Clocks for this: https://docs.stripe.com/billing/testing/test-clocks
we already shared the link with you: https://docs.stripe.com/billing/invoices/subscription#adding-upcoming-invoice-items
this cover below 3 points?
- we will need a single invoice/subscription for all purchased multiple items for customer.
- current month amount immediately collect when made purchase for items.
- the next recurring invoice will generate first day of each month.
if yes, i will implement and test on test mode..
we will need a single invoice/subscription for all purchased multiple items for customer.
yes each new invoice will contain all line items
current month amount immediately collect when made purchase for items.
yes when you create a Subscription the customer will need to pay immediately
the next recurring invoice will generate first day of each month.
this doc explains how to set the billing anchor: https://docs.stripe.com/billing/subscriptions/billing-cycle
I recommend testing this, step-by-step, in test mode
and if you have specific questions, I'm happy to help
ok i will check above you suggested.