#stripe

/

      • mezod joined the channel
      • rudyaffandi
        @koopajah, thanks
      • tytsai joined the channel
      • tytsai
        hello... is anyone up for answering a quick question?
      • koopajah
        tytsai : sure what's up?
      • rudyaffandi has quit
      • Tim joined the channel
      • tytsai
        would there be a reason when i create a client with a token or a hash of card info that there's no source being added?
      • i'm using rails/ruby
      • so doing this:
      • TheNewbie joined the channel
      • just gives me "sources": {"object":"list","data":[],"has_more":false,"total_count":0,
      • koopajah
        this usually means that `token` is empty in this code
      • tytsai
        i tried using either a test token like 'tok_visa' or one that's generated from
      • Stripe::Token.create(
      • with a test card
      • TheNewbie
        Hello - I've got an ACH question: When an ACH is charged, it starts out as pending, and then goes to success or failure (4) business days later. Is the (4) business days for just the first charge on the new account, or will every charge take (4) business days?
      • tytsai
        and passing in the token_id
      • koopajah
        tytsai : sorry the real issue with your code here is just that `token` is empty. Just replace `source: token` by `source: tok_visa` and it will just work
      • TheNewbie : all charges will take up to 5 business days
      • saurabhjha has quit
      • tytsai
        is there a specific format the token has to be in?
      • just a string?
      • koopajah
        it's always a string yes
      • tytsai
      • koopajah
        sorry it should be `source: 'tok_visa'`
      • tytsai
        i am doing this and it's printing the token out no issues
      • i should also mention that this code is actually working in production... i am trying to test the controller through rspec
      • koopajah
        then you're likely looking at the wrong customer. Sorry it's hard to say without more details but this is likely not what is running right now
      • fphilipe has quit
      • philipfc joined the channel
      • tytsai
        ok @koopajah thanks... i'll try to dig deeper into this
      • saurabhjha joined the channel
      • saurabhjha has quit
      • philipfc
        we think we have found a bug with the stripe webhook that passes an invoice as a result of invoice.payment_succeeded.
      • stripe502 joined the channel
      • stripe502
        Hi guys, how long does it take to complete a Stripe::Charge ?
      • hpar
        stripe502: it's almost instantaneous, usually a couple hundred ms
      • stripe502
        in the US
      • hpar
        + time for network
      • philipfc
        the last line item is missing the description in a multi-line invoice and on a single line item invoice the description is not returned on the invoice. in addition, when we call stripe.invoices.retrieve(invoiceId, function (err, results) { using node, the same thing happens. Note: the missing line item description is visible in the stripe interface on the stripe website.
      • hpar
        cool, yeah, in the US you'll see very fast responses
      • stripe502
        yes but, it's status is PENDING, how long until it is successful ?
      • hpar
        ah, so an ACH charge?
      • stripe502
        uhmm no, charging a card
      • it should be instantanious ?
      • hpar
        yeah, card charges always go directly to succeeded/failed
      • philipfc
        any ideas about why the stripe invoice line item description is missing in some cases?
      • hpar
        pending is only for things like ACH that can take a few days to settle
      • stripe502
        oh ok thanks, let me see something must be wrong with my code then
      • hpar
        philipfc: it's hard to say without seeing an invoice number and / or request ID
      • do you have the ID of a request from your logs? it's req_XXX in the URL when you're looking at your dashboard logs
      • philipfc
        invoice number in_1AwIddDwAbHOCcQEOA78sBck
      • even this single line invoice shows the issue with the description missing: in_1Ar1RDDwAbHOCcQESJwrIdM4
      • hpar
        specifically you're looking at invoice.description?
      • philipfc
        invoice line item description
      • remyo has quit
      • hpar
        so you'd expect to see a description of the subscription on each subscription line item, correct?
      • philipfc
        I will show an example in a minute of the response, but, yes, we expect a line item description on each line that is specific to that line.
      • hpar
        right, I think that's only auto-generated for proration line items, not for subscription line items
      • TheNewbie
        okay - thx
      • Suraj joined the channel
      • Suraj
        Where can I find account token id?
      • Psilidae joined the channel
      • philipfc
        hmm. what do you suggest we use for the the non proration line items? the invoice level description? Stripe dashboard does show a description for every line item. BTW, the invoice level description is also empty.
      • hpar
        Suraj: easiest way is to make this API call https://stripe.com/docs/api#retrieve_account
      • yep, the line item & invoice-level descriptions are meant to be filled in with the details you want to store there. I believe the dashboard's just formatting the data in a nicer way, let me look
      • yep, it does something like: if (invoice.description == null && invoice.plan) { /* ... output description of subscription */ }
      • Suraj
        @hpar is this "id": "acct_15p0W8Ecyglw2Puc", called account token?
      • hpar
        Suraj: yeah, it might be? I'd just call it an account ID. What are you trying to do?
      • kies joined the channel
      • account token means pretty much the same thing
      • Suraj
        One of my managed account payout has been disabled and stripe supported asked for account token so I am trying to figure out which one to provide them
      • philipfc
        will you share the output description used on the dashboard for line items with no proration? we would like to emulate that.
      • hpar
        Suraj: ah, so they want the ID of the account with payouts disabled. I'd go through the dashboard and find the account under "connected accounts", the account ID is shown there
      • eric_lagergren joined the channel
      • Suraj
        @hpar, Thank you.
      • eshlox has quit
      • hpar
        philipfc: I don't have the code available to share, no but it's approx: "${line_item.quantity} x Subscription to ${line_item.plan.name} (${format_currency(line_item.plan.amount)}/${line_item.plan.interval}"
      • philipfc
        thank you. looks good.
      • Suraj has quit
      • you guys rock!
      • hpar
        hah, happy to help! :)
      • nicksa joined the channel
      • philipfc
        we found one more issue before we know how and when to generate the description for the last invoice line. in_1Al3qADwAbHOCcQEk27jtQBO is showing 11 invoice line items on the dashboard but only 10 are returned from the api. how would we know whether or not we need to generate a final invoice line to reconcile the prorated amounts?
      • hpar
        ah so the line items are paged on the invoice https://stripe.com/docs/api/#pagination
      • you can see on the line_items list there's a "has_more" which tells you there's more than 10 items
      • philipfc
        got it. thanks for the reference.
      • nicksa
        Hey, my webhooks have worked before but now it seems like the webhook "Endpoint receiving events from connect applications" is not getting any webhooks, previously if I check events for a connected accounts dashboard -> Events & logs and choose an event, at the bottom of the event for example account.updated it says "Success" and the address the webhook was sent to, now it just says "Set up test webhook URLs to receive webhooks"
      • hpar
        huh that's odd nicksa, is it possible you removed the webhook?
      • Xionkana joined the channel
      • nicksa
        hpar, no I have tried over 5 different webhooks as well, im using ngrok
      • aFeijo has quit
      • RobertDeCurtins has quit
      • hpar
        ah so, webhooks won't be sent for past events
      • try doing something else that triggers an event and you'll see webhook delivery attempts on it
      • aFeijo joined the channel
      • nicksa
        but if I try to do upload a verification document now, the dashboard for the account shows that it was accepted, though no webhook is received
      • deadghost_ has quit
      • hpar
        that might take a minute or two to be delivered, maybe longer
      • do you see the event in your dashboard logs?
      • dolittle joined the channel
      • nicksa
        It's been about 2 hours now
      • I see it if i view the connected accounts dashboard -> Events & logs
      • But not on the platforms Events & logs
      • hpar
        right, that's expected—the update event only exists in the connected account
      • cool, and does it say that it's being sent to your connect webhook?
      • philipfc
        is there a way to pass limit on this node api. this example returns an error: stripe.invoices.retrieve(invoiceId, { limit: 20 }, function (err, results) {
      • nicksa
        at the bottom of the event where it usually says Success, it now says "Set up test webhook URLs to receive webhooks"
      • the event id is: evt_1AwZuBDvUcnMfud8Yd0LaMbs
      • hpar
        is this a standard account or custom?
      • nicksa
        custom, in test-mode
      • hpar
        and you have a testmode connect webhook on your platform, correct?
      • nicksa
        Yeah
      • hpar
        philipfc: you want this API call instead: https://stripe.com/docs/api/node#invoice_lines
      • Psilidae
        I'm trying to summarize the status of charges, for analytics purposes, into states like "succeeded", "failed", "disputed", "refunded", etc. I'm having trouble finding example Charge objects, so I'm not sure what assumptions can be made. Like, if a charge is disputed or refunded, does that effect `status` or `outcome`? Any tips?
      • hpar
        Psilidae: status and outcome never change, those have to do with when the charge was created only
      • huh nicksa looks like your connect webhook got disabled on the platform
      • jcampagne joined the channel
      • there's unfortunately a bug in the dashboard right now where it won't show that it's disabled, the best way to fix is to delete & recreate
      • tytsai has quit
      • nicksa
        hpar, ok so delete the endpoint and then add another one?
      • hpar
        yep
      • philipfc
        so if we need the invoice info and more than 10 invoice line items, we need to make 2 calls (one to invoice and one to invoice_lines)?
      • nicksa
        hpar, Super! Now it's working, cheers
      • hpar
        awesome!
      • philipfc: yep exactly, you'll get the first 10 when you retrieve the invoice, and then you can get the rest from the "retrieve line items" call… or you could just always make 2 calls (one to get the invoice, one to fetch all line items with limit: 100 or whatever you need)
      • philipfc
        got it. thank you again.
      • eacameron joined the channel
      • jcampagne
        Hello everyone, one question, is recommended use the "source" methods instead "credit card" methods?
      • aFeijo has quit
      • hpar
        depends on what you're trying to do
      • if you need to do 3D Secure then yes
      • Jorgen_ joined the channel
      • otherwise the card methods are fine
      • aFeijo joined the channel
      • Jorgen_
        Hello! I have some concerns in regards to user security for a website that uses Stripe. I just noticed that proxyrotator.com sends credit card details to Stripe. But then once the payment details has been cleared with Stripe, the info is sent to Proxyrotator's backend along with the Stripe token. Shouldn't this be against Stripe policy?
      • philipfc has quit
      • I have a screenshot confirming this behaviour, but I'd rather send it to a moderator as it does contain some personal info.
      • hpar
        hmm, if they're sending card details to their own server that may mean they implemented something incorrectly, but it also could mean that they've met strict PCI compliance requirements and allowed to handle this information
      • I'd suggest emailing support@stripe.com with your concerns, someone can take a look
      • thank you for bringing it up!
      • Jorgen_
        Oh, alright, thank you! :)
      • jcampagne has quit
      • saurabhjha joined the channel
      • saurabhjha has quit
      • dolittle has quit
      • allibubba joined the channel
      • Psilidae
        Is there a collection of sample objects available anywhere? I'm trying to write some unit tests, but I'm not confident that editing the json by hand would accurately reflect real responses.