#kanwardanial_api
1 messages · Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- kanwardanial_api, 6 days ago, 9 messages
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240342170834046987
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi
Hello! When you say it's not giving the desired result, what is it giving, and how exactly is it different from what you expect?
its only shows 11 or sometime 8 records that are all incomplete_expired
What are you expecting instead?
all subscriptions within the date range
that same as shown if i select for 2 to 3 days range
Can you give me the request ID of the list request that's not working as expected? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
subscriptions-audit?subscriptions_from_date=2024-05-01&subscriptions_to_date=2024-05-15&status_option=all&payment_option=ps2&subscriptions_account=
No, sorry, I need the request ID. It's the Stripe ID for that API request. It starts with req_.
Hi why stripe don’t support Middle East country ?
I am in Kuwait why I can’t use stripe for my store ???
See the link I added above.
@hybrid geode looks like you're in the wrong place, this thread is for someone else's question.
- If you have your own thread please chat there.
- If you have a question or a followup to a closed thread use one of the buttons in https://discord.com/channels/841573134531821608/842637025524842496 to get help (we don't reopen closed threads).
Note that posting inappropriate messages in other people's threads is against the rules. No worries if this was just an honest mistake, but anyone who violates the rules multiple times will be removed from this server.
??
Do you have a new question?
@shell wind can you please tell me where i find request from my stripe dashboard?
I've told you twice. The instrucitons are here: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Do you have questions about those instructions?
Oops my bad Sorry
Request query parameters
{
"limit": "200",
"status": "all",
"created": {
"lte": "1714867200",
"gte": "1714521600"
},
"expand": {
"0": "data.customer"
}
}
req_MBWi6pxJItJMA0
The date range specified in that request is 2024-05-01 00:00:00 UTC to 2024-05-05 00:00:00. Is that the date range you're expecting?
That's not the date range you provided.
You're saying the 1st to the 15th, but the actual timestamps you passed in the request are from the 1st to 5th.
{
"limit": "200",
"status": "all",
"created": {
"lte": "1715731200",
"gte": "1714521600"
},
"expand": {
"0": "data.customer"
}
}
req_mC3VEuH8rjzArM
Hi there 👋 taking over, as my colleague needs to step away
Give me a few minutes to get caught up.
What are you looking at that indicates that you have 226 Subscriptions created within those specific dates?
Can you be more specific? What filters did you select?
i select status='all' & dates in between 01-05-2024 to 15-05-2024
and from my application i added this request
{
"limit": "200",
"status": "all",
"created": {
"lte": "1715731200",
"gte": "1714521600"
},
"expand": {
"0": "data.customer"
}
}
?
Got it, I think you need to look into paginating your request so that you can get the full results: https://docs.stripe.com/api/pagination
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I did the same but only get 1st itteration records not all.
What does that mean "the same"?
$stripeSubscriptions = \Stripe\Subscription::all([
'limit' => 100,
'status' => $status,
'created' => [
'gte' => $subscriptions_from_date,
'lte' => $subscriptions_to_date,
],
'expand' => ['data.customer'],
'starting_after' => $from_id,
]);
You have to create a loop that does that recursively like what they show in the examples
$subscriptions = (object)[];
$subscriptions->data = [];
$hasNext = true;
while($hasNext && count($subscriptions->data) < 1000){
$from_id = "";
if ($subscriptions->data){
$from_id = end($subscriptions->data)->id;
}
if ($from_id){
// echo $from_id;die;
$stripeSubscriptions = \Stripe\Subscription::all([
'limit' => 50,
'status' => $status,
'created' => [
'gte' => $subscriptions_from_date,
'lte' => $subscriptions_to_date,
],
'expand' => ['data.customer'],
'starting_after' => $from_id,
]);
}else{
$stripeSubscriptions = \Stripe\Subscription::all([
'limit' => 50,
'status' => $status,
'created' => [
'gte' => $subscriptions_from_date,
'lte' => $subscriptions_to_date,
],
'expand' => ['data.customer'],
]);
}
$subscriptions->data = array_merge($subscriptions->data, $stripeSubscriptions->data);
$hasNext = count($stripeSubscriptions->data) == 50;
}
this is my code, can you please review it and identify the mistake that i do....