@hpar Is there a way to charge customer right at the point when invoice is created? I checked the dashboard and it seems it should wait for an hour to charge customer. There is charge now button in the dashboard but I am wondering if there is any configuration I can charge them right away on the BE.
tony_: hm, I'm not sure I understand the question. Stripe automatically calculates the proration when the billing period changes but does not charge. I think you'd want to use the upcoming invoice endpoint and use the total, which includes discounts: https://stripe.com/docs/api#upcoming_invoice_lines
Anwar
Hey there, I was trying to find an advanced query to calculate our MRR from sigma platform, anyone has a template for this?
tony_
@hpar correct
But, I want to charge the customer immediately, and I want to display the amount to the customer
getting the total in this case would give me next_month_price + this_month_proration
@hpar, also from the docs: Stripe immediately attempts payment for these subscription changes: From a subscription that doesn’t require payment (e.g., due to a trial or free plan) to a paid subscription When the billing period changes
ToBeCloud has quit
Sorry about the formatting, basically "When the billing period changes" is one of the changes for which Stripe immediately attempts payment according to the docs
hpar
Anwar: I only know of the example that comes with Sigma, maybe that'd be a good starting point for building something more sophisticated?
Anwar
I already build something more sophisticated but it seems that it has something wrong, so I was asking if someone already build another example :( but thank you for your help
orbyt_ joined the channel
bimawa joined the channel
hpar
tony_: your approach sounds correct, sum up the line items with proration=true, then calculate the discount on that
j12t joined the channel
Anwar has quit
j12t_ joined the channel
ftknox_ has quit
j12t has quit
ioxtrem has quit
ioxtrem_ joined the channel
ftknox_ joined the channel
ioxtrem_ has quit
ioxtrem joined the channel
ftknox_ has quit
ftknox_ joined the channel
ioxtrem has quit
Kevin_the_Dev joined the channel
j12t_ is now known as j12t
bimawa joined the channel
Kevin_the_Dev has quit
stripesnoob292 joined the channel
ftknox_ has quit
ftknox_ joined the channel
ftknox_ has quit
tony_ has quit
arnotixe joined the channel
ftknox_ joined the channel
stripesnoob292 has quit
jseagull1 joined the channel
ftknox_ has quit
MrGix joined the channel
bimawa joined the channel
MrGix
i'm trying to send the tax_percent parameter to a invoice create (but its not accepted) how should i do this?
hey guys. your docs say "The Dashboard uses the time zone specified in your account settings.", but a coworker reached out to yalls support and someone told them that the numbers there UTC. I'm specifically looking at new customers/trying to debug a discrepancy between google analytics new customers and stripe new customers. :S
{ "customer": "cus_D7dxXt1fgTzypW", "amount": "500", "currency": "eur", "description": "Additional Users", "tax_percent": "21" } (the post message from the log in my account)
when it creates the invoice it doesn't pass options or allow you to pass any options
so you'd have to make the StripeInvoice::create() call yourself
MrGix
hmm but how can the options than come to the logs in my stripe enverionment?
hpar
seems like you could do something like $company->tab('Additional users', (100*$updateQuantity), []); and then call "create invoice" directly with the Stripe library
and invoice() calls the Stripe API to create the invoice
something like \Stripe\Invoice::create(['customer' => 'cus_xxx', 'tax_percent' => 21])
is what you'd do after calling tab()
really this is a cashier issue though, not a stripe library issue
shelby_ has quit
MrGix
oke no problem got a clue what's going on, and will create a pull request for cashier than :P
jseagull1 has quit
Xionkana joined the channel
pokEarl has quit
@hpar but is there an explanation why it says in the logs on my developers tool whats that the parameter is unknown (if we conclude the parameter can not be send to the server)
hpar
yes, cashier is sending the parameter to the "create invoice item" endpoint, which doesn't support that
@hpar and charge doesn't accept tax percentage too
hpar
correct
knownasilya_ joined the channel
MrGix
Ahh oke :(
measwel has quit
MrGix has quit
bryanthompson joined the channel
bimawa has quit
greengriminal has quit
bryanthompson has quit
arnotixe has quit
bryanthompson joined the channel
cagomez has quit
arnotixe joined the channel
arnotixe has quit
greengriminal joined the channel
SerialNumberGuy
Hello, how can we style the card element? in the doc at this location: https://stripe.com/docs/stripe-js/reference#str... we can set the font styling, but how can we stylise the credit card input? like add a border or other?
yep, there are a number of properties available to customize, though for a border you want to style the container on your page where you mount the card element
It's my first time asking a question on here. Do I just go ahead and post my quesiton? :)
korben
Yep.
Wait.
Yes.
Wait.
Yeah, go ahead.
SerialNumberGuy
hpar: korben: thank you.
Sam__
I've been going through the billing documentation for the entire day now. Is there any way I could set up a coupon so that it acts like the free tier of, say, AWS? Basically if I offer a user $100 I want the coupon to be carried over month after month until the entire $100 is used up.
So if the customer uses $40 this month, $60 should be available next month...
Pretty much like a bucket, until it's empty...
korben
Sam__: You'd have to setup a coupon w/ a duration in months that maps to your total. eg. $10 for 10-months to get your $100 discount.
Xionkana joined the channel
Sam__
So if I set $10 for 10 months and the user accrues $40 in charges for the first month, the user would still be charged $30 for that month?
rony joined the channel
rony
someone hacked our account. We see we have 2-phase authentication with a phone number we don't recognize
@korben In this scenario I'd have to attach the discount to every customer rather than each subscription? since there are many subscriptions per customer and we'd want the discount to be across the board...