#BuyHemogenyx - Resource Missing

1 messages ยท Page 1 of 1 (latest)

copper dragon
#

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.

abstract jacinth
#

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

copper dragon
abstract jacinth
#

but I dont see anywhere else to add a stripe account

#

req_MVFgvVu388om9p

#

the payment_intent request is just before it here: req_35mJJOyKthjtEW

sage sonnet
#

you have mixed up API keys

#

you use the Secret API key from Account A, and then the Publishable API key from Account B

abstract jacinth
#

I have? I didnt know I had account A and B, I thought only one account

sage sonnet
#

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

abstract jacinth
#

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.

sage sonnet
#

Ah so you do use Connect

#

I thought you said otherwise to my colleague

#

Are you trying to implement Connect + Standard accounts + Direct charges?

abstract jacinth
#

yes

sage sonnet
#

Okay so that's what @copper dragon meant earlier

#

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

abstract jacinth
#

ok thanks, let me do some reading ๐Ÿ™‚

#

Wish you folks had an angular section, its all react or native ๐Ÿ˜›

sage sonnet
#

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

abstract jacinth
#

any idea how to initialise with ngx-stripe? I see for JS its:
var stripe = Stripe('pk_t......... but its all behind a wrapper

sage sonnet
#

What code do you write to load Stripe?

abstract jacinth
#

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";

sage sonnet
#

I think you want NgxStripeModule.forRoot( 'pk_test_123', { stripeAccount: 'acct_123', } )

abstract jacinth
#

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!

sage sonnet
#

never used Angular so mostly guessing :p

abstract jacinth
#

that worked, thank you very much ๐Ÿ™‚

sage sonnet
#

amazing!

abstract jacinth
#

IDK what you use, give yourself a Dojo or whatever else you use ๐Ÿคฃ

#

saved me alot of wasted time