#stripe

/

      • cdbattags has quit
      • cdbattags joined the channel
      • cdbattags has quit
      • macheleon
        How do Orders and tax settings there relate to Subscriptions? We set tax_percent for subs and it's added on top of the amounts, but there are separate tax settings in Orders so I'm just trying to understand what things do.
      • tr12
        macheleon: are you using orders, subscriptions, or both?
      • macheleon
        Only subs at this stage, but I'm updating them to include tax and was wondering if the Orders setting was related in any way. I suspect not, as I've just seen that Orders are related to products as opposed to subs
      • tr12
        yeah, that's correct
      • macheleon
        Great thanks. Asked too soon sorry :)
      • Is there a way for tax to be included in the sub amount, or does it have to be added on top?
      • tr12
        what do you mean?
      • like, baking the tax amount into the amount specified on the plan?
      • macheleon
        Yep. Prices here are usually advertising as tax inclusive
      • advertised*
      • mattwc
        Just set the plan price to include tax
      • And then you'd be responsible for calculating the amount of tax to send to the government
      • tr12
        to back up a bit, I assume what you're getting at is what the receipt looks like?
      • macheleon
        Yes tr12 it's primarily that as well as prices displayed being tax inclusive
      • tr12
        though, the prices you display on your website are sort of disconnected from the way the tax is calculated internally
      • you can put whatever price you want (and whatever other pixels you want) on your website
      • the only user-facing thing that's impacted by splitting the tax out from the rest of the subscription is how the receipt stripe sends is laid out
      • macheleon
        Hm .. I'm using OpenCart, so perhaps I need to revisit that and see what needs to be done. The OC price just has to match the Stripe price for the sub to work, so if I can achieve that I'm golden
      • tr12
        (and you can sidestep that by sending your own emails)
      • macheleon
        (Considered that as a backup option)
      • tr12
        to be explicit, the main drawback of baking the tax into the plan is that it requires having a ton of plans
      • depending on how many different tax regions you deal with
      • if it's only 1, then that's fine
      • it's more problematic if there are 10, and you have 6 plans
      • macheleon
        Ah. We already use region-specific plans though so not really an issue
      • tr12
        then you wind up with a really miserable 6x10 matrix
      • ah, makes sense
      • macheleon
        Lol
      • I can see the issue for those wanting plans to be multi-region
      • We have 800-1400 plans per region, all region-specific
      • tr12
        oof
      • that's a ton of plan
      • *plans
      • macheleon
        It is
      • API speed is a consideration as I work :)
      • The possibility of an upper limit of plans has crossed my mind, but I haven't looked into it yet
      • tr12
        there isn't one
      • macheleon
        Rather good then
      • Thanks for the help :)
      • tr12
        np!
      • zamro joined the channel
      • silo joined the channel
      • silo
        hey every1, currently integrating stripe into our ios app
      • using the standard integration guide
      • silo is now known as Guest74225
      • Guest74225
        but was wondering, is there a way to customise the STPaymentMethodsViewController
      • i want to change the navigation bar colors, they're a bit off
      • mattwc
        you should be able to subclass it
      • zamro has quit
      • DaKnOb has quit
      • DaKnOb joined the channel
      • bwa has quit
      • DaKnOb has quit
      • allsop joined the channel
      • allsop
        Hey guys -- anyone out there? Have a quick Web Hook question?
      • tr12
        allsop: sure, ask away
      • allsop
        Thanks tr12 -- my service will be using subscriptions. I've got the web hook setup and working correctly, but I'm confused as to when stripe sends the hooks does it send an array with multiple events or only a single event each post?
      • mattwc
        an event per post
      • allsop
        Alright, so no need to attempt to loop through anything then?
      • mattwc
        correct, you only get a single event object
      • allsop
        Awesome. that makes it easier then! thanks for the help very much appreciated!
      • Guest74225 has quit
      • 1 more question if you don't mind. I assume with the subscriptions; a user signs up today, and in 30 days the web hook will auto post again and send my webhook a response as to whether the charge succeeded or failed?
      • mattwc
        yes, you'd get either an invoice.payment_succeeded or invoice.payment_failed webhook event
      • tr12
        you'd receive webhooks for the signup ~immediately
      • the ones you get in 30 days are for the subscription renewing
      • (the charge is made at the start of the billing period, not the end)
      • allsop
        gotcha, so the initial webhook event type will be 'charge.succeeded' and the recurring event type would be 'invoice.payment_succeeded/failed'...
      • mattwc
        you'd get both a charge.succeeded and invoice.payment_succeeded
      • since the invoice gets paid by creating a charge you get both
      • allsop
        gotcha. interesting -- so really I could just look for the charge.succeeded/failed in my listener to flag the account in regards to active subscription/inactive subscription
      • mattwc
        I generally recommend listing for the invoice events
      • tr12
        or the customer.subscription.updated event
      • allsop
        alright -- that helps to know. thank you!
      • torgosPizza has quit
      • tr12
        (you'll get a customer.subscription.updated event lets you track the state of the subscription - most importantly, when the customer is paid up until, and whether the subscription is active/past_due/trialing/etc.)
      • (you'd also want to listen for customer.subscription.deleted if you do this, since that marks when a subscription is cancelled)
      • allsop
        awesome. alright, so customer.subscription.updated would be the ideal event to listen for when using subscriptions then!? thanks.
      • tr12
        imho, yes
      • mattwc
        if you wanted to send the customer an email though on each failed payment you may want to listen to the other ones though
      • since you'd get 3 payment_failed webhooks before a cancelation, but if you were listing to customer.subscription.* you'd just get past due and deleted / canceled
      • allsop
        right... okay, makes sense.
      • tr12
        right
      • it does depend on what you're trying to do
      • different events are good for hooking into different things, though for subscriptions in particular, the events are pretty closely related
      • specifically, the thing I'm driving at is: customer.subscription.* is good for keeping track of whether a subscription is active or not
      • eacameron joined the channel
      • torgosPizza joined the channel
      • allsop
        right, and that's really the primary objective here I'm trying to get at for right now. the API is actually really easy to use, but first time building a recurring service for me so just trying to better understand.
      • for the most part, using the the customer.subscription.updated, and storing the start/end dates... from the most basic view I could ultimately just look at if ( $Customer['current_period_end']>mktime() ) { // success }
      • no?
      • mattwc
        just check if the status is active
      • allsop
        ah! didn't see the status below. touche!
      • torgosPizza has quit
      • ivanish joined the channel
      • ivanish
        Hi
      • What does the error "Could not find payment information" mean?
      • mattwc
        ivanish: generally an issue with how you're sending the token
      • ivanish: are you sending just the token id or the full token object?
      • ivanish
        The full object.
      • mattwc
        you need to just send the token id
      • ivanish
        Excellent. Thanks.
      • torgosPizza joined the channel
      • allsop
        so when a customer first signs up, i'd want to look for the customer.subscription.created i'd imagine hey? would that be your choice to update the customer account initially to flag it as active subscription?
      • hope i'm not annoying you guys - appreciate the help.
      • mattwc
        when they first sign up you'd know instantly if it went through because creating the subscription would throw an error if it failed
      • dglambert has quit
      • allsop
        alright. thanks mattwc
      • ivanish has quit
      • snax_ joined the channel
      • torgosPizza has quit
      • saurabhjha joined the channel
      • cdbattags joined the channel
      • zamro joined the channel
      • zamro has quit
      • enoj has quit
      • roler joined the channel
      • roler has quit
      • stefek99_ has quit
      • eacameron joined the channel
      • allsop has quit
      • roler joined the channel
      • roler has quit
      • eacameron has quit
      • macheleon has quit
      • zamro joined the channel
      • DaKnOb joined the channel
      • DaKnOb has quit
      • saurabhj_ joined the channel
      • saurabhjha has quit
      • zamro has quit
      • saurabhjha joined the channel
      • jongleb__ has quit
      • jongleberry joined the channel
      • cdbattags has quit
      • saurabhj_ has quit
      • cdbattags joined the channel
      • cdbattags has quit
      • saurabhj_ joined the channel
      • saurabhj_ has quit
      • saurabhjha has quit
      • nilsmunch joined the channel
      • Srikanth joined the channel
      • Srikanth is now known as Guest23468
      • Guest23468
        Hello ! I am developing a Stripe Webhook for handling Charge.Succeeded and Charge.Failed events. Need to get the transaction amount from the event object in JAVA. Can someone please point me to the right function. I have the event object constructed
      • saurabhjha joined the channel
      • mattwc
        Guest23468: this is for subscriptions?