at this point... she already has a past due invoice
edrocks joined the channel
so the source update paid it
jack999
I really just want to have them put the credit card on file so we can bill later. Can I just bill them 0 dollars using checkout?
thai_
then the update subscription (same plan) is called... but this one created a new invoice and paid it
mac__
@ajs, also can you tell me difference in secret and publishable key. I mean restrictions & when to use each ?
ajs_
hey spacecadetbrown, you won't be able to set a specific cancel_at time, no. instead, you'd do this from your server (so you could e.g create a cron job for this or listen for the Nth invoice.payment_succeeded event and cancel then)
jack999: yeah, absolutely
jack999: you'd just modify checkout to say like "authorize card" and create a customer object with the token
jack999
ajs: so I can just bill them zero dollars using checkout?
Maybe I don't even have to add an amount.
ajs_
jack999: no need to; checkout or creating a customer object automatically creates a $0/$1 auth ($1 if $0 isn't supported by the bank)
thai_: you can just not subscribe to a new plan if the customer is delinquent
jack999
Ok, thanks a lot ajs!
stripe237 joined the channel
stripe237
Hey there
need help
i have test php for stripe but there is error is found
thai_
yea so before the subscribe plan... the customer->source is updated... once that's done... it does a subscribe plan
stripe237
the error is Class 'Stripe\Customer' not found
ajs_
mac__: sure, the publishable key is what you'd use to create a token. the secret key is used server side and should be kept secret as the name implies: https://support.stripe.com/questions/what-happe...
stripe237: that means you probably haven't included the stripe library correctly
stripe173 joined the channel
stripe173
Hi there
ajs_
thai_: when the source is updated the subscription isn't updated/added: it just pays the past due invoice if there is one and the customer stays on the same sub
thai_: if you're making a secondary call to create a sub, you want to not do that
hi stripe173
stripe237
hi
there is new version in stripe
mac__
@ajs : which token creation are we talking of, that publishable key is used ?
mac__: that happens client-side. your customer types in their card details and the publishable key is used to send those card details to stripe and return a secure representation of them that can be used on your account
mac__
@ajs: you mean token against a card before making a charge ?
stripe237
How do I type out?
I'm doing this for the first time
I mean where should I put publish key
stripe173 has quit
ajs_
stripe237: feel free to just ask if you have a question
thai_ has quit
mac__: right
mac__: two parts to this. 1. you'd create a token client side. that token is returned and you submit it to your server
mac__: 2. you use that token and your secret key to create a charge or customer object
mac__
@ajs, I am not creating token on client side but using the api from server side
Vlad_the_Impaler has quit
@ajs: but using secret key itself for token generation, what you are suggesting is it can be done using publishable key itself
ajs_
mac__: you should create a token client side unless you're maintaining your own PCI compliance. sending card details to your server requires much more work
@ajs : we are maintaining PCI compliance. Not possible to do client side as per our implementation. This is for platform account by the way
stripe237
OH ok
I will see to it and correct
mac__
we have a separate blackbox module which routes all the payments in our system
stripe237 has quit
ajs_
mac__: okay, if you handle PCI compliance yourself, have regular scans/have worked with a QSA and understand the implications, that's fine
jon_x has quit
cornice has quit
mac__
@ajs - Yes, we have all those things covered. Any drawbacks in using secret key for token generation. It is from backend server
ajs_
mac__: yeah, stripe.js provides additional fraud protection since it's able to look at many more things than just numbers that your server submits
ta joined the channel
edrocks has quit
mac__
@ajs : sure I would have preferred to use it but we have a limitation on it. But using Secret Key instead of publishable key from backend should be fine ?
ajs_
mac__: yes
SwatiOFL joined the channel
SwatiOFL
Hello
mac__
@ajs, Thanks a ton! Appreciated.
SwatiOFL
I need help regarding the stripe event api
ajs_
mac__: most welcome
spacecadetbrown joined the channel
hello SwatiOFL, feel free to just ask if you have a question
SwatiOFL
the list all events api call has a attribute "types"
it says - types = An array of up to 20 strings containing specific event names.
Yeah I just did, but my experience with stripe support is turnaround time on the order of a day, was hoping for a quicker answer from irc :)
ajs_
daxorid: this channel exists for help with dev questions, but the support folks answer the majority of emails within a few hours
daxorid
got it
edrocks has quit
timebox joined the channel
dunpeal joined the channel
timebox has quit
dunpeal
Hi. I know when I create a Customer from a set of CC details, the CC details are "authorized" to ensure the card is valid. How far does that go? If it succeeds, then the card must be a real card, but what if it's blocked / reported stolen / expired?
ajs_
hi dunpeal
dunpeal: you'll get a decline and you can display that to your customer
ajs_: thanks. how certain can I be that if the Customer creation succeeds, I can later charge that card?
ajs_
dunpeal: not entirely. the customer's bank can block the charge, they might not have sufficient funds, etc.
dunpeal
ajs_: we're having lots of issues with customers whose cards get authorized, but then later we get a decline when we try to charge them. I wonder how much putting a hold for the expected amount can help.
ajs_
dunpeal: if you create an authorization, you're guaranteed that amount
dunpeal: so in that sense it'd be the 100% sure way to know that you can charge that amount
dunpeal: but whether this fits your use case is up to you, of course
dunpeal
ajs_: really? what happenes if the card is stolen, and I create a hold, but then try to capture the funds later after the card was reported stolen and blocked?
ajs_: I suppose the capture will succeed, but then I'll get a chargeback later...