#sinduri_code
1 messages ¡ Page 1 of 1 (latest)
đ 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/1229642560331452466
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- sinduri_code, 16 hours ago, 14 messages
- sinduri_stripe-app-publishing, 6 days ago, 17 messages
Hi there, you need to initialize Stripe.js with your publishable key. What make you think you should replace it with a access token ?
because previously Stripe integration relay on publishable key and secret key, but now I migrated to Stripe app which automatically connect with Stripe account and return access token and refresh token, So I think all the integration relay on these new 2 tokens
OK, so you are trying to embed a card element inside a Stripe app?
I am a developer of Stripe plugin, previous version our customer need to copy paste the keys from their Stripe account,
not inside Stripe app, Our plugin integrated with many Stripe payment methods such as card, sepa, klarna etc
previously integration relay on publiushable and secret API kerys
No you should never ask your user to expose their API keys
Now it should use refresh token instead?
Can you share with me the integration doc that you are currently following?
didn't get you!! Our plugin in installed in customers site and server!! So they need to copy paste their API keys to functioning stripe payment methods, this is basically the working of our plugin
We are using stripe card elements and Stripe PHP SDK
https://docs.stripe.com/api/authentication
https://docs.stripe.com/js/including
Followed this, but Stripe tean asked us to implement Stripe app, now we are on migration process, So please let me know should I replace the secret and publishable key with refresh token to connect with Stripe in thi new Strip app integration?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Did your stripe contact send you any docs for you to follow along for the migration?
but in this doc, not found how to integrate card elements!!
This is the doc for Stripe app. and Stripe app doesn't support card element.
I'd suggest you push back to your stripe contact and tell them this integratoin doesn't work for you.
we are using stripe app to connect with customers Stripe account only
card element and other payment method integration is inside our WooCommerce Stripe plugin
Ok, To clarify, you want to load a card element for a stripe account that has installed your Stripe app?
Yes
the card element need to load on the checkout page of customer site, for this we have integrated stripe card elements and payment intent API (PHP sdk), and this relayed on publishable and secret key, but now plugin authentication is changed to oAuth Stripe app. Then how can I load the card elements and PHP sdk to call payment intent. Oauth authentication token received from Stripe app is a refresh token, then should i use it instead of publishable and secret key
Got it. In this case you need to specify the connected account's ID when initializing Stripe.js
Yes, you also need to implement OAuth to connect the existing acount to your platform. See https://docs.stripe.com/connect/oauth-reference
We are not using Stripe connect
Then I don't see a way to make API requests on behalf of an account outside a Stripe app.
our plugin customet install our Stripe app to their Stripe account, then we get the access tokens to connect their account with Stripe..
See the screenshot, in the doc they mentioned to use access token to make API call
My question is how to initialize card elements using access tokens
https://docs.stripe.com/stripe-apps/api-authentication/oauth this is the doc I referred
I have already answered this question. Stripe app doesn't support card element. The only way is to connect your platform with the existing account through OAuth, so that you can include the connected account's ID when initializing Stripe.js
We have already connect the customer account by installing the Stripe app to their account
our plugin received the access token for their account
That's within Stripe app, but you are now embedding a card element in your own page, which is outside the scope of a Stripe app.
yes
Yup, so now you see the difference?
Hmm, one sec.
https://docs.stripe.com/stripe-apps/api-authentication/oauth#refresh-access-token you are also able to get the stripe\_user\_id in the access token response
I'm not sure if it would work, but can you try initializing Stripe.js with this account ID in your own webpage and see if card element can be loaded?
https://docs.stripe.com/connect/authentication#adding-the-connected-account-id-to-a-client-side-application but in this doc you've shared, using publishable key again with account ID
Yes, your publishable key, and the ID of account that installed your app.
Are you able to find which key is used for this API call
req_SF3UFWiyfuZBpu secret key or refresh token?
I'm unable to verify your identity in discord, so I'm afraid that I'm unable to answer questions that could reveal user's integration.
The documentation you've shared, suggest to use publishable key, can we use the access token for the same initialization
This is my own Stripe account, not any users. I am adeveloper and I am testing the payment methods with Stripe app
No, but as I pointed out earlier, you can get the account ID from the acess token response.
So that you can initialize Stripe.js with your own publishable key + account ID
How to get the publishable key using Stripe app connect, becuase when the customet install our Stripe app it return only tokens, account id and user id not publishable and secret keys
You use your own publishable key
what about this, This is my own account, but in developer log section I cant see which key is used
Sorry can't help. Please reach out to support https://support.stripe.com/contact/email they can verify your identity.
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
But I can tell you this request was made by woocommerce plugin.
thats my own plugin
I am the developer , I just tested all the things after migration.
Whenever I contacted Stripe discord they quickly resolved the concerns by checking the request IDs
Have you tried what I suggested earlier and see if card element is loaded by initializing Stripe.js with your own publishable key and connected account's ID?
OK let met check, my concerns, is there any issues to use publishable key of Stripe account where stripe app published to initiate payment for the customer account, previousle we use customer's own publishable and secret keys
Your flow is unique and I've never tried integrating this way. The general integration guide is for a plugin that only live within a Stripe App.