#fabrizio-regio_api

1 messages · Page 1 of 1 (latest)

dim narwhalBOT
#

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

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

flat coral
#

Hi, let me help you with this.

mellow pelican
#

Can you describe me wich steps I have to follow to test Stripe environment SandBox?

flat coral
#

I am looking at the request you shared, and I can't see how it's related to the question.

#

Could you please share the Request ID with the error message?

#

The first time I receive the invoices the second time I don't
Where do you expect to receive the Invoices exactly?

mellow pelican
#

The invoices I expect to read are from the new Sanbox environment and I don't read them

The invoices I can read are from my customer REDRAION's production environment

flat coral
#

I don't read them
What do you mean by this?
What API calls are you making?

#

What's the exact Invoice IDs you're expecting to get?

mellow pelican
#

I don' read them = I don't receive none invoice from your sandbox environment

#

Invoice IDs = this for example in_1RGeG8FwakPfA19oxrqJ1a79

flat coral
mellow pelican
flat coral
#

I mean, a request to fetch Invoices via API. I want to check if the credentials on the request you're sending matches the account which this Invoice belongs to.

mellow pelican
#

Sorry! One question before respond your answer... The API endpoint change if I'm in sanbox environment or in production environmet?

flat coral
#

The endpoints URLs are the same, if that's what you're asking.
The difference is in API keys and the objects that are returned.

mellow pelican
#

Why do you write in returned items?

#

Invoices received from production environment are different from sandbox environment?

dim narwhalBOT
flat coral
#

Yes. Each environment stores different API objects, for isolation.

mellow pelican
#

Ok but the format is the same... data are different?

flat coral
#

Yes

grand imp
#

The invoices are different objects, corresponding to customers, products, prices and invoices you've created in that sandbox environment.

#

This is completely separate from live mode, or any other sandbox

mellow pelican
#

okok

#

I tryng to respond your request, wait a moment please

#

{Method: GET, RequestUri: 'https://api.stripe.com/test/invoices', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
{
Authorization: Bearer sk_test_51RGc1VFwakPfA19oNiuFcmO9BWRt0axHtnYoFh6Pd695pE0FS82ygCn0UJwAuR6k9rqaGW3koJm6jMkLzAxyvDTU00qUoBIvau
Content-Type: text/plain; charset=utf-8
}}

#

sorry

grand imp
mellow pelican
#

{Method: GET, RequestUri: 'https://api.stripe.com/v1/invoices', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
{
Authorization: Bearer sk_test_51RGc1VFwakPfA19oNiuFcmO9BWRt0axHtnYoFh6Pd695pE0FS82ygCn0UJwAuR6k9rqaGW3koJm6jMkLzAxyvDTU00qUoBIvau
Content-Type: text/plain; charset=utf-8
}}

#

this is the real call, sorry

grand imp
#

That's an Invoies LIst API request, using a test secret key (ie in test mode or a sandbox)

#

Do you have a question about this?

mellow pelican
#

Whic is the difference from test mode or sandbox??

grand imp
#

Mostly sandboxes are a new way to manage test mode that improves the experience in multiple ways. For example, you can have multiple sandboxes under your actual account, and they have complete isolated settings, unlike test mode with only had partial settings available but in many cases inherited settigns from live mode.

mellow pelican
#

A doubt comes to me: We at Soluzioni Informatiche S.p.A, who do not have a Stripe subscription, can we create Sandboxes to do tests?

grand imp
#

I'm not sure what that is or what the problem is. Can you explain more to give me context?

#

Sandboxes are something you set up as the owner/admin/dev on a Stripe account using the Dashboard

#

You need access to the dashboard to set this up

mellow pelican
#

We are employeers of Soluzioni Informatiche S.p.A. italian company. We are a programmers that manage your Italian customer named RADRAION.
Why after creating an empty sandbox stripe and filling it with invoice elements we are not able to read them from the test API key generated in the sandbox itself?

grand imp
#

You were given access to the account as developers and created this sandbox yourselves, or someone else created it for you?

#

Can you share an example Invoice ID that you expected to get in those results? eg in_12345

#

I can check if it belongs to the same sandbox or if you're creating & retrieving in two different sandboxes

mellow pelican
#

in_1RGeG8FwakPfA19oxrqJ1a79

grand imp
#

ok, that is in the same sandbox as the request & key you shared earlier

mellow pelican
#

Why I don't retreive it from my program?

grand imp
#

I can't see the results of your List (GET) requests. What are you getting back?

mellow pelican
#

zero invoices out of three previously created

grand imp
#

The response is empty, or does not include any of a set of three you expect?

mellow pelican
#

yep

grand imp
#

I see you have set a limit of eg 1 or 3 , so this will truncate the results

mellow pelican
#

no limit

grand imp
#

Can you make this list request again right now and share the request ID with me?

#

req_123

mellow pelican
#

for undersrtand.....

#

Is right that I, developer of Soluzioni Informatiche, I make a SandBox without none account of REDRAION?

grand imp
#

I don't know anything about the names here. If there's a single Stripe account for your client that you have access to, sandboxes can be created for development/testing to isolate your work from the live account.

#

It seems like you have some general questions about sandboxes, but this is distinct from any challenges you're facing with listing invoices in a sandbox where you expect to have created some.

#

That customer/subscription is using a test clock, and these results are expected to be omitted. You need to specify the customer or subscription ID (or the test_clock ID itself).
https://docs.stripe.com/billing/testing/test-clocks/api-advanced-usage#test-clock-objects-omitted-in-list-all-results

Test clock objects omitted in list all results
Stripe list APIs (such as List invoices) omit results generated by test clocks for list all requests. To see results generated by test clocks in these cases, you must request results within a specific parent, such as test_clock, customer, or subscription.

For example, GET /v1/invoices won’t return test clock generated invoices, but GET /v1/invoices/{customer_id} returns all invoices for that customer, including those that are test clock generated.

Similarly, you can specify a test clock ID in this example to get all invoices related to that test clock, or you can specify a subscription ID to return all invoices billed for that subscription, including test clock generated invoices.

mellow pelican
#

cus_SAypXdlqT5vR8q is REDRAION?

grand imp
#

I don't know -- you need to look at the details of that customer