Hello. I have tried deleting a subscription manually through the Stripe dashboard (and set the end to immediately). I see the customer.subscription.deleted webhook being sent, however, I don't see where the webhook specifies whether or not the subscription was ended immediately or at the period end?
ymmor joined the channel
Dorf joined the channel
ymmor
How can I change the status of a rejected account ?
tr12
ganesh_: can you try setting up an ngrok tunnel, and giving stripe the url from that? https://ngrok.com
ymmor: you can't, pretty much. you'd need to talk to support about that
flippyhead joined the channel
ganesh_
tr12: I am using ngrok tunnel only.
tr12
Jerry_: the customer.subscription.deleted event describes a customer, so the subscription.cancel_at_period_end would be the correct property here
poacher2k joined the channel
ganesh_: hmm, that's really weird
ganesh_: do you have wireshark or tcpdump on that machine?
Jerry_
tr12: So if the cancel_at_period_end is true, then the subscription is still valid till the period end (in which case I will receive a subscription updated event) and if false, the subscription is no longer working as of this moment?
Dorf has quit
tr12
Jerry_: err, sorry, I'm being stupid
Jerry_
tr12: huh?
tr12
if you cancel a subscription with cancel_at_period_end, you won't get a deleted event until the subscription is actually deleted
ie: at period end
ganesh_
You mean the machine which i am working now?
tr12
Jerry_: so the value of subscription.cancel_at_period_end is kind of academic
ganesh_: the one you're running ngrok on
koopajah
ganesh_ : sorry I'm following from afar, can you give me an example event id (evt_XXX) that we sent you where you didn't get any data? That would help track things down
tr12
koopajah: they're using the "send test webhook" thing
Jerry_
ahh, so I will only receive the customer.subscription.deleted event when the subscription is effectively deleted (eg. it's no longer a subscription the moment I receive the event) ?
tr12
Jerry_: essentially
Jerry_
Alrighty I see, thank you
tr12
Jerry_: you'll still be able to retrieve the subscription, but it'll just be a stub object with deleted=true at that point
T1m0thy joined the channel
Jerry_
alright
ganesh_
evt_18HYpRCBqo5km0LpaVX5YnJQ
tr12
ganesh_: it may be useful to look at the actual traffic being sent by ngrok to your local server, and see if that contains a body, or if it's just blank
wireshark is probably the more user-friendly option (though you do have to say user-friendly fast)
ta_ has quit
ganesh_
ngrok traffic - 227.
In Http requests it shows 200 OK status for the api call
log comes blank only
koopajah
ganesh_ : I don't see anything specific in our logs here beyond the fact that it was delivered successfully to your endpoint
I'm going to try and send some data manually, let me know if you get it in the next few minutes
ganesh_
ok
sh__
In the charging tutorial what is $_POST['stripeToken'] ? and I've checked my post parameters and I don't have something like this.
koopajah
sh__ : that comes from Stripe Checkout posting to your server. If you don't have it it means something is wrong with your code (or you're not using Stripe Checkout)
ganesh_
@Koopajah - Actually send test webhook from stripe is working fine..In my api only i am not getting the request. file_get_contents("php://input"); it returns blank.
Just want to explain issue to you clearly again
koopajah
ganesh_ : well that's what we're trying to debug right? I just sent an event mentioning my name, do you see it?
sure, but my understanding is that it works if you send the curl yourself and not from Stripe, no?
ganesh_
yes. if I sent from curl it works fine..
koopajah
so again, I just sent you data directly through our systems, manually. Can you confirm you got this message please?
bmarty joined the channel
ganesh_
Yes I got the message
koopajah
okay, and do you see it in your *php code* ?
ganesh_
You mean the message. I saw the message in log
koopajah
hum
bmarty has left the channel
You said "If I send data via curl, I see it and the PHP script is able to retrieve it and log it. Separately, events from Stripe, I see them in ngrok but in PHP I get an empty message". Is that correct? If so, what I just did, did it work in the PHP code itself?
jon_x joined the channel
ganesh_
Yes..It is correct
And your message is working in PHP code itself
edrocks has quit
koopajah
okay, now let me try a new message
ganesh_
ok
koopajah
done, did this work?
ganesh_
Got the message
koopajah
well, then I don't understand because what I did is exactly what the code does here really
let me try one last thing
T1m0thy has quit
ganesh_
ok
koopajah
okay did you see that real event this time?
ganesh_
Yes
koopajah
well then it works as expected? I just created a normal customer in your dashboard, you got the event, so it's all working no?
sh__
could be my problem because of my location? I'm in Albania
koopajah
sh__ : no, it's a bug in your *code*
sh__
I did exactly what was in the descriptions and tutorials
koopajah
sh__ : Okay, so there's a bug, this happens, we can fix it, but I need a lot more details from your first if you want me to help. First off, did you integrate with Stripe Checkout or Stripe.js?
tr12: I am now able to create new orders with charges that contain the right description in test. I guess the question will be whether the email gets sent before or after the charge.success event :) If it's before I am already sending other emails I could hook invoices up to, but it's a bunch more work :-(
koopajah: how does 'Coupon#duration_in_months' interact with 'Subscription#interval_count'? does a 3 calendar month coupon apply correctly to a quarterly billing plan?
i.e. duration = 3, interval = month, interval_count = 3
koopajah
zrail : it's unrelated. The coupon apply for its duration, independently of the subscription itself. If you have a coupon with duration_in_months set to 3 it applies to any invoice on that subscription for the next 3 months (up to the second)