#cnguyen85
1 messages · Page 1 of 1 (latest)
Hi
My request is this one
/code
I don't remember how to write curl code
==> curl https://api.stripe.com/v1/subscriptions
-u XXX
-d "expand[]"="data.customer" \
-d "created[gte]"=1692662400 \
-d "created[lte]"=1692890400 \
-G
As far as I know that looks correct - is something not working?
It said
curl: (3) URL rejected: Malformed input to a URL function
zsh: command not found: -d
zsh: command not found: -d
zsh: command not found: -G
on Mac
That same command for me works fine on a mac - are you sure you're include a ":" at the end of your secret key?
Yeah I'm not sure what could be causing that then - this works for me:
curl https://api.stripe.com/v1/subscriptions -u sk_test_123: -d "expand[]"="data.customer" -d "created[gte]"=1692662400 -d "created[lte]"=1692890400 -G
Now I have
{
"error": {
"message": "This property cannot be expanded (data).",
"request_log_url": "https://dashboard.stripe.com/logs/req_rNwxufovQsdpay?t=1692892714",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Did you check that reqeust in your dashboard? You can see there that it's making a POST request, so the error you're seeing is expected because you'd only get data back from LIST request