NetSuite Invoice Custom Field to store Billing Schedule information from Sales Order - netsuite

We have turned on Billing Schedule feature and it has multiple Invoice created on certain day.
Is there any method to get Billing Schedule information from the Invoice?
I can see the "Created from" field shows the Sales Order but I want to know it's specific Billing Schedule so that I can see Billing Period
In Invoice advanced pdf template, I have to show Billing Start Date but I can't find it from the Invoice. I don't think it will be same with Created Date.
Any help would be appreciated

Related

Programatic shipping and taxes with Stripe Subscription

I would like to use Stripe for a physical subscription site.
Small number of SKUs
Some customers pick up instead of ship
Customers whose addresses are in one state are charged state and local sales tax
I'd like to use Stripe Subscriptions to do this but shipping costs and state/local taxes will be slightly different for every single customer and but unlike in the Stripe Orders API, it does not look like Subscriptions allows for me to dynamically calculate shipping and taxes. Is my reading of this correct, or is there a way for me to programatically edit recurring shipping and taxes on a per-subscription basis?
Thank you!
Answer via #mattwc in #stripe freenode: An invoice is created by the subscription each period 1 hour before it is charged. You can subscribe to this event via webhook and edit the invoice to add shipping and tax information.

Stripe Start Date

How do you set the start date for a subscription? Many of our customers began using our service a few days before we could collect their payment information so we'd like to charge them for these additional days.
This is not something that the Subscriptions API supports today. You would need to charge your customer the full amount and then put them on a trial period until their next billing date.
The flow would look like this:
Create a Customer with the card token
Create an invoice item for the plan amount
Create a subscription and set them on a trial period until their next billing date using trial_end
The last step will create an invoice for the trial, automatically pull the pending invoice item into the invoice and charge the customer for that amount. Then, they won't be charged until the date you set in trial_end and each month moving forward on that date.

Stripe monthly subscription with annual payment?

What is the best way to subscribe my users to a plan that renews monthly yet bills yearly using stripe subscriptions, as i contacted Stripe's support and they said a plan with an interval of month and interval_count of 12 will not generate any events (ex: customer.subscription.updated event) until the end of the 12 months interval while i need these events to be generated on monthly basis.
The best solution here would be to subscribe the customer to a $0 monthly plan. This ensures that, each month, a new billing cycle starts and a new invoice is created. The invoice will be for $0 but send an invoice.created event to your webhook endpoint.
There, you can decide whether you need to bill the customer anything or not. If you don't, you simply ignore the event and the customer won't be charged anything. If you do, you will simply add an invoice item for the correct amount to this invoice. This is covered in the Invoices section of Stripe's documentation.
For the first invoice, you would add the invoice item first which means three steps:
Create the customer
Create the invoice item for the correct price
Create the subscription to the $0 monthly plan
The last step will automatically pull the invoice item in the invoice and charge them that amount as expected.
If you have follow up questions, I'd recommend talking to Stripe's support here.

Stripe Implementation for subscriptions

Trying to engineer a payment system with stripe that will bill the customer on a weekly basis. The customer can have as many documents but each one is charged weekly. So if the customer has 2 documents he would have 2 charges every week until he canceled both or one of them. I would like to be able to have a detailed email invoice too.
Would the best way to do this would just keep updating the subscription quantity every time one is added or deleted. Or is there a better way to do this.
AKA: I am new to online payments
You can create the plan on Stripe with a validity of 7 days and subscribed the customer to that plan on the recurring basis. So the customer will be charged automatically every week.
For the quantity, you can change the quantity of subscription on stripe or you can subscribe a customer to different weekly plans(If you have different documents rate)
For sending an email just enable invoice email from admin setting and each time customer will pay an email will be sent.

Adding shipping to first subscription invoice using stripe

I am integrating stripe to enable the user to subscribe to a physical product shipping to the US and Canada.
I want to use the invoice.created webhook to modify the invoice and add a shipping charge depending on the delivery address.
The problem according to stripe docs is that the first invoice is charged immediately, implying that I cannot modify it prior to the first charge as I could with the subsequent.
If this is so, then the only way around this I believe is to add plans for us and canada for each of the subscription intervals e.g product-weekly-us, product-monthly-us, product-weekly-ca, product-monthly-ca instead of just product-monthly, product-weekly
The shipping would then be static (no line item) and part of the total.
Edit
So looking into invoices from koopajah's answer, here is what I can work out (please confirm):
Create the invoice items for your customer (pending invoice items) - does this exclude the line item for the subscription?
Create the subscription for the customer (which adds those pending invoice items to the new invoice for the subscription) - this will fire invoice.created webhook, which you would have to inspect and ignore - would you have to track the invoice numbers? **edit: oh wait! It would be closed, so you can just check that :D **
All subsequent invoices are modified with the invoice.created webhook for open invoices
If you want to keep using Invoice Items you just have to create one for the first cycle before creating your user subscription. Then once the subscription is created the first invoice will be created and automatically pick up the Invoice Item for your current customer.
You can then create the next Invoice Items in the webhook as you planned to do.
EDIT:
The steps would be something like that:
Create a Customer with the Stripe token
Create an Invoice Item for this customer for the shipping amount (not the subscription one)
Create the subscription for this customer which will automatically add the Invoice Item created at step 2 to the total charge
6.... In the webhook "invoice.created" check whether the invoice is closed and if not repeat step 2 also adding the current invoice identifier to the invoice parameter

Resources