#BuyHemogenyx - Resource Missing
1 messages ยท Page 1 of 1 (latest)
Hello! That usually indicates you're using the wrong API key and/or Stripe-Account header in the request. That Payment Intent likely exists on a different Stripe account.
so I have a public key in my app at:
NgxStripeModule.forRoot( which is my test one
then in my AWS lambda which creates the payment intent there is an account: 'Stripe-Account': 'acct_1....
and then in my service to accept payment I use the client secret from the payment intent
Can you give me the request ID showing that error? I should be able to tell you exactly what to do after taking a look at it. Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
but I dont see anywhere else to add a stripe account
req_MVFgvVu388om9p
the payment_intent request is just before it here: req_35mJJOyKthjtEW
you have mixed up API keys
you use the Secret API key from Account A, and then the Publishable API key from Account B
I have? I didnt know I had account A and B, I thought only one account
both requests are on different Stripe accounts
they are under the same email address, but you have 2 separate accounts for sure
you should see the account switcher in the top left corner of your Dashboard
oh god, thats messy, I should have only one account for me then will have multiple connect accounts
I went and used my real email to generate connect accounts.
Ah so you do use Connect
I thought you said otherwise to my colleague
Are you trying to implement Connect + Standard accounts + Direct charges?
yes
Okay so that's what @copper dragon meant earlier
You create the PaymentIntent in the connected account, so you use the platform's Secret API key and pass the connected account id acct_123 in the Stripe-Account header: https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header
And then client-side, you are trying to confirm the PaymentIntent. You use the platform's Publishable API key, but you don't tell us which connected account the PaymentIntent lives on. So we confirm on the platform where it doesn't exist
You forgot to properly initialize Stripe.js with the connected account id
You want to read https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application specifically
ok thanks, let me do some reading ๐
Wish you folks had an angular section, its all react or native ๐
Ah yeah angular is not high on the list unfortunately. We started documented a bit of Next.js since we saw a pretty big increase in adoption but Angular is rarer
any idea how to initialise with ngx-stripe? I see for JS its:
var stripe = Stripe('pk_t......... but its all behind a wrapper
What code do you write to load Stripe?
NgxStripeModule.forRoot('pk_tes.... - In app.module.ts then
private stripeService: StripeService is autowired in the constructor
Imports are import {StripeCardComponent, StripeService} from "ngx-stripe";
import {StripeCardElementOptions, StripeElementsOptions} from "@stripe/stripe-js";
https://github.com/richnologies/ngx-stripe#using-the-library looks like what you want, they support passing options
I think you want NgxStripeModule.forRoot( 'pk_test_123', { stripeAccount: 'acct_123', } )
I was looking and found:
changeKey(key: string, options?: StripeConstructorOptions) {
this.stripe = new StripeInstance(this.version, this.loader, this.window, key, options);
but that looked like publishable key,
yes that looks better what you found, thanks I will try!
never used Angular so mostly guessing :p
that worked, thank you very much ๐
amazing!