#giropersoncat_api

1 messages ¡ Page 1 of 1 (latest)

frank pythonBOT
#

👋 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/1222565025059835965

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

latent gazelle
#

Hello, do you have the IDs of these subscriptions? I can look in to them. Test mode has a fairly short data retention, I do not immediately remember how this works in live mode

manic compass
#

Hi! this is the subscription id sub_9bZTcfyE1q8YL6 and the account id acct_19BAuIB78pGGtXVg

latent gazelle
#

Thank you

#

Still looking in to the retention angle. What happens if you retrieve this subscription directly by its ID?

manic compass
latent gazelle
manic compass
#

sure, this also worked btw

val params2 = SubscriptionRetrieveParams.builder()

val subs = Subscription.retrieve("sub_9bZTcfyE1q8YL6", params2.build(), requestOptions)
#

can I get the request id from the java api?

#

I haven't managed to make this work with curl:

curl --location 'https://api.stripe.com/v1/subscriptions' \
      -d created[gte]=1479752160 \
      -d created[lte]=1514764799 \
      --header 'Stripe-Account: acct_19BAuIB78pGGtXVg' \
      -u some_key:
#

I get:

{
  "error": {
    "code": "parameter_unknown",
    "doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
    "message": "Received unknown parameter: created",
    "param": "created",
    "request_log_url": "https://dashboard.stripe.com/acct_19BAuIB78pGGtXVg/logs/req_JMCKKStIV3AkiY?t=1711553526",
    "type": "invalid_request_error"
  }
}
latent gazelle
#

You should be able to, though if sub_9bZTcfyE1q8YL6 is the subscription you were expecting from the first call, it looks like it was created in 2019. So I'm not sure why other invoices weren't showing up but the timestamps that were provided are for Nov 2016 through Dec 2017, so it would make sense for that subscription and any 2018 invoices to not show up with that filter.

#

Sorry should be able to get the request ID. This param should work as well, looking in to why it errored from that curl command

manic compass
#

it says created 2016

latent gazelle
#

Ah, I do see that now, I see both timestamps in slightly different ways on my backend. I will ask my colleagues about this. When you retrieve the subscription directly what does it say the created timestamp is?

manic compass
#

1479752170

{
  "id": "sub_9bZTcfyE1q8YL6",
  "object": "subscription",
  "application": null,
  "application_fee_percent": null,
  "automatic_tax": {
    "enabled": false,
    "liability": null
  },
  "billing_cycle_anchor": 1532115492,
  "billing_cycle_anchor_config": null,
  "billing_thresholds": null,
  "cancel_at": null,
  "cancel_at_period_end": false,
  "canceled_at": 1590530183,
  "cancellation_details": {
    "comment": null,
    "feedback": null,
    "reason": null
  },
  "collection_method": "send_invoice",
  "created": 1479752170,
...
latent gazelle
#

Thank you. For one more test can you try listing and filter such that the timestamp 1552955009 would be included? I am wondering if that API call filters on that other created timestamp that I am seeing

manic compass
#

that returned 10 subscriptions

#
[id: sub_ETaFQfM1IlAup4 -> created: 1549408284, id: sub_ES0y7PGAlf9Wst -> created: 1549046446, id: sub_Dui4OPXwqaDFVJ -> created: 1541365012, id: sub_DlYAuVx7lHf0K7 -> created: 1539252414, id: sub_DYC0fubpgPweMI -> created: 1536171642, id: sub_D09b1mfCtGhKLs -> created: 1528320925, id: sub_CeR3CnyBVPXS6y -> created: 1523311802, id: sub_CbgmSfNPEIXlpz -> created: 1522678368, id: sub_CWTfpEo4Bh3Zvb -> created: 1521476389, id: sub_CMme3gxwwa3Kaw -> created: 1519240602]
latent gazelle
#

Is sub_9bZTcfyE1q8YL6 included? Sorry should have clarified, that timestamp is the other one I am seeing for sub_9bZTcfyE1q8YL6

manic compass
#

no

latent gazelle
#

Isn't included there either. Gotcha. Bringing this to my colleagues as well

frank pythonBOT
manic compass
#

a bit more clear:

id: sub_ES0y7PGAlf9Wst -> created: 1549046446
id: sub_Dui4OPXwqaDFVJ -> created: 1541365012
id: sub_DlYAuVx7lHf0K7 -> created: 1539252414
id: sub_DYC0fubpgPweMI -> created: 1536171642
id: sub_D09b1mfCtGhKLs -> created: 1528320925
id: sub_CeR3CnyBVPXS6y -> created: 1523311802
id: sub_CbgmSfNPEIXlpz -> created: 1522678368
id: sub_CWTfpEo4Bh3Zvb -> created: 1521476389
id: sub_CMme3gxwwa3Kaw -> created: 1519240602
id: sub_ETaFQfM1IlAup4 -> created: 1549408284
latent gazelle