#noskill_stripe-apps-public-id

1 messages ยท Page 1 of 1 (latest)

dense burrowBOT
#

๐Ÿ‘‹ 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/1399420800255131901

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

uncut tulip
#

Hi ๐Ÿ‘‹

Can you point to the specific Stripe Apps doc that describes what element you are trying to use?

uncut tulip
#

That function, fetchStripeSignature is used to get a signature from Stripe's servers, so it doesn't matter that you are using it in private

dark harbor
#

Yeah that is why I am surprised there is a failing outgoing HTTP request to find "apps_by_public_id"

uncut tulip
#

Was your app ever specified as "public"

#

And, just to be clear, you are attempting to make a signed request to your back-end, right?

dark harbor
#

A previous one was so I generated a new app, copied the id to existing stripe-app.json, and it still fails

#

Yes that is correct

uncut tulip
#

A previous one was so I generated a new app, copied the id to existing stripe-app.json, and it still fails

Copying the ID is likely the problem

#

But let me see what I can find about this app distribution

dark harbor
#

Thanks. Should I try to copy all existing code files to the new app I created?

uncut tulip
#

Which app is failing?

dark harbor
#

The most recent name is "com.invoices.installments-and-payment-plans"

uncut tulip
#

I can't find an app by that name

dark harbor
#

There were a few before that

uncut tulip
#

Can you share the ID of the Stripe Account that is developing the app?

dark harbor
#

nxVOKOIeSejB1ucs8aO0HoEMGbmGyGWL

But I also have:

acct_1RQwpCGpOxAH8o93

I prefer to use the latter but was running into issues + confusion with "Test Mode" vs Sandboxes and how to dev / test / rollout the app so I've been switching between them.

uncut tulip
#

Unfortunately I don't see any apps associated with either of these

dark harbor
#

That is very strange, would you see them even if they are private?

uncut tulip
#

If they are published, even for an external test, I would expect to see them

dark harbor
#

Maybe because it was under the Sandbox?

#

Are you able to see com.example.invoice-installments-and-payment-plans

uncut tulip
#

Is that the account that you were logged into when you created the app

#

Are you able to see com.example.invoice-installments-and-payment-plans

No, I don't see any app associated with that public ID

dark harbor
#

App ID - tailorapp%2AAZgjE6pyjgAAADf9%23EhcKFWFjY3RfMVJRd3BIMmVLNVdpYnlMSw

#

(Maybe that got escaped since its tailorapp*AZ...)

#

When I initially create the app should I be logged in to the main account, or the sandbox within the main account?

uncut tulip
#

When I initially create the app should I be logged in to the main account, or the sandbox within the main account?

If you are trying to build an app that you will eventually release and put to use, you should be using the Live account. If you are building an app for testing purposes with no intent to use it in Live accounts, then you can use the Sandbox

dark harbor
#

OK thanks, I am trying to do the former. Let me try again from the start a login to the live account first.

#

Related - When I am doing my dev loop should I be using test mode within that account or the sandbox? (When using stripe apps start)

uncut tulip
#

Hmmm..... to be honest, I'm not 100% certain. The Stripe Apps CLI was released prior to Sandboxes and I need to review that again

#

I'm reaching out to a colleague to inquire about your app and the 404

dark harbor
#

Thanks!

uncut tulip
#

Just to be clear, this is all local development, correct?

dark harbor
#

These errors are happening locally yes, I also published some apps and ran in sandbox mode. Have been trying many different things to try and get it all working. It has been unclear what the recommeded setup is for dev / test / prod and moving between environments.

#

And FYI - when I do stripe login in the CLI, it requires me to pick a sandbox or test mode

#

I just created "com.example.invoice-payment-plans" within acct_1RQwpCGpOxAH8o93

uncut tulip
#

Right, the Stripe CLI is for development in Test mode

#

So are you getting the normal empty drawer for your new app? Or have you already copied over some code?

dark harbor
#

I didnt copy anything yet

#

OK I will have to do another one then, I logged in to Sandbox. My mistake.

uncut tulip
#

Can you start with the fetchStripeSignature function?

#

I'm spinning up a basic app in a Sandbox too

dark harbor
#

Very strange, same error:

Uncaught (in promise) Error: No such app: com.example.invoice-payment-plans

#

Trying again but in test mode instead of sandbox

uncut tulip
#

My colleague thinks this is because the app hasn't been uploaded yet and therefore doesn't have a public ID but I could swear we had a better UX for this

dark harbor
#

Maybe it needs to be uploaded before you can fetch the signature?

uncut tulip
#

Okay yeah that seems right. The public ID for the app com.example.invoice-payment-plans is not assigned until you upload it for the first time

dark harbor
#

Maybe because I changed the id but didnt do a subsequent upload that it got mixed up

uncut tulip
#

Oh yes that would cause a problem!

dark harbor
#

So perhaps test vs. sandbox was a red herring! ๐Ÿ˜…

#

I thought the ID would be assigned when you did stripe apps create.

#

Could have sworn I did the upload on one of the pervious iterations but maybe not, let me try this all again from scratch.

uncut tulip
#

I thought the ID would be assigned when you did stripe apps create.

That's just locally in the stripe-app.json. It gets assigned in Stripe's internal records when you upload

dark harbor
#

Got it, that makes sense.

uncut tulip
#

Otherwise we'd get A TON of claimed public IDs for apps that no one ever intended to make available

#

And each public ID is unique so that could be like domain squatting ๐Ÿ˜…

dark harbor
#

Yup, totally reasonable.

#

Should I try from scratch with a sandbox or with test mode

uncut tulip
#

I recommended to the Apps team that we add a comment about uploading the app to set the public ID for that 404 response

#

Try either

dark harbor
#

Amazing thanks

#

That would be super helpful

#

If there was a doc on how to setup dev / test / prod that would also save a ton of time

uncut tulip
#

Yeah, there are definitely improvements we could make in the docs to provide a lower friction dev experience

dense burrowBOT
dark harbor
#

New app - com.example.invoice-installment-plans

#

That appears to have worked! TLDR - Start from scratch, stripe login to sandbox within the account you want to own the app, stripe apps create, stripe upload, stripe apps start.

#

Thank you so much for the help, really appreciate it ๐Ÿ™‚

uncut tulip
#

Great! I'm glad we got that resolved. Happy to help ๐Ÿ™‚