Was is the difference between card vs source? Why would you prefer one over the other?
koopajah
Card is the old way. Source is the new way. The latter lets you have one integration/approach no matter the type of payment methods. So someone can pay via Card, via ACH, via iDeal, etc. but ultimately everything is a Source. If you only accept cards then Card is fine/easier at first
aleks_
Can you retrieve the card country if it is a source?
koopajah
yes they work the same way/have the same features
aleks_
Alright!
Thank you for the help :)
koopajah
sure! sorry for the vague answers. Mobile dev is not my forte :(
stripe657 joined the channel
aleks_
No worries, I am quite new to it as well so maybe I am just overcomplicating simple stuff! :)
stripe657
I see that Stripe offers ACH. Is it possible to set this option per invoice, so that US students would pay via ACH and European students would pay via credit card?
bostonmacosx joined the channel
koopajah
stripe657 : sure. You collect the details you want per customer so for a European customer you'd have them enter card details and a US student would enter ACH data.
bostonmacosx
ok I'm a bit confudes about sources and cards
mezod has quit
koopajah
bostonmacosx : they are completely separate objects. You either use one or the other.
bostonmacosx
koopajah: ok but I just put in $cu->source = $request->input("stripeToken")["id"]; and it saved it as a card
koopajah: the input is the tripe token
koopajah
yep which is entirely expected. You create a card token, you get a Card back.
bostonmacosx
ok...is there a default card?
koopajah
if you want a Source you would just never use tokens at all. You'd use Sources, even client-side.
bostonmacosx
so how do I choose the default car then...
card as well
stripe657
Hey Koopajah thanks. So the credit card and ACH options will be available on Checkout form?
koopajah
I don't understand your question I'm sorry. What do you mean "choose the default card"
stripe657 : no they will not. Checkout only supports cards and bitcoin not ACH. For ACH you would build your own payment form
jnarowski
Can I attach a newly created bank account source object to a customer?
koopajah: so how do I choose the default card then
jnarowski
and with the resp, I can't attach it to a customer
bostonmacosx
koopajah: my original question
koopajah
stripe657 : so not your own integration. Just your own HTML payment form. Something like this: http://jsfiddle.net/av8qu602/
stripe657
got it! Thank you for the help
koopajah
bostonmacosx : well there are multiple ways and it really depends what you mean by that. I guess if a customer has 3 cards nad you want card_B to be the default you use https://stripe.com/docs/api#update_customer and set `$customer->default_source = "card_B"; $customer->save();`
jnarowski : which bank account are you referencing exactly? Are you using SEPA debit?
jnarowski
I get a response with a token: { id: 'btokxxxxx', bank_account: { id: 'ba_xxxxx' } }
none of those are sources though
customer.sources.create(source: xxxxx)
then I'm trying to attach the source this way. How do I get the source ID associated with the newly created bank account
koopajah
okay so you're right none of those are sources and you would just never use sources. You are likely using ACH which goes through 1/ create a bank account token btok_XXXX 2/ save the bank account on the customer customer.sources.create(source: btok_XXXX)
the last step returns a bank account object, not a Source. and it has a unique id ba_XXXX
stripe657 has quit
jnarowski
I get this error Stripe::InvalidRequestError (No such token: btok_xxxxx)
customer.sources.create(source: btok_xxxxx)
koopajah
cool that's a separate issue. It means you try to charge a token on account A with its Secret API key but really you created that token on Account B with its publishable key. Triple check your keys and it will work
jnarowski
using stripe.js do I use secret key or publishable key?
on the front end with stripe.js I am using publishable key, on the backend I am using secret key
both for test data
koopajah
the issue is just that the keys you use are wrong. Or at least one of them is wrong.
jnarowski
is there a way to show a list of sources
so I can see where these are getting added?
koopajah
the is not, but you're saying "Sources" but you are not using Sources. You're creating ACH bank accounts. And right now you're creating a token in one account and try to use it on another account which will not work
jnarowski
they are the same account
koopajah
no, you think they are but they are not, per the error
if you give me the token id and the request id I can prove it to you. IF you take the time to look at the logs in the dashboard you would immediately see that you either create just tokens or create just customers but not both
jnarowski
haha you are right
touche
danielgl- has quit
desperek joined the channel
desperek
ay
so no polish support, rite?
any alts?
koopajah
desperek : unfortunately we mostly speak English here
desperek
koopajah, okay, let me rephrase. Do you perhaps know any alternatives to stripe/or when stripe will be avaible for Polish based developers?
Straw joined the channel
ftknox_ has quit
newman99 has quit
koopajah
desperek : we don't share timeline on new countries unfortunately. I don't know of an alternative at the moment
Straw has quit
stinkyrc joined the channel
kanja joined the channel
dqsf has quit
orbyt_ joined the channel
danielgl- joined the channel
bkovacev has quit
dqsf joined the channel
plainblackguy joined the channel
plainblackguy has left the channel
jfpoole has quit
David_ joined the channel
David_
I'm curious if all keys in the subscriptions.create path are defineable?
I want to pass in current_period_start and current_period_end