#laulhus
1 messages · Page 1 of 1 (latest)
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.
- laulhus, 1 day ago, 11 messages
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
Yes correct
It is, copied directly from the customer I want to attach to from my Stripe dashboard
the customer already exists
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
Can you share the ID (req_xxx) of the API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
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.
req_7rj2F8nfNAYese
cus_NexuPmZY8NlbIO
this is the value I pass in the property customerId
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
I'm actually passing the string directly
const {error, setupIntent} = await createSetupIntent({
customerId: 'cus_NexuPmZY8NlbIO',
});```
Hmm, weird. Params seem right based on the types: https://github.com/stripe/stripe-terminal-react-native/blob/main/src/types/index.ts#L197
I can see in the documentation that the property is wrong, it says customer, but in the sdk it only allows for customerId
If you try and use customer, ignoring the TS warnings, does it work?
let me try
Because the Setup Intents API expects a customer parameter: https://stripe.com/docs/api/setup_intents/create#create_setup_intent-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But not really sure how the SDK interacts with the API directly
Example here uses customer: https://github.com/stripe/stripe-terminal-react-native/blob/2086c86e3eb8c71f3bb36df8491dc20a687f5f12/example-app/src/api/api.ts#L45
It does work yes
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?
Perfect, thank you!
Thanks for your help!