#stripe

/

      • ftknox has quit
      • dev2lead_ joined the channel
      • MrB_ joined the channel
      • MrB_
        Has anyone got 2 seconds to answer 2 really simple stripe checkout questions?
      • hpar
        MrB_: always!
      • ajs_ has quit
      • MrB_
        1) Using just JS (stripe checkout as per the demo) is there a success/fail callback I can hook into?
      • and
      • 2) I've created a product, yet the walkthroughs all show creating a product on the fly - how do I link the stripe checkout js call to my created product
      • dev2lead has quit
      • Thanks!
      • hpar
        Guest7694: this firebase-talk discussion might be helpful: https://groups.google.com/forum/#!topic/firebas...
      • dev2lead joined the channel
      • MrB_: so for 1. you want to see the "custom integration" here https://stripe.com/docs/checkout#integration-cu...
      • there's a JS callback that happens when checkout succeeds in collecting a card
      • and an opened()/closed() callback you can hook into as well
      • MrB_
        is the callback token: function(token) { // You can access the token ID with `token.id`. // Get the token ID to your server-side code for use. } ?
      • stuwest has quit
      • hpar
        yep, that's it!
      • for #2 I'm not sure what you mean by "created the product"
      • it's important to note that checkout *does not* charge the card, it only collects the payment info. You have to write server-side code to take the card token & create a charge
      • MrB_
        I've logged in, and on the dashboard section I created a product (with an id)
      • dev2lead_ has quit
      • Ahhh.
      • I've been misunderstanding it
      • I thought it was pure js and everything was done on stripe's servers
      • hpar
        unfortunately no, but there are some integrations that can help you avoid writing server side code https://stripe.com/docs/integrations#ecommerce
      • https://www.commencepayments.com/ for example lets you create a button in HTML/JS and will create the charges for you
      • MrB_
        I can write PHP alright, just struggling with the terminology (been a long day coding, now it's going to be a long night)
      • hpar
        this might be helpful then! https://stripe.com/docs/checkout/php
      • MrB_
        So how do I link the charge with my product, via the PHP part, or when generating the token?
      • (and thanks!)
      • JohnOHFS joined the channel
      • JohnOHFS
        Hello
      • hpar
        products are specifically for Relay, which is mainly aimed at selling through channels like Twitter
      • JohnOHFS
        Question for #stripe folks about tax_percent
      • hpar
        MrB_: you don't *need* to use products to create charges
      • JohnOHFS
        Does tax_percent get recorded in Test Mode or just Live Mode
      • MrB_
        No, but I want each transaction to lower the qty of the SKU
      • Guest7694
        thanks hpar
      • hpar
        MrB_: ah ok, then you'll want to use the "create order" approach https://stripe.com/docs/api/php#create_order
      • Guest7694
        will look at it right now
      • scottberry has quit
      • markin
        Guest7694: it gets recorded for both you just need to specify it
      • hpar
        JohnOHFS: tax_percent should behave the same in Live & Test Mode, what's the problem you're seeing?
      • dev2lead_ joined the channel
      • MrB_
        thanks @hpar - that's probably enough for me to get on with - appreciate the help
      • JohnOHFS
        It's getting passed to Stripe, but it's not showing up in the dashboard
      • Here's my last subscription create call:
      • wait. Let me try that again.
      • dev2lead has quit
      • dev2lead1 joined the channel
      • ok. nm. I need to do some more troubleshooting
      • dev2lead_ has quit
      • jops has quit
      • JohnOHFS has quit
      • Jmar31 has quit
      • davisonio has quit
      • Gsham joined the channel
      • dev2lead joined the channel
      • pedro1
        quit
      • pedro1 has quit
      • qar joined the channel
      • Guest7694 has quit
      • Ryuske
        What would the proper way to delay the billing of a subscription for the first month? Like, how if you sign up for netflix, you're billed in 30 days or whatever from when you signed up
      • clay_ joined the channel
      • clay_
        hey all
      • does anyone know if you can charge a dynamic price per item with stripe orders API?
      • when creating an order I am trying to set 'amount' along with the SKU but the price set on stripe always gets charged instead of my dynamic price
      • would like to do dynamic price per unit based on quantity
      • or A/B testing purposes
      • markin
        clay_: don't use the orders api just use the charge api
      • Ryuske: set up a trial?
      • dev2lead1 has quit
      • kftzg has quit
      • clay_
        orders API is better for physical products though, right?
      • we have a physical product we'll be shipping, etc
      • Ryuske
        markin seems like weird terminology, since it isn't really a trial?
      • markin
        Ryuske: with netflix it is though, you're billed for the upcoming month with netflix not the past month
      • clay_: the orders API is really just for the Relay product / service
      • qar has quit
      • clay_
        ah okay -- so i should really be doing all the fulfillment dashboard stuff on my own side?
      • in terms of collecting and saving shipping addresses, marking things as fulfilled, etc
      • markin
        clay_: thats what I tend to recommend
      • dev2lead has quit
      • Ryuske
        Hmm, I guess I'll just do it with the trial then
      • clay_
        im already collecting and saving addresses etc -- would just be a matter of finding a good dashboard to use to keep track of whats shipped etc etc
      • Ryuske
        Just a weird word to me I guess, but it's what it is I guess
      • clay_
        alright cool thanks man - i'll likely switch back to charges
      • markin
        Ryuske: well with Netflix it is actually a trial, you get like 14 or 30 days free
      • cvitullo joined the channel
      • Ryuske: netflix does pre-paid billing not post paid billing
      • clay_
        my first physical product (done digital all my life) -- little worried about screwing up in terms of not keeping track of wahts shipped well enought
      • markin
        stripe subscriptions are all pre-paid so if you want to simulate post-paid then setting a trial is a way to test that
      • clay_
        worried about setting up the process correctly etc
      • anyway thanks again
      • markin
        clay_: spreadsheets can be very helpful :)
      • dev2lead joined the channel
      • clay_
        haha yah i feel like i'm gonna be spreadsheeting it up soon enough
      • thanks again
      • Ryuske
        markin well I didn't get 30 days free last time I signed up for (I probably used it before and forgot), but it also didn't charge me for 30 days
      • markin
        Ryuske: that seems wrong, I can guarantee they do pre-paid billing
      • clay_
        can you send ship address to stripe w/ charge?
      • i know you can turn on that option w/ stripe checkout
      • Ryuske
        markin Hmm, no idea. Guess it isn't really important haha
      • I'll just set a trial for 30 days out.
      • markin
        clay_: you can, stripe will store it but not really do anythign with it
      • clay_
        cool. thanks
      • eh334 has quit
      • davisonio joined the channel
      • eh334 joined the channel
      • joelataylor_ has quit
      • Amit___
        I am creating a token using the following code stripe_platform.tokens.create({ customer: customer, card: saved_cc }, { stripe_account: data.stripeAuthInfo.stripe_user_id },
      • But now I want to create a token for the platform, so I want the platform to get paid, not the connected stripe user. How would I do that?
      • Ryuske
        Why can't you change a plans trail_period_days?
      • Amit___
        I tried removing the stripe_account parameter, but that did not work
      • markin
        Amit___: you wouldn't need a token you'd just charge the customer not a token
      • Ryuske: mostly because theres some weird edgecases about how that would effect existing subscriptions
      • Amit___
        so what would my "source" be?
      • Ryuske
        markin hmm, I see
      • markin
        Amit___: you don't set source you just specify customer
      • ftknox joined the channel
      • Amit___
        understood
      • appreciate it
      • Tim joined the channel
      • Tim
        how do u make a stripe connect callback url dynamic?
      • it wants me to set a sepcific url
      • markin
        Tim: you'd have to specify a specific url
      • Tim
        for example.. I want the callback to route back to /users/{:id}/somthing
      • hmmm
      • dev2lead_ joined the channel
      • markin
        Tim: you'd have it route to a single url and then that single url could send it else where
      • Tim
        ok, how will I know which id it will be?
      • object id
      • markin
        well your server would already have a session set up with the logged in user no?
      • Ryuske
        Well trial works. Thanks!
      • Ryuske has left the channel
      • ftknox has quit
      • dev2lead has quit
      • Tim
        yeah.. just wanted to be sure though
      • just in case, better to do a find again on the object
      • markin
        the server session method is the best since thats much less vulnerable to attack
      • you could pass it in the "state" query param but the main issue with that is that it is user modifiable
      • tjbiddle joined the channel
      • Tim
        yeah good point
      • what do u mean "server session"? how will I get the object again?
      • markin
        when you log into your website the server knows your logged in so when you refresh the page you don't need to re-login right?
      • nullrefexc joined the channel