#dineshkumar_docs

1 messages ¡ Page 1 of 1 (latest)

marble craneBOT
#

👋 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.

stuck thicket
#

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....

uneven flint
#

hi! sure, passing

billing_cycle_anchor: <start of the next month>
proration_behavior: 'always_invoice',

when creating a Subscription should just do that.

stuck thicket
#

please doc link?

uneven flint
#

the link you posted yourself is the best docs link

stuck thicket
#

Customers will receive an single invoice on the first day of each month, listing all their purchased products?

uneven flint
#

yes

stuck thicket
#

I am asking different day purchased same products, but will generate single invoice/subscription?

uneven flint
#

I don't understand the question. Can you show me the code and API calls you're making?

stuck thicket
#

no implement done yet, doing discovery on stripe doc...

uneven flint
#

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.

stuck thicket
#

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);

uneven flint
#

looks good

stuck thicket
#
  1. we will need a single invoice/subscription for all purchase for customer.
  2. current month amount immediately collect when made purchase.
  3. the invoice will generate first day of each month.
#

Could you please help me above 3 point we will need to implement?

uneven flint
#

I can try but what specifically are you stuck with?

#

if you create one subscription, that recurs every month and generates one invoice

#

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.

stuck thicket
#

ok i will check above doc and let you know any problem..

#

just asking confirmation,
current month amount immediately collects?

uneven flint
#

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

stuck thicket
#

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 .

uneven flint
#

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.

marble craneBOT
stuck thicket
#

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.

wanton lantern
#

hi! I'm taking over this thread.

stuck thicket
#
  1. 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
#
  1. Customer also purchase another Item B, this also include same invoice with above 2 scenarios.
wanton lantern
#

what's your question?

stuck thicket
#

My question is

  1. we will need a single invoice/subscription for all purchased multiple items for customer.
  2. current month amount immediately collect when made purchase for items.
  3. 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

wanton lantern
#

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.

stuck thicket
#

but each purchase one item one quantity but we need a single invoice to geneare each month of first day.

wanton lantern
#

yes that's possible by updating the existing Subscription.

#

I recommend testing this in test mode

stuck thicket
#

ok , please give me docs, please this scenarios

wanton lantern
stuck thicket
#

this cover below 3 points?

  1. we will need a single invoice/subscription for all purchased multiple items for customer.
  2. current month amount immediately collect when made purchase for items.
  3. the next recurring invoice will generate first day of each month.
#

if yes, i will implement and test on test mode..

wanton lantern
#

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

stuck thicket
#

ok i will check above you suggested.