#stripe

/

      • devguy
        because I do pass the token.id as tkn in my code so I dont see why there would be that issue for default_source
      • timebox
        devguy: you want `source`, not `default_source` there. You can also approach it like this (though I'd double-check the logic): https://gist.github.com/anonymous/f448c4b4a6ca0...
      • david_i__ joined the channel
      • david_in_az has quit
      • Doginal joined the channel
      • david_i__ has quit
      • david_in_az joined the channel
      • devguy
        i shall test now
      • david_in_az has quit
      • flamegecko has quit
      • appreciate it alot @timebox
      • worked well
      • stripeQuestions has quit
      • timebox
        devguy: No problemo. Awesome. :)
      • bkmorse joined the channel
      • devguy
        also another question for you, if we modify the subscription plan or customer source payment will that automatically recharge the customer upon updating either?
      • cperciva_ has quit
      • cperciva_ joined the channel
      • FrostCandy has quit
      • dautermann has quit
      • Tim__
        @timebox bump
      • kanja has quit
      • timebox
        Sorry, fell off my chair. Reading now.
      • Tim__: What'd you bump into? Do you need first aid? I'm ... not trained in first aid.
      • Tim__
        i need someone trained in the art of stripe taxes
      • timebox has quit
      • [15:41] <Tim__> hmm, how would you suggest showing the customer how much tax they've paid? [15:42] <devguy> while doing the customer = stripe.customers.create({}).then(function (customer) {}); the then function is not firing. Is this due to the fact that I have the customer object initialized as a blank variable outside before firing the stripe.customers.create? [15:42] <Tim__> idk about you, but it seems silly that you can't add tax o
      • woops
      • pasted the wrong thing
      • timebox joined the channel
      • but i just made you quit so i guess it doenst matter
      • timebox
        Ya, but I was just being funny. :P
      • Well, trying. I'm still not sure if I am or not. ¯\_(ツ)_/¯
      • Tim__: So what's up?
      • Tim__
        idk about you, but it seems silly that you can't add tax on a charge [15:42] <Tim__> does that mean i'm using charges wrong?
      • Like, in my mind, there should be a way to add tax on a charge
      • timebox
        Tim__: You can. You just do `whatYouCharge + taxes = amount`.
      • Tim__
        You can in Invoices
      • timebox
        Tim__: Right, but Charges don't track taxes like that.
      • Tim__
        and in Subscriptions
      • hrm
      • but when the user gets the receipt
      • it'll have tax just randomly included in the amount
      • rather than a normal subtotal + tax = total
      • timebox
        Tim__: And really, on the Invoice, I'm pretty sure it's just an extra InvoiceItem.
      • Tim__
        In subscriptions it is not, it is a separate item
      • MrBech has quit
      • so a charge is instant when I call charges.New() right?
      • timebox
        Tim__: It's synchronous, yes.
      • Tim__: What language is that?
      • Tim__
        Go
      • the one with the cute gopher but strongly typed so it's kinda a wash
      • timebox
        Tim__: That's an excellent assessment.
      • devguy
        hey timebox how would i go about using that next function or pulling out that data for customer id and subscription id for use in inserting those values into the database
      • ill gift
      • gist
      • I want to be able to pull out the values for customer id and subscription id without having to actually retrieve them is that possible?
      • timebox
        devguy: Well, what's next after you do this stuff? What's your next step? Can you share the whole script that this is sitting in for context?
      • devguy: `next(error, value)` is sort of the de facto Javascript callback pattern; I assumed you're doing this somewhere that has provided a next function (or where you want to so something ... next, asynchronously, once the Customer and Subscription have been created)
      • Tim__
        so if I absolutely *needed* to get tax listed on the receipt separately, the only way around it I can think of right now is to create a subscription dynamically for the one-time purchase, subscribe the customer to it with tax, cancel the subscription
      • or, create my own custom receipt
      • timebox
        Tim__: No, you could create an Invoice and Pay it. But I'm not 100% sure it gets listed like that on the receipt in that case?
      • chasepub has quit
      • Tim__
        It does, I am 100% sure of that
      • ok cool
      • so just go directly to invoice
      • and force payment immediately
      • jane_booty_doe has quit
      • devguy
        i wanted to be able to pull out the customer and subscription ids sync so i can insert those values into my own database
      • chasepub joined the channel
      • timebox
        Tim__: Oh, it totally does. So create the 'charge' as an InvoiceItem (https://stripe.com/docs/api#create_invoiceitem) and then create the Invoice with the `tax_percent` (https://stripe.com/docs/api#create_invoice) and then pay it. (https://stripe.com/docs/api#pay_invoice)
      • john___ joined the channel
      • Tim__
        Thanks @timebox!
      • you are a true american hero
      • timebox
        devguy: Ok, so you'd replace the `next` with the database insert function call - which presumably will also have a callback, and so in that you'd put whatever's next after that.
      • devguy
        alright got to tab a million lines of code now
      • but this is perfect
      • john___
        I am trying to expand transaction history api to get source transaction field. I added expandList.add("data.source"); expandList.add("data.source.source_transfer");. Can you please tell me how can I get source transaction now? where to loop it?
      • devguy
        test time
      • timebox
        john___: Sorry, what are you trying to get to exactly?
      • devguy
        YAY
      • okay finally my final final question is if we modify subscription plan from one plan to another will that recharge the card or will only charge on next invoice charge (monthly), also if we modify the source of the customer will that recharge upon updating or will it modify on the next charge?
      • timebox
        devguy: By default, next invoice: https://stripe.com/docs/subscriptions/upgrading...
      • john___: Expanding `data.source` should get you what you're looking for, unless I'm misunderstanding what you're looking for. :)
      • devguy
        alright thats exactly what i need thanks.
      • i appreciate everything your dev team does. Thanks a bunch
      • im out for today. before my head explodes
      • timebox
        devguy: You're very welcome! Have a good one! :)
      • devguy has quit
      • tr0y joined the channel
      • tr0y
        Can someone help me figure out why my subscriptions are being created with the "send invoice" option for billing? Basically I want a 15 day trial then the subscription is supposed to bill the credit card attached to the account.
      • timebox
        tr0y: Can you write into Support with this one? I have to hit the road, and ... that doesn't seem right: https://support.stripe.com/email/login
      • tr0y
        Yeah, thanks.
      • Doginal has quit
      • bkmorse has quit
      • kanja joined the channel
      • confused joined the channel
      • confused
        Can someone help me interpret this? I just followed this guide - https://stripe.com/docs/connect/quickstart#expr...
      • So I made a charge of $10 ... and now my account looks like this: https://i.imgur.com/iK5aSnV.png
      • Brett__ has quit
      • ok so theres a 59 cents fee, but why does it say 1 payment for 9.41 and then 1 transfer of 10.00?
      • What is the transfer? I don't get it
      • *-10.00
      • john___ has quit
      • eric_lagergren joined the channel
      • Doginal joined the channel
      • timebox has quit
      • timebox joined the channel
      • reineluxe joined the channel
      • timebox has quit
      • reineluxe
        Hi all! I am trying to connect Stripe to my Squarespace account and do recurring payments, but I don't want to pay for a 3rd party. I understand that I can go to the Subscriptions Quickstart page and figure out the API stuff, but I don't know where to inject any of that code.
      • chasepub has quit
      • Tim__ has quit
      • reineluxe has quit
      • glen_
        @confused: isn't that because the platform absorbs the fee? so essentially, your second transaction is sending more money than the first brought in?
      • tr0y has quit
      • timebox joined the channel
      • confused
        uh
      • glen_
        i am not a Stripe dev
      • but I am using Connect for what I work on too
      • confused
        lol k
      • glen_
        how did you create the charge
      • confused
        I'm wondering what the negative "transfer" is
      • glen_
        was there a destination account for the charge?
      • confused
        stripe.charges.create({
      • amount: 1000,
      • currency: "usd",
      • source: "tok_visa",
      • destination: {
      • account: "acct_1BzwxdFbzA3JFTOG",
      • },
      • }).then(function (charge) {
      • // asynchronously called
      • console.log(charge);
      • });
      • yeah
      • glen_
        so with a destination charge, Stripe sends the full amount to the platform, and then creates a transfer from the platform to the connected account
      • so if you always send the full amount to the Connected Accounts, you will always be losing money
      • because the Stripe fees will not be accounted for. They will come out of your platform
      • timebox has quit
      • glen_ has quit
      • chrisrosillo joined the channel
      • alex____ joined the channel
      • alex____ has quit
      • chrisrosillo has quit
      • confused has quit
      • kanja has quit
      • timebox joined the channel