#laulhus

1 messages · Page 1 of 1 (latest)

graceful mantleBOT
#

Hello! We'll be with you shortly. 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.

stable elm
#

What is the value of {{CUSTOMER_ID}} variables in your code?

#

This should be a cus_xxx ID that your inetgration creates via the API

foggy kiln
#

Yes correct

#

It is, copied directly from the customer I want to attach to from my Stripe dashboard

#

the customer already exists

stable elm
#

If the request log is showing customer: null then that would imply that your {{CUSTOMER_ID}} variable is undefined. Can you log your code to ensure it is set

foggy kiln
#

req_7rj2F8nfNAYese

#

cus_NexuPmZY8NlbIO

#

this is the value I pass in the property customerId

stable elm
# foggy kiln req_7rj2F8nfNAYese

Yeah you can see there's no customer parameter set which implies that {{CUSTOMER_ID}} is nullish to the SDK removes it from the request payload

#

You need to check your code to confirm it is working as you expect

foggy kiln
#

I'm actually passing the string directly

#
const {error, setupIntent} = await createSetupIntent({
      customerId: 'cus_NexuPmZY8NlbIO',
    });```
stable elm
foggy kiln
#

I can see in the documentation that the property is wrong, it says customer, but in the sdk it only allows for customerId

stable elm
#

If you try and use customer, ignoring the TS warnings, does it work?

foggy kiln
#

let me try

stable elm
#

But not really sure how the SDK interacts with the API directly

foggy kiln
#

It does work yes

stable elm
#

Ok, great! So I guess the documentation is right but the type interfaces in the SDK are wrong

#

Would you be happy to file an issue on the GH repo about this?

foggy kiln
#

That's correct

#

Sure

stable elm
#

Perfect, thank you!

foggy kiln
#

Thanks for your help!