#stripe

/

      • karllekko
        fabio_: ah, sorry
      • fabiodelrosso: that message above was for you ^^
      • measwel joined the channel
      • flo_: if you're passing the `source` parameter` as the ID of a card that is attached to a customer, you also need to pass the `customer` parameter with the ID of the customer
      • fabiodelrosso: yep, it won't work(because the card can't be charged every month, it needs the user to actively approve each payment, so it doesn't really make sense) It's a limitation of that test card. Some real cards act that way as well in some countries.
      • Praveen: sorry, reading now
      • fabio_: yeah, it's a little confusing, sorry about that. You can pass either a bank account object(this thing : https://stripe.com/docs/api/external_account_ba...) or a (debit) card object : this thing https://stripe.com/docs/api/external_account_ca...
      • Praveen: sorry for the delay. That's not something we support(collecting just the CVC to approve a payment). If you're not confident it's the same user, you can ask them to enter their full card details again. In general you don't need the CVC again to complete a charge successfully after you've already created a customer object.
      • flo_: if you're getting a not found error it often means the customer exists on a different account and you haven't set the stripe-account option to authenticate as that account : https://stripe.com/docs/connect/authentication#...
      • lnwebworks joined the channel
      • flo_: also I'm not sure if you've implemented Shared Customers yet, so take a look at this https://repl.it/repls/StrangeTanMouse For a node example of the steps.
      • Praveen: exactly
      • henry-chargy joined the channel
      • arnotixe joined the channel
      • Praveen: I haven't seen that, but like I said, Stripe doesn't really support collecting just the CVV, and it's not needed to create a charge successfully if you have already saved the card to a customer object.
      • Praveen: no, it's not possible
      • Neeraj: if it's a one-off invoice, you can call the API to attempt to pay it : https://stripe.com/docs/api/invoices/pay_invoice and that will create a charge for you
      • Praveen: it should, yes, do you plan on charging the debit card as well? In that case there should be no distinction, you can accept credit and debit cards and charge them with the same form
      • FalaffelAr has quit
      • Neeraj: ok, that's fine. You could do that by creating an initial charge for the full amount, then starting the subscription with a three month trial period, and the end of that it will transition into charging the customer on the monthly basis as normal.
      • Praveen: I've never really heard of using your ATM PIN for an online payment
      • Neeraj: you can accomplish this like I described. Create a charge against the customer for $30, then create the subscription against the customer with the monthly plan, and set the trial period to three months.
      • Neeraj: you need to create the initial charge, but that's it. The monthly invoices after the trial period are all generated by Stripe, you don't need to call the API for them every month.
      • Neeraj: oh, well dqsf's approach does work too
      • ssbb has quit
      • Neeraj: but they didn't say create an invoice, they said create an invoice item. So, instead of the charge, you can create an invoice item instead. https://stripe.com/docs/api/invoiceitems/create That's actually a better solution than the charge approach I mentioned.
      • Praveen: if they're all just forms of 3DS then you just use a 3DS charge, no?
      • Praveen: i.e. this https://stripe.com/docs/sources/three-d-secure But I don't know what country you're in and our support for local payment methods there, you might want to ask https://support.stripe.com/email with specifics.
      • Neeraj: you get details the same way you get them normally, the invoice item isn't involved. You collect payment info with Checkout/Elements and save them to a customer object : https://stripe.com/docs/saving-cards
      • Neeraj: no, it's not charged instantly. It gets added to the next invoice that is generated for the customer. So when you create the subscription for the customer, it gets added to that first invoice.
      • Neeraj: that's how it works though. When you create the subscription, an invoice is created and we immediately try to charge it.
      • Neeraj: so yeah, just create the invoice item and then create the subscription, it will do what you want. Try it with your test mode API keys.
      • Neeraj: yes. If you look at the code here https://stripe.com/docs/saving-cards you see that after accepting the token from the frontend, it creates a customer and then creates a charge. But in your case, instead of creating the charge, you can create the invoice item and the subscription.
      • Neeraj: there's no particular link between things here. Once you've collected the card information and sent it to your backend you can do many things with it, like charging it, or saving to a customer, creating subscriptions, etc.
      • lnwebworks has quit
      • V1n joined the channel
      • V1n: yes, create a charge with one of these test cards and it will trigger a dispute https://stripe.com/docs/testing#disputes
      • V1n: I don't think this applies to SEPA though, disputes and chargebacks are a credit card thing
      • Neeraj: you can access the `default_source` of the customer you created. It's a card object with all those details : https://stripe.com/docs/testing#disputes
      • Neeraj: sorry, wrong link : https://stripe.com/docs/api/cards/object
      • V1n: sorry, yes, you're correct of course. I totally missed that https://stripe.com/docs/sources/sepa-debit#disp...
      • V1n: I'm not sure if you can test them, let me look into it
      • V1n: per https://stripe.com/docs/sources/sepa-debit#test... you can create a source using the DE35370400440532013002 IBAN
      • Selven joined the channel
      • Jon__ joined the channel
      • Neeraj: an invoice will always charge the customer's `default_source`. To see which card specifically was charged, you can look at the invoice's charge field https://stripe.com/docs/api/invoices/object#inv... , and then the source of that charge : https://stripe.com/docs/api/charges/object#char...
      • flo_: that's normal, like you said, the customer exists on the platform. But you haven't shared it.
      • flo_: when you share a customer, it creates a token representing that customer's default source(or a source you select when creating the token). You can either charge that token directly on the connected account, or save that token to a customer on the connected account to charge that. Did you have a look at the repl.it I linked?
      • Jon__ has quit
      • fabio_ has quit
      • flo_: yep, so that creates a new customer ID(for a new customer on the connected account, that uses the information from the platform customer) You then refer to that new customer ID when creating charges on the connected account
      • ponant joined the channel
      • ponant: I would think not, because your applicant would need to have a Stripe account, and we don't support accounts in those countries yet
      • flo_: you can directly charge the `customerToken` on the connected account, but yeah, you do need to explicitly tokenize the platform customer first to make them accessible on the connected account.
      • labfoo has quit
      • ponant has quit
      • Neeraj: do you have a request ID for the failure? `req_xxx`, you can find it in your Stripe dashboard logs
      • lnwebworks joined the channel
      • Neeraj: if you have the request ID I can explain what's happening much better
      • Neeraj: you might need to change the filter on the table to include GET requests
      • arnotixe has quit
      • Neeraj: also, an Invoice Item is _not_ the same thing as an Invoice. Is that your confusion?
      • Neeraj: yes, because an Invoice Item is _not_ an Invoice. The Invoice has a `charge` field.
      • Neeraj: you can't, an invoice item doesn't have a charge. You need to create the subscription. When you do that, it creates an invoice. That invoice will include the invoice item. The invoice is charged, and then you can get the charge from the invoice.