#stripe

/

      • circ-user-futli has quit
      • huuugh18 has quit
      • devguy
        @webpacker_guy try adding the other stripe script which is <script src="https://js.stripe.com/v3/"><...;
      • before the checkout.js
      • webpacker_guy
        hmm I think they're separate though right? My previous implementation (no webpack) of checkout.js works without stripe.js
      • devguy
      • maybe your solution is there if you find the repository you are using and then at the top of github should be a tab called errors and maybe a solution is there
      • asldas has quit
      • stripeQuestions
        Hey guys, wondering if I could get some high level pointers here.
      • In my e-commerce app where I display 3rd party content, I have users who belong to an organization. Each organization has an admin who would come into my webapp's administration page and set up payment info. Normal users just pick stuff and click checkout.
      • When users checkout, I (obviously) need to charge the organization and send the money to the item supplier(s). I don't own the items, I'm just displaying third party content. So the payment isn't going to myself.
      • Hey guys, wondering if I could get some high level pointers here.
      • Hey guys, wondering if I could get some high level pointers here. In my e-commerce app where I display 3rd party content, I have users who belong to an organization. Each organization has an admin who would come into my webapp's administration page and set up payment info. Normal users just pick stuff and click checkout.
      • When users checkout, I (obviously) need to charge the organization and send the money to the item supplier(s). I don't own the items, I'm just displaying third party content. So the payment isn't going to myself. Do I need custom/managed accounts, and what apis should I be looking at?
      • also sorry for the spacing lol
      • Oh I pasted it twice, my bad
      • In my e-commerce app where I display 3rd party content, I have users who belong to an organization. Each organization has an admin who would come into my webapp's administration page and set up payment info. Normal users just pick stuff and click checkout.
      • When users checkout, I (obviously) need to charge the organization and send the money to the item supplier(s). I don't own the items, I'm just displaying third party content. So the payment isn't going to myself.
      • Hey guys, wondering if I could get some high level pointers here.
      • Hey guys, wondering if I could get some high level pointers here. In my e-commerce app where I display 3rd party content, I have users who belong to an organization. Each organization has an admin who would come into my webapp's administration page and set up payment info. Normal users just pick stuff and click checkout.
      • When users checkout, I (obviously) need to charge the organization and send the money to the item supplier(s). I don't own the items, I'm just displaying third party content. So the payment isn't going to myself. Do I need custom/managed accounts, and what apis should I be looking at?
      • what the
      • I dont know why it keeps pasting, really sorry about that
      • devguy
        what language is your app in?
      • stripeQuestions
        backend Java, but I was prototyping in nodejs
      • frontend is standard js webapp
      • I'm more wondering about a high level approach. Getting lost in the docs between account types, accounts vs connected accounts, etc
      • webpacker_guy
        Does Stripe handle sending payments?
      • stripeQuestions
        I need to use stripe connect somehow pretty sure
      • devguy
        if youre using node js you need to install stripe
      • stripeQuestions
        yeah I've already played around the API
      • devguy
        did you do require(stripe)?
      • stripeQuestions
        Yes, I can hit the api with node. It works fine.
      • devguy
        and in your package.json as well you have provided the version?
      • ok
      • glen_
        hey, I was wondering when doing a destination charge, what if the amount i send depends on the Stripe processing fee? How can I determine it before making the charge?
      • devguy
        stripe.charge @webpacker_guy
      • @webpacker_guy not sure if this is what you need but here https://stripe.com/docs/api#charge_object
      • webpacker_guy
        @devguy thanks, it was more of a general question for @stripeQuestions
      • devguy
        hope the devs come back soon. need some stuff answered too lol
      • stripeQuestions
        @devguy checkout the use cases for https://stripe.com/connect
      • Pretty sure its possible
      • webpacker_guy
        yeah that looks like what you would need
      • This guide seems pretty solid:
      • stripeQuestions
        Thanks I'll take a look, thats probably for a use case where I own the items though. i.e. not using connect
      • hmmm maybe that is what I want actually
      • webpacker_guy
        Right, although I think they mention handling an e-commerce platform that sells via third parties
      • devguy
        you can check shopify as well not sure if thats what youd need though
      • @glen you should save your question for when the devs come, not sure if anyone can answer that except the devs
      • webpacker_guy
        yeah seems like they're offline. I'm out too
      • Good luck with your Stripe questions y'all
      • glen_
        thanks
      • webpacker_guy has quit
      • nickdnk has quit
      • devguy
        hope some devs come back when they can
      • Tim__ joined the channel
      • murtaza has quit
      • dave_ has quit
      • Tim__
        Hello! How do I go about adding taxes on a charge? I didn't see anything about it in these docs: https://stripe.com/docs/charges and it's not listed under ChargeParams
      • devguy
      • david_in_az has quit
      • charge id is the invoice object invoice has the tax param
      • Tim__
        Hmm but it was my understanding charges were instant
      • so if I create a charge it will immediately be processed and i can't go in and edit an invoice_object
      • timebox joined the channel
      • devguy
        not sure but i think you can attach a charge to an invoice and modify the tax there
      • timebox
        Tim__: You need to just add it in yourself, and include it in the `amount`.
      • Tim__
        @timebox alrighty
      • thanks guys
      • devguy
        hey @timebox been waiting for a dev
      • timebox
        devguy: But ... aren't ... you a dev, guy?
      • devguy
        no
      • LOL
      • timebox
        (Unfortunately you've got me ¯\_(ツ)_/¯ )
      • devguy: What's up?
      • devguy
        having issue with missing required param: customer when my code is as follows
      • var customer; var customerid; var subscription; var subscriptionid; if (pk == 0) { customer = stripe.customers.create({ email: email }).then(function (customer) { customerid = customer.id; }); subscription = stripe.subscriptions.create({ customer: customerid, items: [{ plan: "plan_CJQkkePX5SaoWd" }] }).then(function (subscription) { subscriptionid
      • let me shorten that sorry
      • stripeQuestions
        beautiful
      • Tim__
        haha
      • gist.github.com buddy, or pastebin it, or hastebin it
      • suchit joined the channel
      • suchit
        hi
      • a couple of quick questions around api versionsing
      • Tim__
        hello
      • suchit
        versioning*
      • hi Tim__
      • is it possible to force a *new* stripe account to use an old version of the api?
      • the reason i say this, is that our production version uses an older API, and I wanna create a new one for QA, and I would like to stay on that api version
      • as it looks like there are some breaking changes
      • which i want to ship separately, as an API upgrade change later
      • stripeQuestions
        @timebox are you knowledgable on stripe connect?
      • timebox
        devguy: Can you put it in a gist/pastebin?
      • Ya, what TIm__ said. :)
      • Doginal joined the channel
      • suchit: You can set the API version per-script or per-api-call: https://stripe.com/docs/api#versioning Or you can write into Support ( https://support.stripe.com/email/login ) and ask them to downgrade your test account's API version.
      • suchit
        ok that sounds perfect, thanks a lot
      • larafale has quit
      • that makes my second question redundant for now,
      • so I will focus on that for now
      • thanks a lot again, @timebox. you'r a lifesaver!
      • timebox
        suchit: You're welcome! :)
      • stripeQuestions
        @timebox This might be too vague but I had a general question - https://pastebin.com/x2xTVxDi
      • devguy
        nvm i figured that part out was an error on my part. will ask when i need again.
      • stripeQuestions
        If you have a partyA and partyB connected on your platform with stripe connect, which API can be used to have partyA pay partyB
      • suchit
        timebox: is there a way to force webhook versions as well?
      • timebox
        stripeQuestions: Hi! So ... your best bet here is to reach out to Support and explain the business case and see what they think, but I'd be tempted to consider Standard accounts, rather than Custom/Express, depending on what kind of organizations the supplier(s) are. But Support are the experts on that kind of stuff: https://support.stripe.com/email/login
      • suchit: Unfortunately no; that'll always be your Account's version. So I'd write into Support on this one and see if they can downgrade your version. Best bet is to log into the (test) Account you want downgraded and then write in via the support form: https://support.stripe.com/email/login
      • suchit
        gotcha, thanks! :)
      • dautermann joined the channel
      • stripeQuestions
        @timebox Thanks!
      • devguy
        okay i do have a question now
      • glen_
        hey! is there any way for me to tell how much the fees are going to be before i create a charge? I want to create a destination charge, but the split depends on the fees
      • suchit has quit
      • timebox
      • Tim__
        @timebox does creating a charge create a receipt that is sent to the customer?
      • dautermann
        I hope this one is easy to say "you're doing this wrong": If I try to save a test card on my iOS device via "self.paymentContext.pushPaymentMethodsViewController" (i.e. the standard Stripe iOS payment methods view controller), I'm getting a "No such token: tok_1Bz...." error. I thought I was setting up my paymentContext correctly. What might cause this to happen?
      • timebox
        Tim__: If you've got email receipts enabled, and it's in live mode, yes.
      • Tim__
        hmm, how would you suggest showing the customer how much tax they've paid?
      • 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?
      • Tim__
        idk about you, but it seems silly that you can't add tax on a charge
      • does that mean i'm using charges wrong?
      • timebox
        dautermann: No such token usually means mismatched API keys - probably different Stripe Accounts, unless the error also includes something about live vs test.
      • glen_
        thanks @timebox. However, doesn't the actual rate depend on the payment method as well? Isn't the link you sent me only true for cards?
      • dautermann
        no... it just says "No such token". I'm definitely creating ephemeral keys earlier, so I didn't think my API keys were mismatched. I'll go check.
      • timebox
        glen_: Yes, but you'd need to know your rates, and factor that in from the information available in the Token.
      • devguy
        for my problem i have var customer; if(blah) customer = stripe.customers.create({}).then(function(customer){});
      • ill do a gist
      • stripeQuestions
        What is the "platform"? as apposed to stripe?
      • devguy
      • timebox
        stripeQuestions: lolwut
      • stripeQuestions
        Looking at these different account types - https://stripe.com/docs/connect/accounts
      • "User support provided by Platform and Stripe"
      • timebox
        devguy: Ok, what is your question?
      • stripeQuestions
        Is "platform" my app/backend?
      • timebox
        stripeQuestions: Platform is your Stripe Account.
      • devguy: And you most likely don't want to be assigning i.e. `stripe.customers.create()` to a return value, because it's asynchronous, so unless you're also returning the `customer` Promise somewhere to then use later in another `.then()`, it's not gonna do what you want it to.
      • devguy: Oh.
      • devguy: Ok, so the issue here is you're creating the Customer and Subscription at the same time. You need to move all the subscription creation code into the `then()` function for customer creation.
      • devguy
        it shall be done. i will test again
      • timebox
        devguy: Did what I said make sense? Do you know what I mean?
      • dautermann
        that was it @timebox! there was another api key hiding in the code.... thanks!
      • devguy
        yes I understand but now token error says No such source: tok_
      • gist is updated as well
      • bkmorse has quit
      • Doginal has quit
      • would the error saying no such source: tok_ be because the actual address is not real or the card was a test card. though I am in test mode as well.
      • or is it possible that the error is caused because I already have a payment from the same email but different card?